`
wwwjjq
  • 浏览: 55865 次
社区版块
存档分类
最新评论

LaTeX graphics

 
阅读更多
http://blog.csdn.net/shenlan211314/article/details/625177


一、不要使用依赖于图形放置位置的文本。使用如“ 这幅图...” 或“ 下面的图形...” 等短语要求所指的图形需在固定位置。而像“ 图5...” 这样的短语则允许图形出现在任意位置。

二、放松。一些使用者在发现图形没有十分准确的出现在他们所想要的位置时,往往非常着急。这没有必要,图形的放置是LATEX 的工作,最好放松一些。”



1.为什么Latex不推荐我们让图形准确出现在放置的位置呢?“因为那会导致糟糕的分页,将大片的空白留在页面下方。为得到专家级的排版效果,作者不得不手工调整图形的位置。这种工作是非常乏味的,尤其是几乎每次修改文档都得这样做一次。”

Knuth同学当年做tex时,目的就是让我们将注意力集中在文章的内容,而不是排版上。尤其是在做长文章或书时,用word每次修改时插入新的文字都要重新调整图片,很不方便。(其实还好啦,我们的文章都短的像兔子尾巴就觉得word也挺好的)

2.浮动格式

一个典型的插图语句

\begin{figure}[htbp]

\centering

\includegraphics[width=6.5cm]{graph.eps}

\caption{This is an inserted EPS graphic} \label{fig:graph}

\end{figure}

其中[htbp]就是浮动格式

“h 当前位置。将图形放置在正文文本中给出该图形环境的地方。如果本页所剩的页面不够,这一参数将不起作用。

t 顶部。将图形放置在页面的顶部。

b 底部。将图形放置在页面的底部。

p 浮动页。将图形放置在一只允许有浮动对象的页面上。”

我一般使用[htb]这样的组合,只用[h]是没有用的(原因请读者思考)。这样组合的意思就是latex会尽量满足排在前面的浮动格式,就是h-t-b这个顺序,让排版的效果尽量好。反正记住,放轻松。
3、        如果你就是要插在你想插的位置怎么办?

我会这样做:如果tex不让你插在你想插的位置,说明你的图片太大了,你可以试试调整[width=6.5cm]中的大小,让它能够插得下,其实我们在word中也是这样做的。推荐使用\textwidth这个单位。但还是那句话,不要太勉强。



4、        一些图片的并排

如果想要这样的效果,要两张图并列,或几张图排在一起。可以试试下面的模板,效果请自己运行



模板一

\begin{figure}[htbp]

  \centering

\subfigure[sin1]{\label{fig:fft:a}

\begin{minipage}[c]{0.5\textwidth}

\centering

  \includegraphics[width=6.5cm]{sin1.eps}

\end{minipage}%

}%注意这个”%”绝对不能省,可以试试不打%的效果

\subfigure[sin2]{

\begin{minipage}[c]{0.5\textwidth}

\centering

  \includegraphics[width=6.5cm]{sin2.eps}

\end{minipage}

}

\caption{fft}\label{fig:fft}

\end{figure}

模板二

\begin{figure}[htbp]

  \centering

\begin{minipage}[c]{0.5\textwidth}

\centering

  \includegraphics[width=6.5cm]{sin1.eps}

\end{minipage}%

}%注意这个”%”绝对不能省,可以试试不打%的效果

\begin{minipage}[c]{0.5\textwidth}

\centering

  \includegraphics[width=6.5cm]{sin2.eps}

\end{minipage}

}

\caption{fft}\label{fig:fft}

\end{figure}



5、        其他细节可以详见开头说的那本书。还有关于图片的格式,如果用Latex编译的话只能用eps格式的图片,matlab就存为eps,其他用软件转吧,但是如果用Latex2pdf编译的话好像就能用jpg,eps反而不可以。但推荐使用eps,我试验下来matlab的图eps质量好,但好像不太支持中文,其实也有办法解决,我所知道的方法是用Psfrag宏包,详细方法还是参见那本书,但是我觉得用英文就行了嘛。



6、        其实真正的高手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}
分享到:
评论

相关推荐

    The LaTeX Graphics Companion英文版

    The LaTeX Graphics Companion 英文电子版,原书第二版,包含章节书签

    The LaTeX Graphics Companion 2ED

    详细介绍了在 LaTeX 中的各种绘图工具。包括数学绘图、游戏排版等等。是英文版的。

    latex graphics (latex 作图)

    LaTeX 排版中插入图片的详细文档,十分实用,对于正在学习LaTeX排版的朋友来说是必不可少且不可多得的文档,本文档本身就排版的很漂亮。

    The LaTeX graphics companion

    看标题就知道了,这是关于LaTeX排版的图形操作方面的书籍。清晰度一般,一个pdf页面有两个纸张页面。

    Tikz学习笔记(高清带书签)

    Latex中最常用的绘图宏包tikz的学习笔记,国内关于tikz的中文学习资料很少,这份文档尽善尽美,640多页详细介绍了tikz的坐标系和各种扩展程序库,是入门tikz不可多得的中文手册。

    Using Imported Graphics In LaTex2e 中文版

    Using Imported Graphics In LaTex2e 中文版, 对大家写文档论文会有帮助

    Latex学习教程

    前段时间发表论文,需要Latex进行排版,但之前没有接触过,所以上网搜了一些相关教程,希望对大家有些帮助。...1、LaTex graphics 2、LaTex教程 3、LATEX入门与提高 4、LaTeX中文环境使用(Windows)简介

    LaTeX math and graphics

    教你如何用LaTeX处理数学公式和图形! 英文的!

    Latex插图指南源代码--Using Import graphics in LATEX

    本书是Keith Reckdahl 所著的\Using Imported Graphics In LATEX2"" 一文的中 文译本,并加入少许译者自己的使用心得所成。在用LATEX2" 编写论文、书稿时,经常 要遇到使用图形的情况,本书将讲述如何在LATEX2" 文件...

    LaTeX.Cookbook.178439514

    An example-driven approach to creating stunning graphics directly within LaTeX Table of Contents Chapter 1: The Variety of Document Types Chapter 2: Tuning the Text Chapter 3: Adjusting Fonts Chapter...

    latex插图指南(latex下的插图说明)

    latex的插图说明,新版修正了书签乱码和其他一些问题,推荐

    LaTeX and Friends Springer pdf

    The book presents the most recent techniques for presenting data plots, complex graphics, and computer presentations, but does not require previous knowledge. However, it is also a reference for the ...

    Using Imported Graphics in LaTeX2e

    This article by Keith Reckdahl shows you how to do (almost) anything with graphics: side-by-side, rotated, etc.

    LaTex 参考手册

    Introduction to LATEX2ε Or LATEX2ε in 141 minutes 这是目前所找到的一份关于Tex的参考手册,pdf格式 --------------------------------------------- LATEX [1] is a typesetting system that is very suitable...

    《LATEX 图形宏包介绍》Packages in the ‘graphics’ bundle

    This document serves as a user-manual for the packages color, graphics, and graphicx. Further documentation may be obtained by processing the source (dtx) files of the individual packages.

    LaTeX Cookbook pdf 0分

    An example-driven approach to creating stunning graphics directly within LaTeX Who This Book Is For If you already know the basics of LaTeX and you like to get fast, efficient solutions, this is the ...

    LaTex 图形工具

    PSTricks is a set of macros that allow the inclusion of PostScript drawings directly inside TeX or LaTeX code. It is originally the work of Professor Timothy Van Zandt and in recent years it has been ...

    LaTeX Cookbook

    You will also learn how to create graphics within LaTeX, and find vital tips to help you build diagrams with minimum fuss. If that isn't enough, the book also shows you how to use new engines XeTeX ...

    Latex转换工具(JPG,BMP, GIF, TIF, PNG 转化成eps格式)

    添加FreeImage.dll,直接可用,谢谢前辈提供这些牛逼的工具!

    Latex使用文档

    graphics.pdf verbatim.pdf dotguide.pdf fancyhdr_chs.pdf fancyhdr.pdf fonts.txt geometry.pdf IEEEtran_HOWTO.pdf latex.tar.gz listings.pdf longtable.pdf lshort.pdf lshort_zh.pdf ltxprimer-1.0.pdf ...

Global site tag (gtag.js) - Google Analytics