sdnuwxj的个人博客分享 http://blog.sciencenet.cn/u/sdnuwxj

博文

latex进阶-二-图片的插入

已有 7945 次阅读 2015-5-1 15:27 |个人分类:软件学习|系统分类:科研笔记| LaTex

常见图片插入命令

常用选项[htbp]是浮动格式:
『h』当前位置。将图形放置在正文文本中给出该图形环境的地方。如果本页所剩的页面不够,这一参数将不起作用。
『t』顶部。将图形放置在页面的顶部。
『b』底部。将图形放置在页面的底部。
『p』浮动页。将图形放置在一只允许有浮动对象的页面上。

一般使用[htb]这样的组合,只用[h]是没有用的。这样组合的意思就是latex会尽量满足排在前面的浮动格式,就是h-t-b这个顺序,让排版的效果尽量好。
!h 只是试图放在当前位置。如果页面剩下的部分放不下,还是会跑到下一页的。一般页言,用 [!h] 选项经常会出现不能正确放置的问题,所以常用 [ht]、[htbp] 等。



双栏正文插入单栏图片并自定义注释位置

图片插入命令:

begin{figure*}


.........


end{figure*}



图片标题位于右侧


begin{figure*}


 centering


 
  {% BEGIN EVEN-PAGE FIGURE


 begin{minipage}[c]{0.55textwidth}


   includegraphics[width=11 cm]{fig2-h.eps}


 end{minipage}%


 hspace{0.1textwidth}%


 begin{minipage}[c]{0.3textwidth}


   centering


   caption{label{temperature} The images.}


 end{minipage}%


 }% END EVEN-PAGE FIGURE


end{figure*}



参阅:24.2 图形内侧标题
上节图 24.1 中将标题放在图形的左侧,而对于双面版式 的文档,常常会希望将标题置于图形的内侧。这时可用 ifthen 宏包 的 ifthenelse 命令来指定对奇数页和偶数页所使用的不同代码。例如:


usepackage{ifthen}
...
begin{figure}
 centering
 ifthenelse{isodd{pageref{fig:side:caption}}}
 {% BEGIN ODD-PAGE FIGURE
 begin{minipage}[c]{.45textwidth}
   centering
   caption{Caption on the Side}
   label{fig:side:caption}
 end{minipage}%
 hspace{0.05textwidth}%
 begin{minipage}[c]{.45textwidth}
   includegraphics[width=textwidth]{graphic.eps}
 end{minipage}%
 }% END ODD-PAGE FIGURE
 {% BEGIN EVEN-PAGE FIGURE
 begin{minipage}[c]{.45textwidth}
   includegraphics[width=textwidth]{graphic.eps}
 end{minipage}%
 hspace{0.05textwidth}%
 begin{minipage}[c]{.45textwidth}
   centering
   caption{Caption on the Side}
   label{fig:side:caption}
 end{minipage}%
 }% END EVEN-PAGE FIGURE
end{figure}

生成的图形其标题总在图形的内侧。



https://blog.sciencenet.cn/blog-400681-886697.html


下一篇:latex进阶-三-20150909
收藏 IP: 202.113.31.*| 热度|

0

该博文允许注册用户评论 请点击登录 评论 (0 个评论)

数据加载中...

Archiver|手机版|科学网 ( 京ICP备07017567号-12 )

GMT+8, 2024-9-20 05:11

Powered by ScienceNet.cn

Copyright © 2007- 中国科学报社

返回顶部