常用latex图片排版式样

标签:
latex |
分类: 文本文档编辑 |
\documentclass{article}
\usepackage{CJK}
\usepackage{graphicx}
\usepackage[includemp,body={398pt,550pt},footskip=30pt,%
\usepackage{graphicx}
\usepackage{subfigure}
\begin{CJK*}{GBK}{song}
%\renewcommand\figurename{Fig}
\begin{document}
\begin{figure}
\begin{minipage}[t]{0.5\linewidth}
\centering
\includegraphics[width=\textwidth]{Fig.1(a).eps}
\caption{(a)}
\label{fig:chap3:Fig.1(a)}
\end{minipage}%
\begin{minipage}[t]{0.5\linewidth}
\centering
\includegraphics[width=\textwidth]{Fig.1(b).eps}
\caption{(b)}
\label{figchap3:Fig.1(b)}
\end{minipage}
\end{figure}
\par
\hspace{-0.2in}
\begin{figure}
\begin{minipage}[t]{0.5\linewidth}
\centering
\includegraphics[width=\textwidth]{Fig.1(c).eps}
\caption{(c)}
\label{fig:chap3:Fig.1(c)}
\end{minipage}%
\begin{minipage}[t]{0.5\linewidth}
\centering
\includegraphics[width=\textwidth]{Fig.1(d).eps}
\caption{(d)}
\label{fig:chap3:Fig.1(d)}
\end{minipage}
\end{figure}
\clearpage
\end{CJK*}
\end{document}
http://s6/middle/628235b8x8d881677be95&690
转自:http://blog.sina.com.cn/s/blog_628235b80100l71p.html
注意,实际使用中,当\begin{figure} ... \end{begin}之间\includegraphics多个子图时,
latex不是报错就是意外崩溃,经调试发现原因是子图所占内存过大,即图片太大,所以多个
子图并列排版时不宜包含大图,应对大图单个处理。我用Photoshop将jpg转换为eps时,选的tiff8为存储,
eps图片为4M多,后将为tiff1为存储后,eps图片<4M,最后插入latex中才成功。但是之前有一幅eps图片
接近6M,却插入成功了,不知何解?
latex minipage 的使用
今天整理了下想实现一个2*2图片排列的效果。minipage的代码如下:
\begin{figure}
%\begin{tabular}{cc}
\begin{minipage}{0.48\linewidth}
\centerline{\includegraphics[width=4.0cm]{image1.jpg}}
\centerline{(a) Result 1}
\end{minipage}
\hfill
\begin{minipage}{.48\linewidth}
\centerline{\includegraphics[width=4.0cm]{image2.jpg}}
\centerline{(b) Results 2}
\end{minipage}
\vfill
\begin{minipage}{0.48\linewidth}
\centerline{\includegraphics[width=4.0cm]{image3.jpg}}
\centerline{(c) Result 3}
\end{minipage}
\hfill
\begin{minipage}{0.48\linewidth}
\centerline{\includegraphics[width=4.0cm]{image4.jpg}}
\centerline{(d) Result 4}
\end{minipage}
%\end{tabular}
\caption{Example of placing a figure with experimental results.}
\label{fig:res}
\end{figure}
发现有\vfill 与空行的效果完全一样,一般在使用的过程中,每弄一个minipage,最好都使用\vfill or \hfill来表达下一张图片与上一张图片的关系,是上下排的关系还是并排的关系。
当然还可以使用
\begin{figure*}
\end{figure*}来破栏,因为好多paper的格式是双栏的,所以有时候放图片可以破栏放置。
当然图片属性还有如下的格式
\begin{figure}[bhtp]
\end{figure}
在这里补充说一下浮动图形figure环境, 它能自动调整图形在页 面中出现的位置:
\begin{figure}[位置]
\caption{图的标题}
\end{figure}
这里[位置]可以是h(当前位置),t(页顶),b(页底),p(另页),如果前面加了个!(感叹号),那么则是忽略
美学标准,强制排列了。
转自:http://blog.csdn.net/lsg32/article/details/8121417
Insert Figures in Latex
There are many ways to insert figures and tables in Latex.
1.Insert a single figure:
\begin{figure}
\begin{center}
\centering
\includegraphics[width=\columnwidth]{figs/fig1.eps}
\caption{caption}
\label{fig:label}
\end{center}
\end{figure}
or
\begin{figure}[h]
\centerline{\psfig{figure=fig_1.eps,width=68.7mm} }
\caption{A sample line graph using colors which contrast well both
on screen and on a black-and-white hardcopy}
\label{fig:sample_graph}
\end{figure}
2. Insert two figures side by side, in one column:
\begin{figure}
\centering
\begin{minipage}[!htbp]{0.5\linewidth}
\includegraphics[width=1.5in]{figs/latticen.eps}
\caption{A Lattice}
\label{fig:latticen}
\end{minipage}%
\begin{minipage}[!htbp]{0.5\linewidth}
\includegraphics[width=1.5in]{figs/tree.eps}
\caption{A Left Deep Tree}
\label{fig:baselinex}
\end{minipage}
\end{figure}
3. If we want to insert two figures up and down, then
remove
4. If we want our figures cross the line, then add the keyword *:
\begin{figure*}
...
\end{figure*}
5. Insert figures and tables side by side:
\begin{minipage}[t]{0.5\linewidth}
\centering
\label{tab:simple-hdb}
%\rule{4cm}{2cm} %to simulate an actual table
\begin{tabular}{|c||c|c|c|} \hline
tid & a & b & c\\ \hline
t1 & 0 & 0 & 1 \\ %\hline
t2 & 0 & 1 & 0 \\ %\hline
t3 & 1 & 0 & 1 \\ %\hline
t4 & 1 & 1 & 0 \\
t5 & 1 & 1 & 1 \\ \hline
\end{tabular}
\captionof{table}{An example}
\end{minipage}%
\begin{minipage}[t]{0.5\linewidth}
\centering
\label{fig:tree-3}
%\rule{4cm}{2cm} %to simulate an actual figure
\includegraphics[width=2in]{figs/tree-3-p-abc.eps}
\captionof{figure}{The left deep tree for 3 attributes}
\end{minipage}
}
\caption{An Example with 3 Attributes}
\centering
\subfloat[Data]{%
\label{tab:simple-hdb}
\begin{tabular}{|c||c|c|c|} \hline
tid & a & b & c\\ \hline
t1 & 0 & 0 & 1 \\ %\hline
t2 & 0 & 1 & 0 \\ %\hline
t3 & 1 & 0 & 1 \\ %\hline
t4 & 1 & 1 & 0 \\
t5 & 1 & 1 & 1 \\ \hline
\end{tabular}
}%
\subfloat[The left deep tree for the example]{%
%\rule{6.4cm}{3.6cm}
\label{fig:synthetic-size}
\includegraphics[width=2.3in]{figs/tree-3-p-abc.eps}
}%
\end{figure}
http://www.log4.info/wp-content/uploads/2012/06/fig-table-2-300x174.png
6. Using subfig to draw 4 figures in two lines
\centering
\subfloat[]{%
\label{fig:synthetic-size}
\includegraphics[width=2.5in]{figs/1.eps}
}%
\subfloat[]{%
\label{fig:synthetic-items}
\includegraphics[width=2.5in]{figs/2.eps}
}%
\subfloat[]{%
\label{fig:synthetic-k}
\includegraphics[width=2.5in]{figs/3.eps}
}\\ %
\subfloat[]{%
\label{fig:synthetic-p}
\includegraphics[width=2.5in]{figs/4.eps}
}%
\subfloat[]{%
\label{fig:real-size}
\includegraphics[width=2.5in]{figs/5.eps}
}%
\subfloat[]{%
\label{fig:real-k}
\includegraphics[width=2.5in]{figs/6.eps}
}%
\caption[Testing Different settings of WEIGHT-DEPENDENT-CRAWL.]{A set of six sub-floats:
\subref{fig:synthetic-size} Impact of size on synthetic data set;
\subref{fig:synthetic-items} Impact of the number of attributes on synthetic data set;
\subref{fig:synthetic-k} Impact of k on synthetic data set;
\subref{fig:synthetic-p} Impact of data distribution on synthetic data set;
\subref{fig:real-size} Impact of size on real data set; and,
\subref{fig:real-k} Impact of k on real data set.}%
\label{fig:group-1}%
\end{figure*}
\centering
\begin{minipage}[!htbp]{0.33\linewidth}
\includegraphics[width=1.8in]{figs/1.eps}
\caption{Impact of size on synthetic data set}
\label{fig:synthetic-size}
\end{minipage}%
\begin{minipage}[!htbp]{0.33\linewidth}
\includegraphics[width=1.8in]{figs/2.eps}
\caption{Impact of the number of attributes on synthetic data set}
\label{fig:synthetic-items}
\end{minipage}%
\begin{minipage}[!htbp]{0.33\linewidth}
\includegraphics[width=1.8in]{figs/3.eps}
\caption{Impact of k on synthetic data set}
\label{fig:synthetic-k}
\end{minipage}
\begin{minipage}[!htbp]{0.33\linewidth}
\includegraphics[width=1.8in]{figs/4.eps}
\caption{Impact of data distribution on synthetic data set}
\label{fig:synthetic-p}
\end{minipage}%
\begin{minipage}[!htbp]{0.33\linewidth}
\includegraphics[width=1.8in]{figs/5.eps}
\caption{Impact of size on real data set}
\label{fig:real-size}
\end{minipage}%
\begin{minipage}[!htbp]{0.33\linewidth}
\includegraphics[width=1.8in]{figs/6.eps}
\caption{Impact of k on real data set}
\label{fig:real-k}
\end{minipage}
\end{figure*}
在LaTeX文档中插入图片
- http://hepg.sdu.edu.cn/picture/cross_ref_button.gif
在LaTeX文档中插入图片的几种常用的方法 - http://hepg.sdu.edu.cn/picture/cross_ref_button.gif
如何得到ps(eps)格式的文件 - http://hepg.sdu.edu.cn/picture/cross_ref_button.gif
关于LaTex中的图表问题的几篇有用的文章
-
在LaTeX文档中插入图片的几种常用的方法
LaTeX中一般只直接支持插入eps(Encapsulated PostScript)格式的图形文件, 因此在图片插入latex文档之前应先设法得到图片的eps格式的文件. 可参考本页的"如何得到ps(eps)格式的文件"一节的内容准备好欲插入图片的 eps文件.
在LaTeX文档中插入图片都是通过使用一些latex图形处理宏命令来实现的, 有很多宏命令都支持在在LaTeX文档中插入eps格式的图形文件, 主要有:
- 用includegraphics宏命令(graphicx包):
首先需在latex文档的文件说明部分加上:
\usepackage{graphicx}
然后在需要插入图片的地方引用:\includegraphics[height=高度]{图片文件名} 或者: \includegraphics[width=宽度]{图片文件名}
其中的"高度"和"宽度"是指希望图片打印的高度和宽度, 必须给出单位, 可用厘米(cm)或英寸(in). 高度和宽度也可用上述格式同时给出, 这样可以改变原图的长宽比例. 上述命令中的图片文件名是指欲插入的图片文件 的文件名, 图片必需是eps格式的.
用graphicx包的includegraphics宏命令插入图片时还可以使图片旋转, 方法是:\includegraphics[height=高度][angle=旋转角度]{图片文件名}
- 用includegraphics宏命令(graphics包):
使用graphics包插入图片过程较麻烦, 具体的方法可参见
http://hepg.sdu.edu.cn/picture/cross_ref_button.gif "Graphics and Colour with LaTeX"一文中的介绍. - 用psfig宏命令:
首先需在latex文档的文件说明部分加上:
\usepackage{psfig}
然后在需要插入图片的地方引用:\psfig{figure=图片文件名,height=高度} 或者: \psfig{figure=图片文件名,width=宽度}
其中的"高度"和"宽度"是指希望图片打印的高度和宽度, 必须给出单位, 可用厘米(cm)或英寸(in). 高度和宽度也可用上述格式同时给出, 这样可以改变原图的长宽比例. 上述命令中的图片文件名是指欲插入的图片文件 的文件名, 图片必需是eps格式的. - 用epsfig宏命令:
epsfig宏命令的使用方法和psfig完全相同, 具体方法是: 首先需在latex文档的文件说明部分加上:
\usepackage{epsfig}
然后在需要插入图片的地方引用:\epsfig{figure=图片文件名,height=高度} 或者: \epsfig{figure=图片文件名,width=宽度}
其中的"高度"和"宽度"是指希望图片打印的高度和宽度, 必须给出单位, 可用厘米(cm)或英寸(in). 高度和宽度也可用上述格式同时给出, 这样可以改变原图的长宽比例. 上述命令中的图片文件名是指欲插入的图片文件 的文件名, 图片必需是eps格式的. - 用epsf宏命令:
用epsf宏命令的使用方法是: 首先需在latex文档的文件说明部分加上:
\usepackage{epsf}
然后在需要插入图片的地方引用:\epsfxsize=宽度\epsffile{图片文件名} 或者: \epsfysize=高度\epsffile{图片文件名}
其中的"高度"和"宽度"是指希望图片打印的高度和宽度, 必须给出单位, 可用厘米(cm)或英寸(in). 高度和宽度也可用上述格式同时给出, 这样可以改变原图的长宽比例. 上述命令中的图片文件名是指欲插入的图片文件 的文件名, 图片必需是eps格式的.
- 用includegraphics宏命令(graphicx包):
-
如何得到PostScript(.ps或.eps)格式的文件
LaTeX中一般只直接支持插入eps(Encapsulated PostScript)格式的图形文件, 因此在图片插入latex文档之前应先设法得到图片的eps格式的文件.- UNIX下的各种应用软件都可以把其结果输出为ps格式, 大部分软件也可以 输出eps格式.
- 若软件只能输出ps格式而不能输出eps格式的结果, 则可用ps2epsi命令将其转化为eps格式, 可参考man ps2epsi的说明.
- 若图片文件的格式是位图图形文件则可用Image Magick软件包的display
和convert工具转化为ps或eps格式的文件. 详见其man页和
http://hepg.sdu.edu.cn/picture/cross_ref_button.gif 使用说明 - Windows软件的输出结果变成ps/eps文件: 可参见本网站
"高能物理研究室Windows系统使用技巧"中的
http://hepg.sdu.edu.cn/picture/cross_ref_button.gif "如何把Windows系统中软件的输出结果转化为ps和eps格式的文件" 一栏中的说明.
http://hepg.sdu.edu.cn/button/Top2.gif
-
关于LaTex中的图表问题的几篇有用的文章
- http://hepg.sdu.edu.cn/picture/cross_ref_button.gif
Graphics and Colour with LaTeX
有关在LaTex中插图和使用颜色的在线指导. - http://hepg.sdu.edu.cn/picture/cross_ref_button.gifFigure'ing
and Picture'ing LaTeX(ps格式)
在LaTex中插入ps图和xfig图的方法. - http://hepg.sdu.edu.cn/picture/cross_ref_button.gifUsing
Imported Graphics in LaTeX2e(ps格式)
关于LaTex中插图的详细论述, 包括基本概念, 文件格式及其相互转换, 有关软件等. 其中还有如何把ps格式图片中的字符替换成latex格式字符, 以解决有些应用软件无法使用希腊字母等特殊字符及复杂数学公式表达式的问题. -
http://hepg.sdu.edu.cn/picture/cross_ref_button.gifLaTeX maths
and graphics(ps格式)
主要是关于在LaTex中插入图片和公式的方法.
minipage subfigure
-
To place to figures side by side, you could use minipage like this: - \begin{figure}
\begin{minipage}[b]{0.5\linewidth} % A minipage that covers half the page
\centering
\includegraphics[width=6cm]{bild1.eps}
\caption{En liten bild}
\end{minipage}
\hspace{0.5cm} % To get a little bit of space between the figures
\begin{minipage}[b]{0.5\linewidth}
\centering
\includegraphics[width=6cm]{bild2.eps}
\caption{En liten bild till}
\end{minipage}
\end{figure}
With minipage, you get two different figures. Another way to do it is to use the package subfigure (\usepackage{subfigure} in the preamble). You will then get two subfigures inside one figure.\begin{figure}
\centering
\subfigure[Bild a.] % caption for subfigure a
{
\label{fig:sub:a}
\includegraphics[width=4cm]{bild_a.eps}
}
\hspace{1cm}
\subfigure[Bild b.] % caption for subfigure b
{
\label{fig:sub:b}
\includegraphics[width=4cm]{bild_b.eps}
}
\caption{Bild a och b.}
\label{fig:sub} % caption for the whole figure
\end{figure}
When you use subfigure you only get one figure, i.e figure 3. When you refer to the subfigures, they are called figure 3(a) and figure 3(b). - 转自:
http://hi.baidu.com/yangchenug/blog/item/a22a85fabf44121ba8d31190 .html -
- LaTeX技巧152:subfigure竖排图形
-
LaTeX插图始终是件麻烦的事情, 这里介绍了如何 在LaTeX文档中插入图片, 但有时还是不能满足某些特殊要求. 这里介绍使用latex的subfigure竖排图形.
注意要使用宏包\usepackage{graphicx}和\usepackage{subfigure}
IEEE给的模板是图形横排,subfigure不支持\\换行
所以网上查了查,有个人用minipage放在subfigure{}中,在minipage{}里换行
[CODE]
\begin{figure}
\centering
\subfigure[the first subfigure]{
\begin{minipage}[b]{0.2\textwidth}
\includegraphics[width=1\textwidth]{fig1.eps} \\
\includegraphics[width=1\textwidth]{fig2.eps}
\end{minipage}
}
\subfigure[the second subfigure]{
\begin{minipage}[b]{0.2\textwidth}
\includegraphics[width=1\textwidth]{fig3.eps} \\
\includegraphics[width=1\textwidth]{fig4.eps}
\end{minipage}
}
\end{figure}
演示效果图:
http://s9/bmiddle/5e16f177h7a6d2399c808&690
演示代码:
\documentclass{article}
\usepackage{CJK}
\usepackage{graphicx}
\usepackage[includemp,body={398pt,550pt},footskip=30pt,%
marginparwidth=60pt,marginparsep=10pt]{geometry}
\usepackage{graphicx}
\usepackage{subfigure}
%\setlength\textwidth{180.0pt}
\begin{CJK*}{GBK}{song}
\renewcommand\figurename{图}
\begin{document}
\begin{figure}
\centering
\subfigure[the first subfigure]{
\begin{minipage}[b]{0.4\textwidth}
\includegraphics[width=1\textwidth]{pic1.eps} \\
\includegraphics[width=1\textwidth]{pic.eps}
\end{minipage}
}
\subfigure[the second subfigure]{
\begin{minipage}[b]{0.4\textwidth}
\includegraphics[width=1\textwidth]{pic1.eps} \\
\includegraphics[width=1\textwidth]{pic.eps}
\end{minipage}
}
\end{figure}
\paragraph{}
\clearpage
\end{CJK*}
\end{document}
-
转自:http://blog.sina.com.cn/s/blog_5e16f1770100gdqz.html
-
LaTeX技巧151:subfigure排版并排放置两图
LaTeX插图始终是件麻烦的事情, 这里介绍了如何 在LaTeX文档中插入图片, 但有时还是不能满足某些特殊要求. 前面介绍了使用Latex的subfigure竖排图形, 这是介绍使用latex的subfigure排版并排放置的两张图.注意要使用宏包\usepackage{graphicx}和\usepackage{subfigure}
[CODE]
\begin{figure}
\begin{minipage}[t]{0.5\linewidth}
\centering
\includegraphics[width=2.2in]{fig1.eps}
\caption{fig1}
\label{fig:side:a}
\end{minipage}%
\begin{minipage}[t]{0.5\linewidth}
\centering
\includegraphics[width=2.2in]{fig2.eps}
\caption{fig2}
\label{fig:side:b}
\end{minipage}
\end{figure}还有一种方法:
在某些情况下,有时会希望将并列的图形组成一组,而其中的每一幅图都保持其独立性。
paisubfigure 宏包的 \subfigure 命令将这一组做为一幅图形,其中的每一幅图做为子图形。例如: [code]
\begin{figure} \centering \subfigure[Small Box with a Long Caption]{ \label{fig:subfig:a} %% label for first subfigure \includegraphics[width=1.0in]{graphic.eps}} \hspace{1in} \subfigure[Big Box]{ \label{fig:subfig:b} %% label for second subfigure \includegraphics[width=1.5in]{graphic.eps}} \caption{Two Subfigures} \label{fig:subfig} %% label for entire figure \end{figure}
子图的标记有两种形式: - 一种是出现在子图的下面作为标题的一部分。这通过命令
\@thesubfigure 来生成。 - 另一种是在使用
\ref 命令的时候出现。这通过将命令 \p@subfigure 的输出处理后传递给 \thesubfigure 命令来生成。
subfigure 计数器和 \thefigure 命令。子图的标记的格式由下面的命令来控制。 - 命令
\thefigure 印出当前图形的编号。 -
计数器
subfigure 记录子图的编号,命令 \alph{subfigure} 将计数器 subfigure 的值用小写字母印出,而命令 \roman{subfigure} 则是用小写罗马数字印出(有关印出计数器值的命令可参见文献 [1, 第 98 页] 和 [3, 第 446 页]。)。 - 命令
\thesubfigure 缺省使用小写字母,如 (a),(b) 等。 - 命令
\@thesubfigure 缺省为 \thesubfigure\space,即在标题标记和文本之间加上一个空白。 - 命令
\p@subfigure 缺省为 \thefigure。
如果改变子图标题的标记,字体等的缺省值,可参见文献 [10]。下面给出几个简单的例子: - 若想让子图标题标记使用小写罗马数字如
(i), (ii)等, \ref 命令的结果如 12i, 12ii 等,可使用下面的命令(最好放在导言区中) \renewcommand{\thesubfigure}{\roman{subfigure}} \makeatletter \renewcommand{\@thesubfigure}{(\thesubfigure)\space} \renewcommand{\p@subfigure}{\thefigure} \makeatother
- 若想让子图标题标记使用阿拉伯数字如
12.1:, 12.2: 等, \ref 命令的结果如 12.1, 12.2 等,可使用下面的命令 \renewcommand{\thesubfigure}% {\thefigure.\arabic{subfigure}} \makeatletter \renewcommand{\@thesubfigure}{\thesubfigure:\space} \renewcommand{\p@subfigure}{} \makeatother
缺省情况下,用 \listoffigures 命令生成的图形目录中只包括图形,而不包括子图。要想在图形目录中包括子图,要在 \listoffigures 命令前加上 \setcounter{lofdepth}{2}。需要说明的是,由于 LATEX 的变化,导致目前版本(3/95)的 subfigure 宏包在图形目录的子图输入项开始部分都加上 ``numberline1''。将下面的代码加到导言区中就可以解决这一问题。 \makeatletter \renewcommand{\@subcaption}[2]{% \begingroup \let\label\@gobble \def\protect{\string\string\string}% \xdef\@subfigcaptionlist{% \@subfigcaptionlist,% {\numberline {\@currentlabel}% \noexpand{\ignorespaces #2}}}% \endgroup \@nameuse{@make#1caption}{\@nameuse{@the#1}}{#2}} \makeatother
演示效果图:
http://s10/bmiddle/5e16f17747a6cbfdf6d19&690
演示代码:
\documentclass{article}
\usepackage{CJK}
\usepackage{graphicx}
\usepackage[includemp,body={398pt,550pt},footskip=30pt,%
marginparwidth=60pt,marginparsep=10pt]{geometry}
\usepackage{graphicx}
\usepackage{subfigure}
\begin{CJK*}{GBK}{song}
\renewcommand\figurename{图}
\begin{document}\begin{figure}
\begin{minipage}[t]{0.5\textwidth}
\centering
\includegraphics[width=2.2in]{pic1.eps}
\caption{fig1}
\label{fig:side:a}
\end{minipage}%
\begin{minipage}[t]{0.5\textwidth}
\centering
\includegraphics[width=2.2in]{pic.eps}
\caption{fig2}
\label{fig:side:b}
\end{minipage}
\end{figure}\begin{figure}
\centering
\subfigure[Small Box with a Long Caption]{
\label{fig:subfig:a} %% label for first subfigure
\includegraphics[width=1.0in]{pic1.eps}}
\hspace{1in}
\subfigure[Big Box]{
\label{fig:subfig:b} %% label for second subfigure
\includegraphics[width=1.5in]{pic.eps}}
\caption{Two Subfigures}
\label{fig:subfig} %% label for entire figure
\end{figure}
\paragraph{}
\clearpage
\end{CJK*}
\end{document} - 一种是出现在子图的下面作为标题的一部分。这通过命令
-
转自:http://blog.sina.com.cn/s/blog_5e16f1770100gdqy.html
-
\newcounter{lofdepth}错误--tocloft和subfig
-
最近,发现一个新错误,以前没遇到过,错误提示信息如下:
Error \newcounter{lofdepth} and \newcouter{lotdepth}
! LaTeX Error: Command \c@lofdepth already defined.
Or name \end... illegal, see p.192 of the manual.
See the LaTeX manual or LaTeX Companion for explanation.
TypeH <return> for immediate help.
...
l.99 \newcounter{lofdepth}
Your command was ignored.- 【解决方案】
- 加载tocloft宏包的时候,使用 "subfigure" 参数. 可以参考tocloft宏包说明文档。即:
- \usepackage[titles,subfigure]{tocloft}
文档地址:http://www.ctan.org/tex-archive/macros/latex/contrib/tocloft/tocloft.pdf
转自:http://blog.sina.com.cn/s/blog_5e16f1770100mwiv.html
三图并列的排版技巧方法
\documentclass{article}
\usepackage{array,graphicx,subfig}
\begin{document} \begin{figure}[htb]
\centering
\begin{tabular}{m{0.50\textwidth}m{0.5\textwidth}} \centering \begin{tabular}{m{0.50\textwidth}} {\centering \subfigure[small] {\includegraphics[width=0.5\textwidth,height=5cm]{eyebrows_mask.eps} \label{small}}}\\ {\subfigure[small2]{\includegraphics[width=0.5\textwidth,height=5cm]{eyebrows_mask.eps}}} \end{tabular}& {\subfigure[big]{ \includegraphics[width=0.5\textwidth,height=10cm]{eyebrows_mask.eps}} } \end{tabular} \caption{Big caption} \end{figure}
参考:http://blog.sina.com.cn/s/blog_5e16f1770100h5m3.html
其实真正的高手latex画图是这样画的,下面一段代码引自Arnold的一篇论文,可以运行一下,看看什么效果。
\begin{picture}(6,6)
\thicklines
\put(0,0){\line(1,1){6}}
\put(0,6){\line(1,-1){3}}
\put(1,1){\circle*{0.2}}
\put(1,5){\circle*{0.2}}
\put(5,5){\circle*{0.2}}
\thinlines
\multiput(1,1)(0,0.2){20}{\line(0,1){0.1}}
\multiput(1,5)(0.2,0){20}{\line(1,0){0.1}}
\put(1,5.2){\mbox{$A$}}
\put(1,0.5){\mbox{$C$}}
\put(4.5,5.2){\mbox{$B$}}
\end{picture}
转自:http://slayerhs.blog.163.com/blog/static/1693616742012845406882/
LaTeX多子图分页
宏包:
\usepackage[centerlast]{caption2}
\usepackage{subfigure}
方案:
使用两个图形环境,欺骗下LaTeX的计数器即可
\begin{figure}
\centering
\subfigure[First Part]{%
\label{fig:graphics:a}% label for subfigure
\includegraphics[width=\textwidth]{wide.eps}}%
\caption{Large Graphics}%
\label{fig:graphics}% label for figure
\end{figure}
\addtocounter{figure}{-1}%先欺骗LaTeX图形计数器
\begin{figure}
\addtocounter{figure}{1} %再告诉LaTeX图形计数器真相
\centering
\subfigure[Second Part]{%
\label{fig:graphics:b}% label for subfigure
\includegraphics[width=\textwidth]{wide.eps}}%
\caption{Large Graphics (con't)}%
\end{figure}转自:http://www.zeuux.com/blog/content/3671/