国产一级a片免费看高清,亚洲熟女中文字幕在线视频,黄三级高清在线播放,免费黄色视频在线看

打開APP
userphoto
未登錄

開通VIP,暢享免費電子書等14項超值服

開通VIP
[轉(zhuǎn)載]Latex相關資源匯總

前言

      latex并不難,latex也不是藝術,而是給Knowledge Engineers的一個撰文工具,僅此而已。一篇文章真正的價值在于里面的發(fā)現(xiàn)和思維邏輯,文本、圖片、排版都只是形式罷了。如果沒有好的內(nèi)容,就是做的再漂亮,也不會得到別人的認可??墒?,大家都是俗人,都還是會喜歡美輪美奐的東西。形式很多時候也不可缺,可以幫助推銷自己的paper。認同了這兩點,可以開始下面的閱讀。

 

Latex簡介

     TeX是計算機科學家圖靈獎得主Knuth教授設計的一款權威的科技論文排版軟件!更重要的它是開源 (Open Source)的,Knuth教授無償公開了它的所有源代碼。正因為這個原因,無數(shù)的愛好者們大膽嘗試TeX。并在其基礎上開發(fā)了一個宏集 ――Latex。Latex方便好用,被廣泛傳播,成了當今世界科技界最權威的論文排版軟件。

     TeX和LaTeX排版軟件和MS的Word軟件不同,不個是''所見即所得''(WYSIWYG,what you is see what you get),一個是''所想即所得''(WYWWYG,what you want what you get)。風格上迥然不同,因此需要稍微改變一下自己的習慣。

TeX/LaTeX是一種計算機文檔制作語言,所以它有
a. 源代碼。 包括故障區(qū)域和\begin{document}之前的部分;
b. 編譯環(huán)境。 包括TeX/LaTeX發(fā)行版本和版本號,比如ctex-2.4.5-7。
c. 編譯方法。 比如生成pdf文件,就有pdflatex、latex+dvipdfm(x)、latex+dvips+ps2pdf等多種方法。有時ps2pdf無法完成格式轉(zhuǎn)換,可以用acrobat distiller。
Tex的workflow如下圖所示:


從tex文件到pdf文件的編譯序列很多,有pdflatex、latex + dvipdfm(x)、latex + dvips + ps2pdf。個人推薦latex + dvipdfmx。這樣的編譯遍數(shù)較少,生成速度較快。生成的pdf文件字體更清晰。

關于TeX(LaTeX)的學習,毫無疑問,Knuth(高德納):Donald~E.~Knuth, ''The \TeX book'', Addison-Wesley, 1984,\%7Eknuth/,是權威之選,本書排版堪稱完美,從中可以看出大師的魅力。
此外,最好的一個簡短詳細的文獻是''lshort'',這個中文都有(一份不太簡短的LaTeX介紹). 
最后,IEEEtran_HOWTO (in IEEEtrans template)也有很不錯的latex用法介紹。http://www.ieee.org/web/publications/authors/transjnl/index.html 
CTex下載: http://www.ctex.org/HomePage 
常用論壇,答疑解惑: http://bbs.ctex.org 
搜索和下載package的站點:http://www.ctan.org/ 
一個有趣的blog: http://latex.yo2.cn/articles/latex_blog.html

Latex下的繪圖工具

寫文章最重要的就是形象思維,精致的圖能給Reviewer良好的第一印象,也體現(xiàn)了Author的專業(yè)與否。 各IEEE journal都只接受矢量圖。使用點陣圖的paper很可能在上傳的時候被拒絕。畫矢量圖的常用工具如下:
Adobe Illustrator: 鼠標繪圖中最好的工具,做出來的圖可以很藝術化。Adobe的東西強于CorelDraw。自己整理了一個網(wǎng)上的教程,下次上傳上來。
MetaPost: 一種功能強大但比較底層的繪圖語言。差不多就在DC的級別畫像素點。適合畫幾何圖形,尤其是因為它遞歸函數(shù)調(diào)用的能力。
PGF/TikZ: 語言描述層面的繪圖工具。在node和connection那個邏輯層面上的,有節(jié)點自動布局和自動布線的功能。用它畫Venn圖的語法也很簡單。
visio: 適合畫流程圖.
latexcad: 在圖上面附加Label。Label代碼全部嵌入在tex的源文件里面。
xymatrix: 適合pi演算那樣的公式推導。
數(shù)據(jù)圖
gnuplot:
matlab:
origin:
關于TeX和LaTeX的插圖方面可以關參考王磊的《latex中文插圖指南》,配合它的源文件,可以非常有效學習和掌握插圖方面的技巧。

MetaPost相關資料

 

MetaPost適合幾何圖形繪制,有強大的遞歸執(zhí)行能力,比如下面的分形結構。

 

MetaPost Examples:  http://www.math.zju.edu.cn/ligangliu/LaTeXForum/MetaPost/Metapost_Examples.htm
MetaPost Intro: http://people.ku.edu/~syliu/shredderyin/metapost.html
MetaPost Configuration http://huagw.blog.hexun.com/15332414_d.html
王垠的個人主頁 http://people.ku.edu/~syliu/shredderyin/
John Hobby為MetaPost寫的用戶手冊''A User's Manual for MetaPost''
MPS的圖片文件轉(zhuǎn)EPS - 不用再糾纏于prologues的設置 http://www.ida.liu.se/~joned/download/mps2eps/
Learning METAPOST by Doing: http://www.tlhiv.org/MetaPost/documentation/MetaPost_Learning.pdf
MetaPost illustration examples (for a mathematics textbook): http://www.topology.org/tex/conc/mp/

PGF/TikZ

 

1. 什么是pgf?
pgf是一個在tex系統(tǒng)中的畫圖宏包,tex尤其是beamer中使用pgf作圖,“作精確圖還比較方便, 色彩銳麗”(huangzh73)。除了可以精確的作圖外,對于某些不要求精確控制的圖形繪制,如:流程圖,樹圖,等等,也提供了簡便易用的支持。

PGF and TikZ examples gallery: http://www.fauskes.net/pgftikzexamples/
A comprehensive list of PGF and TikZ examples: http://www.texample.net/tikz/examples/all/list/
Edward Tufte’s book Beautiful evidence:  http://www.edwardtufte.com/bboard/q-and-a-fetch-msg?msg_id=0001TV&topic_id=1

有個法國教師做了2d幾何圖的擴展包tkz-2d:
主頁: http://www.altermundus.fr/
下載: http://www.altermundus.fr/pages/downloads/

下面是一些自己用過的例子
數(shù)據(jù)流圖:http://www.fauskes.net/pgftikzexamples/simple-flow-chart/
基于數(shù)據(jù)流的系統(tǒng)架構圖:http://www.fauskes.net/pgftikzexamples/inertial-navigation-system/
時序圖: http://www.fauskes.net/pgftikzexamples/pgf-umlsd/
二維的數(shù)據(jù)圖plot2d:
http://www.fauskes.net/pgftikzexamples/tkz-plot2d/
http://www.fauskes.net/pgftikzexamples/pgfplots/
有限狀態(tài)機圖:http://www.fauskes.net/pgftikzexamples/state-machine/
二維幾何圖:http://www.fauskes.net/pgftikzexamples/tkz-2d/
三維幾何圖:http://www.fauskes.net/pgftikzexamples/3d-cone/
正則表達式圖:http://www.fauskes.net/pgftikzexamples/diagram-chains/
圖論相關圖樣:http://www.fauskes.net/pgftikzexamples/diagram-chains/
分類圖:http://www.fauskes.net/pgftikzexamples/computer-science-mindmap/
公式說明圖:http://www.fauskes.net/pgftikzexamples/beamer-arrows/ 
負反饋系統(tǒng)控制圖:http://www.fauskes.net/pgftikzexamples/control-system-principles/
便簽條圖:http://www.fauskes.net/pgftikzexamples/boxes-with-text-and-math/
繪制二維迷宮:http://www.fauskes.net/pgftikzexamples/maze/
神經(jīng)網(wǎng)絡圖:http://www.fauskes.net/pgftikzexamples/neural-network/
三維曲面: http://cs.nju.edu.cn/yangxc/dcc2003.files/matlab/matlab/2_3_2.htm
pgf畫Venn圖的例子 http://bbs.ctex.org/viewthread.php?tid=36595
下面是用MetaPost畫Venn圖的另一個例子 http://bbs.ctex.org/viewthread.php?tid=35348

2. pgf的作者?
pgf也是beamer 的作者 Till Tantau 教授開發(fā)的. 起初只有 pgf, 后來有了 tikz and pgf 宏包的說法, 一般還是稱為 pgf 宏包. 在使用中 \usepackage{tikz} 就自動加入了 pgf. 也許 tikz 可以認為是 pgf 進一步發(fā)展的產(chǎn)物.正因為兩者出自同一個牛人之手,所以beamer和pgf結合使用確實非常的完美。

3.安裝和更新的方法:  
pgf在ctex下的安裝可參考beamer的安裝。它們的關系差不多是beamer requires pgf,pgf requires xcolor。

Matlab畫數(shù)據(jù)圖的一個例子

 

hand = plot(xx, yy, 'k^-.', xx, yy, 'ko-.', xx, yy, 'b^--', xx, yy, 'bo--', xx, yy, 'r^-', xx, yy, 'ro-');
set(hand, 'LineWidth', 2);
hand = legend('label1', 'label2', 'label3', 'label4', 'label5', 'label6', 1);
set(hand, 'FontSize', 14);
hand = xlabel('xlabel');
set(hand, 'FontSize', 14);
hand = ylabel('ylabel');
set(hand, 'FontSize', 14);
xlim([xmin, xmax]);
ylim([xmin, ymax]);
還沒找到怎么設置XAxis和YAxis的字體大小的辦法。

Origin畫的數(shù)據(jù)圖比Matlab好看些,但有時也感覺Origin太艷麗了,不那么正統(tǒng)。也還推薦gnuPlot。

GnuPlot的安裝和使用

個人感覺GnuPlot做出來的圖沒有Pgf和Origin的效果好。
推薦資料: Plotting with GnuPlot:   http://f3wm.free.fr/linux/gnuplot.html

1. Windows下的安裝
安裝很簡單。在 http://www.gnuplot.info/ 下載安裝包gp424win32.zip. 解壓后找到bin/wgnuplot.exe,雙擊運行即可。
測試一下安裝。運行命令:
gnuplot> plot [-3.14:3.14] sin(x)

2. 和Latex的整合
gnuplot提供了直接輸出tex文件的功能,只需要把output設置為latex就可以了。
在命令行下輸入:
set terminal latex
set output "sin.tex"
plot [-3.14:3.14] sin(x)     
把這個文件直接插入你的文章中,例如
\begin{figure}
  \begin{center}
    \input{sin.tex}
  \end{center}
\end{figure}

3. 生成xy axis和label
set terminal latex   
set output "sinagain.tex"
set size 5/5.,4/3.  #設置圖片的大小
set format xy "$%g$" #設置x、y軸文字的格式
set title "This is a plot of $y=sin(x)$" #設置圖片標題
set xlabel "This is the $x$ axis" #設置x軸的文字
set ylabel "This is the $y$ axis" #設置y軸的文字
plot [0:6.28] [0:1] sin(x) 

4. 多條曲線的對比
set terminal latex
set output "combine.tex"
set size 5/5.,4/3.  #設置圖片的大小
set format xy "$%g$"
set title "Combination"
set xlabel "$x$ axis"
set ylabel "$y$ axis"
plot [-3.14:3.14] 0.2*x with points, sin(x) with lines

5. 一個3d作圖和并列子圖顯示的例子 
set terminal latex
set output "tic.tex"
set format y "$%g$"
set format x "$%.2f$"
set title "This is $\sin(x)$"
set xlabel "This is the $x$ axis"
set ylabel "$\sin(x)$"
set xtics -pi, pi/4 #設置x的間距
plot [-pi:pi] sin(x)
set terminal latex
set output 'plot3d.tex'
set samples 20, 20
set isosamples 21, 21
set contour base
set cntrparam levels auto 10
set title "3D gnuplot demo - some more interesting contours" 0.000000,0.000000  font ""
set xlabel "X axis" -5.000000,-2.000000  font ""
set ylabel "Y axis" 4.000000,-1.000000  font ""
set zlabel "Z axis" 0.000000,0.000000  font ""
splot [x=-3:3] [y=-3:3] sin(x) * cos(y)

\begin{figure*}[!t]
\centerline{%
\subfigure[Case I]{\input{tic.tex}%
\label{fig_first_case}}
\hfil
\subfigure[Case II]{\input{plot3d.tex}%
\label{fig_second_case}}%
}
\caption{Simulation results}
\label{fig_sim}
\end{figure*}

LaTeX2html安裝及在winEdt界面中的配置

 

任何Academic person都有需要構建個人主頁,加強與外界的交流;撰寫課件,教書育人。Html因為其易訪問性成為最適合的格式。Latex2html和TtH能將tex文檔編譯成html,并較好的支持公式的輸出,當然它們look and feel也比較academic,可以用來裝學者。

 

系統(tǒng)
Windows XP SP2 
CTeX-2.4.6-Full 
Perl編譯器:ActivePerl 5.10.0.1003 for Windows (x86). http://www.activestate.com/Products/Downlo...x?id=ActivePerl
NetPBM 圖形軟件(CTeX-2.4.6-Ful l沒有安裝) :現(xiàn)在網(wǎng)上很難找到合適的版本(據(jù)說1.2是work的).用TtH還是比Latex2html簡單一點. 
Postscript 解釋器: CTeX-2.4.6-Full 已安裝好了Ghostscript,在目錄C:\CTeX\Ghostgum\下。
注冊序列碼如下。Name: Registered  s/n: 195938022 5598
其余的安裝參考:http://bbs.ctex.org/redirect.php?fid=7&tid=43334&goto=nextnewset

Tex4ht在CTex中的配置,參考 http://xaero.mmiyy.cn/notes/latex/tex4ht.htm
1. 把C:\CTeX\WinEdt\Bin\TeX\TtH.bat改名為TtH.bat.bak
2. 把C:\CTeX\...\htlatex.bat(具體路徑在C:\CTex下面search一下,不同CTex版本不同)復制到C:\CTeX\WinEdt\Bin\TeX\下,改名為TtH.bat,則Accessories/HTML/TtH(Tex—>HTML)菜單變得可用。

Tex4ht中數(shù)學公式的轉(zhuǎn)換

Tex4ht 先將數(shù)學公式轉(zhuǎn)為dvi, 再利用外部軟件, 如:ImageMagick, 轉(zhuǎn)換為.png, .jpg or .gif文件。
依據(jù)我的經(jīng)驗,尚需要以下步驟才能使Tex4Ht正確轉(zhuǎn)換數(shù)學公式為png文件:
4. 安裝ImageMagick 最新版本,Google搜索可以找到很多下載地址。 注意,為了避免在轉(zhuǎn)換Tex時出現(xiàn)莫明其妙錯誤, Ctex以及ImageMagick安裝目錄中不要帶有空格,中文等特殊字符。
5. 測試ImageMagick是否安裝成功,運行終端程序cmd,輸入convert, 如果能正確找到文件就安裝成功。
6. 依然要修改 %Ctex%\texmf\tex4ht\base\win32\tex4ht.env 文件,找到:alternative instructions for old versions of convert 將該節(jié)中 Gconvert 前的 % 全部去掉。
至此 大功告成。 應該可能正常轉(zhuǎn)換帶數(shù)學符號的, 可以試試以下Tex文檔:

\documentclass{article}
\usepackage{CJK}
\usepackage{tex4ht}
\begin{document}
\begin{CJK*}{GBK}{song}
測試文檔\\ test document\\
\begin{math}\frac{\pi}{\gamma}
\\\frac{a+b-c}{d+e-k }
\end{math}
\end{CJK*}
\end{document}

Beamer相關資料

Slides和Presentation的重要性就不必說了。
A Beamer Quickstart (推薦) :http://heather.cs.ucdavis.edu/~matloff/beamer.html
A practical guide to beamer: http://faq.ktug.or.kr/wiki/uploads/beamer_guide.pdf
黃正華老師的總結: http://bbs.ctex.org/viewthread.php?tid=27695&extra=&page=1
Beamer的在線教程: http://www.math.umbc.edu/~rouben/beamer/quickstart.html
Beamer的安裝:http://dsec.math.pku.edu.cn/~yuhj/wiki/TeXSlides.html#sec-1
一個即刻上手的模板:http://www.bossh.net/forums/index.php?showtopic=1638
推薦一個好的Beamer模板庫-非常簡潔: http://www.math.sinica.edu.tw/www/tex/beamer_template.jsp
Beamer Tips: http://xueruini.myipcn.org/publish/TeX/Beamer.html
用 Beamer 做相冊:  http://linux.cs.nthu.edu.tw/~clark/nb/archives/2008-02-03T23_32_45.php

 

 

beamer的安裝配置
1、下載beamer:http://sourceforge.net/projects/latex-beamer/
  下載pgf:http://sourceforge.net/projects/pgf/
  下載xcolor:http://sourceforge.net/projects/xcolor/
2、解壓到各自文件夾beamer、pgf、xcolor
3、將beamer、pgf、xcolor復制到TeXHOME\ctex\localtextmf\tex\latex,并刪除 TeXHOME/texmf/tex/latex/ 下的beamer、pgf、xcolor
4、進入TeXHOME\tex\localtextmf\tex\latex\xcolor,用“記事本”打開 xcolor.ins,啟動cmd,定位到這個文件夾
5、運行命令: `latex xcolor.ins',`latex xcolor.dtx',`latex xcolor.dtx',`makeindex -s gind.ist xcolor.idx',`latex xcolor.dtx',`latex xcolor.dtx'
(這些命令在xcolor.ins文件里都寫出來了)
6、測試安裝是否成功,運行命令:`latex xcolor1.tex', `latex xcolor1.tex'
7、然后運行 WinEdt 的 Accessories 菜單下 MikTex options 的 refresh now 即可。

注意事項: 當beamer做幻燈片時,需要使用 \usepackage[square, authoryear, comma]{natbib} 和 \citep{xxx} 做文章引用。因為用 natbib 和 citep 才能在beamer下很好的顯示 square bracket。另外,做幻燈時,推薦用 \bibliographystyle{authordate1}。這樣方便通過引用標記(作者+年份)看到該引文的分量。

Bibtex的使用 

Reviewer在讀你的Paper時,第一件事是讀標題,了解你的Niche,你的Research要解決的問題;第二件事就是查閱你的Bibliography,目的是: (1) 看看你有沒有很合適的引用他的文章(Academic guys對自己的work的impact ratio是很在意的)。 (2) 也同時看看你引用的文章都來自于什么級別的刊物和會議,大概的年份分布(有沒有反映最新的研究進展,從這里就能看出survey about related work做得夠不夠,治學嚴謹與否).Experts in this field 也會注意本領域的經(jīng)典文章有沒有引用. (3) 查看一下Paper quality如何.bibliography算是paper的小角落.處理不好就會給reviewers這篇paper文字工作不夠細致的印象. 比如說, 作者名字縮寫, 會議名的縮寫, etc. 這方面別全依賴于工具,如reference manager或endnote. 它們的item也都是從IEEE, ACM 這樣的站點下載的。

Bibtex的作用是從.bib生成latex可直接識別的\bibitem的.bbl格式。這個格式轉(zhuǎn)換的風格由BibTex Style (BST)file決定。常用的BST如下:
IEEEtranBST:http://www.ctan.org/tex-archive/macros/latex/contrib/IEEEtran/bibtex/
中文的文章的bst:http://bbs.ctex.org/viewthread.php?tid=33591

為了正確的生成Reference List, makefile需要調(diào)用latex(或pdflatex)三遍。
latex %texfilename%
bibtex %texfilename%
latex %texfilename%
latex %texfilename%
參考鏈接 http://bbs.ctex.org/viewthread.php?action=printable&tid=950

在正文里面引用時,IEEE模板需要引用cite package。具體參考IEEEtranBST_howto
\ifCLASSOPTIONcompsoc
% requires cite.sty v4.0 or later (November 2003)
\usepackage[nocompress]{cite}
\else
\usepackage{cite}
\fi
正文里使用\cite{%label1%,%label2%,%label3%}命令。
新手注意:Reference list里面只會顯示那些正文里面引用了的那些文章。如果正文沒有\(zhòng)cite,別怪bibtex報錯。另外,對圖片、表格、公式的引用是\ref命令,別搞混了。 參考:http://latex.yo2.cn/articles/latex-bibtex-introduction.html

Other Tips 細節(jié)決定成敗


怎么輸入左單引號、左雙引號、右單引號、有雙引號?
左單引號:`(鍵盤上1旁邊的那個);左雙引號:``;
右單引號:'(鍵盤分號的右邊那個);右雙引號:''或"。
在普通模式下,''和"是一樣的;但在數(shù)學模式下,''是兩個導數(shù)符號。

怎么輸入“度數(shù)”之類的單位?
試試SIunits包。

我用了bib文件來保存citation,但所有title里面的單詞都成了小寫,怎么保持一些abbrevation的大寫狀態(tài)?
用括號把title中的abbreviation框起來,如下:
{TOSSIM}: accurate and scalable simulation of entire TinyOS applications。

怎么把"Chapter x"換成“第x章”,"Figure x"換成“圖x”,"Theorem"換成“定理”, "Proof"換成“證明”……?
前兩個建議用CCT或CJK的\CJKcaption{GB}命令來解決。
第三個用\newtheorem{theorem}{定理}。以后這么用:
       \begin{theorem}...\end{theorem}
第四個用\renewcommand{\proofname}{證明}可以解決(需要amsmath包)。
類似的問題可以參考CJK的GB.cap和amsmath的文檔。

我要寫算法偽代碼/C/C++/Java...代碼,怎么辦?
listings包不錯,不妨一試。算法偽代碼么,個人覺得algorithm2e不錯。

latex提供哪些定理環(huán)境?
很遺憾,沒有。但是我們可以自己定義,而且amsthm包已經(jīng)預定義了三種style。
下面是我自己常用的定義,大家作個參考吧。:)
  \theoremstyle{plain}
  \newtheorem{thm}{Theorem}
  \newtheorem{lem}[thm]{Lemma}
  \newtheorem{cor}[thm]{Corollary}
  \newtheorem{clm}[thm]{Claim}
  \newtheorem{prop}{Proposition}
  \newtheorem{fact}{Fact}
  \theoremstyle{definition}
  \newtheorem{defi}{Definition}
  \newtheorem{example}{Example}
  \theoremstyle{remark}
  \newtheorem{remark}{Remark}
  \newtheorem{proviso}{Proviso}
amsthm還定義了proof環(huán)境,最后會自動加一個QED符號。很方便吧?
需要提醒大家:它和一些會議、雜志提供的文檔類沖突。這些會議、雜志提供的文檔類一般會提供類似的環(huán)境,大家要看看它們的文檔。

怎么插入一張圖片到latex中?
\usepackage{graphicx}
\includegraphics{xxxx.yyy}
但是這樣還沒有搞定。LaTeX在編譯的時候必須知道圖片的大小尺寸,稱作bounding   box。以下方法可以告訴LaTeX bounding box:
注意:Bounding Box的問題,編者的經(jīng)驗是用GSView的File->PS to EPS和AcrobatRd的Document->Crop Pages完成比較好。這樣不會損害矢量圖特性,能被各IEEE conference & journal接受。

以下幾種情況要善于使用"~"的小空格
1. 中文與英文之間一般加入小空隙排出來才好看,要加上"~"。
2. 中文與行內(nèi)公式之間也要加。
3. 如果"."不表示句子的結束,應加入"\空格",如"Mr. Wang"應輸入為"Mr.\空格Wang"。 因為當"."表示句號時,TeX會加入一段額外的空隙。
4. TeX遇到一個單詞以大寫字母結束時會自動認為這并不是句子的結束,故這種情況不必加入\空格。但如果確實是句子的結束,就需要在"."前加上"\@”,如“I study in SJTU\@.”。
5. 對Figure、Equation、Table的引用時,要加"~",比如
\figurename~\ref{%label%}
Tab.~\ref{%label%}
Eq.~\ref{%label%}

我的系統(tǒng)crash,論文稿件都丟了,怎么辦?
丟了的話就沒什么特別的好辦法了,去找IT guys做disk recovery吧。這很麻煩,所以還是建議預先使用CVS或SVN來做冗余備份和version control。這樣boss也方便查看你的進度,一舉多得。
WinCVS的使用參考  http://203.68.102.46/online_book/content.php?chapter_sn=223

如何配置WinEdit的界面Layout? 比如說,達到下面的簡潔形式。

 
Menu的Options->Apperances->Docking可以改變Layout的配置?;緦儆贐orderLayout。
要控制各類Viewer窗口的顯示與否,對Menu點鼠標右鍵,就可以看到相關選項。

如何壓縮論文篇幅?
主要靠文字的精煉?;蛘甙炎C明推導放到Appendix (4journal)。
適當縮小圖片或者縮小圖片與文字的間隔。用命令
\begin{figure}[htb]
......
\vspace{-0.3cm}
\end{figure}

如何在pdf文檔中生成書簽?

\usepackage{lineno}
\usepackage{indentfirst}
\usepackage{hyperref}
\usepackage{natbib}

\section{} \subsectioin{}
即可。 

如何生成hyper reference?
\usepackage{hyperref}
\hypersetup{
    unicode=false,          % non-Latin characters in Acrobat’s bookmarks
    pdftoolbar=true,        % show Acrobat toolbar?
    pdfmenubar=true,        % show Acrobat menu?
    pdffitwindow=true,      % page fit to window when opened
    pdftitle={My title},    % title
    pdfauthor={Author},     % author
    pdfsubject={Subject},   % subject of the document
    pdfcreator={Creator},   % creator of the document
    pdfproducer={Producer}, % producer of the document
    pdfkeywords={keywords}, % list of keywords
    pdfnewwindow=true,      % links in new window
    colorlinks=true,        % false: boxed links; true: colored links
    linkcolor=red,          % color of internal links
    citecolor=green,        % color of links to bibliography
    filecolor=magenta,      % color of file links
    urlcolor=cyan           % color of external links
}
\href{...url...}{...caption...}
具體如何在pdf文檔里面加入hyperref, bookmark, thumbnail,參考http://www.mpch-mainz.mpg.de/~joeckel/pdflatex/

Latex里面有沒有比較好看的手寫字體?
我自己喜歡lucida casual。
下面是一個gallery: http://tug.org/store/lucida/complete.html
這是sample文檔: http://tug.org/store/lucida/lucida-sample.pdf
這個下載地址: http://www.rzuser.uni-heidelberg.de/~t91/analysis-cd/software/miktex_2.0/ http://www.ctan.org/tex-archive/fonts/psfonts/bh/lucida/
個人認為比較好看的適合正文的羅馬字體有: Lucida Bright( The LaTeX Companion )、Bookman  ( Effiective STL  和  The Pragmatic Programmer )、 Palatino( Computer Organization & Design )等等。

我需要某個符號,我需要寫某個樣子的數(shù)學公式,怎么辦?
Latex 里面有一份文檔,Higher Mathematics,很適合你。ctex的用戶可以在CTeX\CTEX\doc下找到ch8.pdf,就是它。如果你想要的符號這里面沒有,可以去查一查同一目錄下的 symbol.pdf

Latex中并列子圖的實現(xiàn)
下面是個例子,詳細說明請參考IEEEtran_HowTo。
\usepackage{graphicx}
\usepackage{subfigure}
%跨越多列的subfigure
\begin{figure*}
\centering \mbox{
\renewcommand{\thesubfigure}{(a\arabic{subfigure})}
\subfigure[big]{\includegraphics[width=.30\textwidth]{yours.eps}}\quad
\subfigure[small]{\includegraphics[width=.20\textwidth]{yours.eps}} }
\end{figure*}
%\setcounter{subfigure}{0}
%單列的并列子圖 
\begin{figure}
\centering \mbox{
\renewcommand{\thesubfigure}{(b\arabic{subfigure})}
\subfigure[big]{\includegraphics[width=.30\textwidth]{yours.eps}}\quad
\subfigure[small]{\includegraphics[width=.20\textwidth]{yours.eps}}}
\caption{Several figures}
\end{figure}

 

 

 

 

 

Latex 里面如何輸入長等號?
\def\Eqlfill@{\arrowfill@\Relbar\Relbar\Relbar}
\newcommand{\extendEql}[1][]{\ext@arrow 0099\Eqlfill@{#1}}
\makeatother
$$a \extendEql{\mbox{\textrm{def}}} b$$

Latex 里面如何調(diào)整列表環(huán)境的間隔?
設置方法一:在列表環(huán)境里進行設置,這樣每次使用列表時自己隨時設置,比較隨意些:
\documentclass{article}
\usepackage{times}
\pagestyle{empty}
\setcounter{page}{6}
\setlength\textwidth{159.0pt}
\usepackage{pifont}
\renewcommand\labelitemi{\ding{43}}
\begin{document}
  \begin{itemize}\setlength{\itemsep}{-\itemsep}
  \item Text of the first item in the list.
  \item Text of the first sentence in the second item of the list. And the second sentence.
  \end{itemize}
  \begin{enumerate} \setlength{\itemsep}{0pt}
        \item item of the list.
        \item item of the list.
        \item item of the list.
\end{enumerate}\end{document}

設置方法二:方法一有一個缺陷就是你要隨時設置比較麻煩,下面的方法較為簡單,可以進行統(tǒng)一的設置。簡單方便:\documentclass{article}
\usepackage{times}
\pagestyle{empty}
\setcounter{page}{6}
\setlength\textwidth{159.0pt} 
\usepackage{pifont} 
\renewcommand\labelitemi{\ding{43}}
\usepackage{atbeginend} % 可選宏包, 能解決許多問題,
%比如itemize, enumerate環(huán)境\item之間的控制
%用法
\AfterBegin{itemize}{\addtolength{\itemsep}{-0.5\baselineskip}}
\AfterBegin{enumerate}{\addtolength{\itemsep}{-0.5\baselineskip}}
\begin{document}
  \begin{itemize}
        \item item of the list.
        \item item of the list.
        \item item of the list.
  \end{itemize}
  \begin{enumerate}
        \item item of the list.
        \item item of the list.
        \item item of the list.
\end{enumerate}
\end{document}

Latex 里面如何打印如下常用符號?

使用marvosym 宏包
演示:


代碼:
\documentclass[a4paper,twoside]{book}
\usepackage{CJK}
\usepackage[body={398pt,550pt},footskip=30pt,%
            marginparwidth=60pt,marginparsep=10pt]{geometry}
%\setlength\textwidth{180.0pt}
\usepackage{marvosym}
\begin{CJK*}{GBK}{song}
\begin{document}
            \noindent\Emailct~XXXXXXX有限公司~~xxxx~xxxx~xxxxxx~xxx-xxx~室\\%
            \Telefon~\underline{0755-12345678}~~\\\Letter~\underline{xxx@xxxxxxxxx.com}~~\\%
            \Mobilefone~\underline{13812345678}~~\\\Pickup~\underline  {http://www.xxxxxxxxx.com/}\\%
打勾: ${\surd}$\\
打叉: ${\texttimes}$
\paragraph{}
\clearpage
\end{CJK*}
\end{document}

轉(zhuǎn)自http://babe-hut.spaces.live.com/blog/cns!8C5812EAE39B56CC!200.entry

 

附:

 

Latex常見問題集

如何設置標題和副標題

\title{Introduction to \LaTeX{ } Symbols and Commands \\ [2ex] \begin{large} Common Expressions in \emph{AURORA} \end{large} }

通過換行符號\\,分開主標題和副標題,然后設置縮進位置2個X的位置,最后用一個局部環(huán)境設置副標題的字體大小。

There are two basic ways to change font sizes in Latex:- To change the basic font size used all the way through your paper, put either  "11pt" or "12pt" in your \documentclass line.  For example, if you had: \documentclass{report}  but you wanted to use 12pt type (10pt is the default), you would change it  to: \documentclass[12pt]{report}NOTE:  12pt is an option to the "report" class, not a separatepackage, so doing \documentclass{report} \usepackage{12pt}will *not* work.   - To change just a part of your paper into a different font size, you can use  some of the sizing environments.  In increasing size, they are: \tiny \scriptsize \footnotesize \small \normalsize \large \Large \LARGE \huge \Huge  The case is important in these commands.  Also, in some document styles,  some of these commands may produce the same size font.  For example, if you  wanted to just make a small part of your text in a different font, you would  use something like: This is in normal text, while these words are in {\large large text}.  Or, if you wanted to put a larger region in a different size, you'd use  something like: \begin{small} this will all be in small text this too. etc.. \end{small}

 

Latex中數(shù)學常用符號的輸入
 
1、數(shù)學符號的重疊顯示,用于變量上面斜杠
$\rlap{$\backslash$} a  $
$\rlap{$\setminus$} a  $
$\diagdown \llap{a}   $
 
2、在箭頭上方/下方寫字
$ u(x) \overset{\text{UMP}}{\Longrightarrow} x(p,w) $ \\
$ u(x) \underset{\text{UMP}}{\Longrightarrow} x(p,w) $ \\
$Y  \xrightarrow[\text{ Cost Function }]{\text{Cost Minimization}}  c(w,q) $

 

在括號上下方寫字,用overbrace or underbrace。
    f_{X_1,\cdots, X_k}(x_1, \cdots, x_k)=
       \overbrace{\int_{-\infty}^{\infty} \cdots \int_{-\infty}^{\infty}}^{n-k}
       f(x_1, \cdots, x_k, \xi_{k+1}, \cdots, \xi_{n})
       d \xi_{k+1} \cdots d\xi_{n}
 
3、公式排列
一個短公式寫一行, 用equation,(有編號,加*無編號)
一個長公式分幾行寫,沒有對齊功能,用multiline ,(有編號,加*無編號)
一個長公式分幾行寫,有對齊功能,用split。自身無編號。要編號,外套equation。
一組公式,無對齊功能,用gather。(有編號,加*無編號) 
一組公式,有對齊功能,用align。(有編號,加*無編號)
      \begin{align*}
           a+b & = c+d \\
           x+y & = c+d
      \end{align*}
上述兩個公式按照&的位置對齊。如果不加*,則對每個公式進行編號,加了*就不編號。
將一組公式用類似矩陣形式進行排版對齊,用align或 flalign。(有編號,加*無編號)
 
4、矩陣的輸入
利用bmatrix環(huán)境,帶方括號
\begin{equation} X=\begin{bmatrix}
  1 & \cdots & 2 \\
  2 & \cdots & 3
\end{bmatrix} \end{equation}
 
利用matrix環(huán)境,啥括號都不帶
\begin{equation} X=\begin{matrix}
  1 & \cdots & 2 \\
  2 & \cdots & 3
\end{matrix} \end{equation}
 
利用array環(huán)境,自己在括號的地方寫,可以用任意括號形式
\begin{align}
    E(X)=\left[
           \begin{array}{ccc}
             E(x_{11}) & \cdots & E(x_{1n}) \\
             \cdots & \cdots & \cdots \\
             E(x_{n1}) & \cdots & E(x_{nn}) \\
           \end{array}
         \right]   %如果用“\right.”,那么后面的括號就隱藏了,可以用來表示分段函數(shù)。
  \end{align}
 

常見技巧

 

1.多個blankspace等于一個blankspace,多個空行(line)等于一個空行,一個空行效果等于另起一段,并不會真正出現(xiàn)一個空行。

2.九大保留字符的輸入
# $ % ^ & _ { }      前面加\就可以,如\$
\                    要用命令$\backslash$

3.latex命令的書寫要求

$a\pm b___FCKpd___1nbsp; $a\pm3b___FCKpd___1nbsp;
命令\pm后面的空格、數(shù)字或者任何非字母的字符都標志著該命令的結束。

如何在命令后產(chǎn)生一個空格:{}可以保護后面的空格。
Get \LaTeX{} Started.

一些命令(\footnote 或\phantom)內(nèi)嵌于\caption 或\section時會失效,這時加上\protect可以保證不失效。

\section{Higer Order Difference Equations \footnote{See James(2000)}}  %\footnote失效
\section{Higer Order Difference Equations \protect\footnote{See James(2000)}}

注意\protect只保護緊跟其后的命令本身,命令的參數(shù)并不受到保護,如果要保護參數(shù),需要在參數(shù)前加\protect.其他一些脆弱命令還有:

All commands that have an optional argument are fragile.
Environments delimited by \begin ... \end are fragile.
Display math environment delimited by \[ ... \]
Math environment \( ... \) ,However, $ ... $ is robust
Line breaks, \\ .
\item commands .
\footnote commands .

4.如何打印命令(將程序命令打印出來而不讓命令執(zhí)行)
\begin{verbatim} Get \LaTeX{}       Started. \end{verbatim}
\verb*|like this :-) |

5.添加程序注釋的兩種方法

%Get \LaTeX{}              Started.
\begin{comment} Get \LaTeX{}       Started. \end{comment}
第二個方法要在導言區(qū)添加\usepackage{verbatim}

6.document class有哪些常見類型
article, proc, minimal, report, book, slides

7.頁面式樣
\pagestyle{plain}
\pagestyle{headings}
\pagestyle{empty}
\thispagestyle{empty}  %將當前頁面的式樣改為empty.

8.大型文檔中插入一些子文檔的方法
\include{filename}   %想讓插入的子文檔在新的一頁開始顯示;
\input{filename} %插入的子文檔直接顯示,不用新開一頁。
\includeonly{file1,file2,file3}  %在導言區(qū)使用。只有在此列出的子文檔才會在正文中被插入。


9.快速檢查語法
\usepackage{syntonly}
\syntaxonly

10.分行分頁的方法
\\  or  \newline  :另起一行,但不另起一段。
\\* :另起一行,但禁止分頁。
\newpage:另起一頁。

11.確定單詞斷點位置
\hyphenation{FORTRAN Hy-phen-a-tion}   %只有在-出現(xiàn)的地方才能斷,沒有-的單詞不能斷,必須整體出現(xiàn)。
un\-derstood %在正文中輸入understood的時候,插入\-告訴latex這里可以分開。

12.幾個單詞整體出現(xiàn)
\mbox{0116 291 2319}  %讓這幾位數(shù)字作為一個整體出現(xiàn)在一行,不在不同的行顯示。
\fbox{0116 291 2319}  %功能和\mbox一樣,同時還在這個整體周圍加框。

13.特殊符號

引號
``well understood `physical' formula''   雙引號要用兩個重音號``和兩單引號''前后表示。

破折號
daughter-in-law, X-rated\\
pages 13--67\\
yes---or no? \\
$0$, $1$ and $-1$

波浪號~
\~understood \~{}physical $\sim$formula   效果各不同

溫度度數(shù)
$-30\,^{\circ}\mathrm{C}$
$-30$\textcelsius  %這一種要加載\usepackage{textcomp}

歐元符號
\texteuro 100
\euro 100 $需加載\usepackage[official]{eurosym}或者\usepackage[gen]{eurosym}
\EURtm  $需加載\usepackage{marvosym}

省略號
直接用...不行,要用 \ldots, 文本中位于下部的省略號
$\cdots___FCKpd___1nbsp;%math mode, 數(shù)學符號中的位于中部的省略號
$\cdot___FCKpd___1nbsp; %math mode,數(shù)學符號中位于中部的一個點號。

連字
不管你信不信,在latex中,ff和f{}f顯示的結果是不同的。ff是兩個連在一起的整體符號。

14.調(diào)整單詞間隔
\frenchspacing

15.論文的標題、章節(jié)目等安排
\title{My Dissertation}  %在后面正文中用\maketitle生成標題
\author{George Bush, Allen Greenspan}
\date{\today}
\tableofcontents %在此位置插入章節(jié)目錄
\listoffigures  %在此位置插入圖形目錄
\listoftables  %在此位置插入表格目錄
\part{XXX} %產(chǎn)生單獨的一頁,例如Part I XXX
\chapter{Introduction to SAS} %章 1 只有report和book才有章的劃分。
\section{My God}  %節(jié) 1.1
\subsection{...}  %目 1.1.1
\subsubsection{...}  %以下不再編號
\paragraph{...}
\subparagraph{...}

\section*{My God}  %加了*后,該節(jié)就不出現(xiàn)在目錄中,也不編號。

\appendix  %該命令說明后面開始附錄,下面的chapter命令采用字母編號
\chapter{Mathematical analysis}  %Appendix A Mathematical analysis
\section{Set Theory}   %A.1 Set Theory

16.book風格的文檔
\frontmatter %緊跟著\begin{document}命令出現(xiàn),該命令啟用羅馬數(shù)字編頁碼。
\mainmatter %出現(xiàn)在第一章前面,該命令啟用阿拉伯數(shù)字編頁碼。
\appendix  %標志書中附錄材料的開始。該命令后的各章序號改用字母標記。
\backmatter  %應該插入書中最后一部分內(nèi)容的前面,如參考文獻和索引


17.交叉引用法
\label{sec:my1} %放在在節(jié)、子節(jié)、圖、表或定理后面,作為后面需要引用的標記
\ref{sec:my1} %引用標志詞sec:my1那里的節(jié)、子節(jié)、圖、表或定理的序號
\pageref{sec:my1} %引用標志詞sec:my1所在的頁碼

18.腳注、頁邊注和尾注
\footnote{type the text here.}
\marginpar{type the text here.}

尾注的方法
\usepackage{endnotes}  %加載尾注宏包
\endnote{type the text here.} %在需要尾注的地方添加
\theendnotes   %指明尾注內(nèi)容在文中該地方出現(xiàn)。

19.強調(diào)
\underline{text} %下劃線強調(diào)
\emph{text}  %斜體強調(diào)

20. 三種枚舉方法Itemize、Enumerate 和Description
\flushleft
\begin{enumerate}
  \item The strategy:
    \begin{itemize} \item First,look silly.\item[-] Second,be smart.\end{itemize}
  \item The result:
    \begin{description} \item[Stupid] You'll be smart.\item[Smart] You'll be stupid.\end{description}
\end{enumerate}

21.文本的對齊和居中
\begin{flushleft}。。。。。。\end{flushleft}
\begin{flushright}。。。。。。\end{flushright}
\begin{center}。。。。。。\end{center}

22.引文、詩歌、摘要

\begin{quote}。。。。。。\end{quote} %一次少量引用
\begin{quotation}。。。。。。\end{quotation} %一次大量引用
\begin{verse}。。。。。。\end{verse} %引用詩歌,排成韻律風格,每一行后用\\斷行。
\begin{abstract}。。。。。。\end{abstract} %學術論文的摘要。

23.表格

\begin{tabular}{|r||l @{ + } c@{ . }rrr@{ * }c|c|} \hline \hline
Position & Club & Games & W & T & L & Goals & Points\\[1.5ex] \hline
1 & Amesville Rockets & 33 & 19 & 13 & 1 & 66:31 & 51:15 \\
2 & Borden Comets & 33 & 18 & 9 & 6 & 65:37 & 45:21 \\
... & ..... & .. & .. & .. & .. & ... & ... \\
17 & Quincy Giants & 33 & 7 & 5 & 21 & 40:89 & 19:47 \\
18 & Ralston Regulars & 33 & 3 & 11 & 19 & 37:74 & 17:49\\ \hline \hline
\end{tabular}

另一種更加復雜的表,可以隨意畫橫線,幾列共用一個標簽

\begin{tabular}{|r|l||rrr|r@{ : }l|r@{ : }l||c|} \hline
\multicolumn{10}{|c|}{\bfseries {\itshape Table 1}. 1st Regional Soccer League --- Final Results 2002/03}\\ \hline
\itshape Position & \itshape Club & \itshape W & \itshape T & \itshape L & \multicolumn{2}{|c|}{\itshape Goals} & \multicolumn{2}{|c||}{\itshape Points} & \itshape Remarks\\[1ex] \hline \hline
1 & Amesville Rockets & 19 & 13 & 1 & 66&31 & 51&15 & League Champs\\ \hline
2 & Borden Comets & 18 & 9 & 6 & 65&37 & 45&21 & Trophy Winners\\ \hline
... & ..... & .. & .. & .. & .. & ... & ... & ...& ...\\ \hline
17 & Quincy Giants & 7 & 5 & 21 & 40&89 & 19&47 & Candidates \\ \cline{1-9}
18 & Ralston Regulars & 3 & 11 & 19 & 37&74 & 17&49 & for Losers\\ \hline
\end{tabular}

24. 浮動體
浮動體就是一個整體在正文中上下浮動,尋找合適的放置位置,通常為了避免一個“整體對象”遭遇分頁等尷尬問題。例如不想讓表格一半在上一頁,一半在下一頁。將上面表格作為浮動體處理,浮動體放置許可規(guī)則[!hbtp]表示忽略內(nèi)部參數(shù)[!],首先優(yōu)先放在這兒here[h],其次是bottom[b],再次放在top[t],然后考慮放在一個floating page[p]。下面是表和圖的浮動體例子。其中caption命令添加標題,[..]內(nèi)的是簡單標題,在\listoffigures 和 \listoftables 中出現(xiàn),{...}內(nèi)的是長標題,在正文中顯示。

\begin{table}[!hbtp]
\caption[Finals]{1st Regional Soccer League --- Final Results.}

\begin{tabular}{|r|l||rrr|r@{ : }l|r@{ : }l||c|} \hline
\multicolumn{10}{|c|}{\bfseries {\itshape Table 1}. 1st Regional Soccer League --- Final Results 2002/03}\\ \hline
\itshape Position & \itshape Club & \itshape W & \itshape T & \itshape L & \multicolumn{2}{|c|}{\itshape Goals} & \multicolumn{2}{|c||}{\itshape Points} & \itshape Remarks\\[1ex] \hline \hline
1 & Amesville Rockets & 19 & 13 & 1 & 66&31 & 51&15 & League Champs\\ \hline
2 & Borden Comets & 18 & 9 & 6 & 65&37 & 45&21 & Trophy Winners\\ \hline
... & ..... & .. & .. & .. & .. & ... & ... & ...& ...\\ \hline
17 & Quincy Giants & 7 & 5 & 21 & 40&89 & 19&47 & Candidates \\ \cline{1-9}
18 & Ralston Regulars & 3 & 11 & 19 & 37&74 & 17&49 & for Losers\\ \hline
\end{tabular}

\end{table}


Figure \ref{white} is an example of Pop-Art.
\begin{figure}[!hbp]
\makebox[\textwidth]{\framebox[5cm]{\rule{0pt}{5cm}}}
\caption[FiveFig]{Five by Five in Centimetres.\label{white}}
\end{figure}

浮動體的放置順序遵循“先來先放”的原則。有時等待序列中浮動體太多,命令\clearpage可以讓等待結束,立刻新開一頁放置所有等待中的浮動體。

在LaTeX文檔中插入圖片
http://hepg.sdu.edu.cn/Service/tips/latex/latexfig.html

25.如何使用中文字體
先在導言區(qū)加載\usepackage{CJK}
然后在正文使用中文的地方用

\begin{CJK*}{GBK}{song}   中文或者英文  \end{CJK*}

加*和不加*的區(qū)別在于對~的處理不同。加了*后,漢字之間的空格用~代替。不加*,漢字之間空格用英文正??崭?。常用的其他字體還有:fs(仿宋)、kai(楷體)、hei(黑體)、li(隸書)、you(幼圓)。命令中的 GBK 是指中文內(nèi)碼,還可以用 GB 和 BIG5(繁體字),前提是相應的字庫設置是正確的。

如果在中間想要將宋體改變仿宋,就可以使用:
\CJKfamily{GBK}{fs}

26.段首縮進
latex默認每一段段首縮進,但是正文第一段不縮進。如果要縮進,采用下面兩種方法:
(1).加載\usepackage{indentfirst}的方法。
(2).在該段首用\parindent來專門控制縮進,例如:
\setlength{\parindent}{4em} %放置在段首,它設置為當前字號的4個大寫字母M的寬度,大約正好是4個漢字的寬度

27.行距和段距的控制
\setlength{\baselineskip}{1.8em} %行距控制為1.8個M,直到下次出現(xiàn)修改為止。1.8em是中文常見行距。
\setlength{\parskip}{1ex}  %段距控制為1個x,直到下次出現(xiàn)修改為止。

28.頁眉頁腳
\usepackage{fancyhdr}
\pagestyle{fancy}


29.頁面設置
\usepackage[top=1in, bottom=1in, left=1in,

right=1in]{geometry}

 

 

30.如何設置字體顏色

\documentclass[letterpaper,11pt]{report}\usepackage{color}\definecolor{Blue}{rgb}{0.3,0.3,0.9}\begin{document}

Hello! {\color{Blue}{World}}!

\end{document}

左對齊
 \begin{flushleft}
 \end{flushleft}


 右對齊
 \begin{flushright}
 \end{flushright}


 列舉環(huán)境
 \begin{itemize}
 \end{itemize}
 
 \begin{enumerate}
 \end{enumerate}
 保持環(huán)境
 \verb|  |

 \begin{verbatim}
 \end{verbatim}


 小頁環(huán)境
 \begin{minipage}{size}
 \end{minipage}


 詩歌環(huán)境
 \begin{verse}
 \end{verse}
 
 浮動表格環(huán)境
 \begin{table}
 \end{table}
 
 固定表格環(huán)境
 \begin{tabular}
 \end{tabular}

 

 浮動圖片環(huán)境
 \begin{figure}
 \end{figure}

10種字號命令
 {\tiny  }   {\scriptsize  }  {\footnotesize  }  {\small  }  {\normalsize  }  {\large  }  {\Large  }
 {\LARGE  }  {\huge  }  {\Huge  }

 

英文字體命令
 {\rm  } 羅馬字體    {\bf  } 黑體   {\it  } 意大利字體   {\sc  } 小號大寫字體  {\sl  } 斜體
 {\tt  } 打字機字體  {\cal } 花體  {\em  } 強調(diào)型字體

 

幾種數(shù)字的格式
 \arabic{}   \roman{}  \Roman{}  \alph{}  \Alph{}

 

章節(jié)命令
 部分命令
 \part{}

 

 章命令
 \chapter{}
 

節(jié)命令
 \section{}
 \subsection{}
 \subsubsection{}
 \subsubsubsection{}


 附錄命令
 \appendix{}

 

使用上面所說的命令,處理一般的文字文檔應該沒多大問題了。但是一篇文章中還有三個很重要的部分:公式,圖片,表格現(xiàn)在我們還沒法處理。

 

 

下面就來講一講。

  要在Latex文檔中加載圖片,必須要包括graphicx宏包。
 下面即是典型代碼:

 \begin{figure}
 \begin{center}
 \includegraphics[width=10cm,height=6cm]{1.eps}%就在前面括號中寫圖片名
 \renewcommand{\figurename}{圖}
 \caption{}
 \label{}
 \end{center}
 \end{figure}

 這段代碼功能是把名為1.eps的圖片調(diào)進來,放在浮動圖片環(huán)境中,并居中放置。
 \includegraphics[width=10cm,height=6cm]{1.eps}中的\includegraphics 即為調(diào)用圖片的命令。[]中的參數(shù)用于指定加載圖片后圖片顯示的寬度和高度。
 \renewcommand{\figurename}{圖}用于將其默認的標號(為figure)改為“圖”
 \caption{}給這幅圖片取一個名字或作一段說明用于顯示出來。
 \label{}中也寫一個名字用來標明這幅圖片,方便前面或后面的交叉引用。

 

 

 

插入表格

 插入表格沒有圖片步驟多,但也要注意一些細節(jié)問題。

 \begin{table}
 \centering
 \renewcommand{\tablename}{表}
 \caption{}
 \begin{tabular}{|l|l|l|}
 \hline
  1 & 2 & 3\\
 \hline
  8.2 & 7.8 & 12.7\\
  75.7 & 152.8 & 249.9\\
 \hline
 \end{tabular}
 \end{table}

 這段代碼用來生成一個3行3列的浮動表格,并左右置中放置。
 \begin{tabular}{|l|l|l|}中的|l|l|l|表示有三列,列與列之間用豎線隔開(共四根豎線)。
 \hline表示畫一根橫線。

本站僅提供存儲服務,所有內(nèi)容均由用戶發(fā)布,如發(fā)現(xiàn)有害或侵權內(nèi)容,請點擊舉報。
打開APP,閱讀全文并永久保存 查看更多類似文章
猜你喜歡
類似文章
LaTeX常見問題集(轉(zhuǎn)載)
[轉(zhuǎn)載]Latex相關資源匯總(原創(chuàng))
LaTeX新人教程,30分鐘從完全陌生到基本入門
學術寫作利器——LATAX入門教程
Latex
如何使用LaTeX完成一篇論文的基本排版
更多類似文章 >>
生活服務
分享 收藏 導長圖 關注 下載文章
綁定賬號成功
后續(xù)可登錄賬號暢享VIP特權!
如果VIP功能使用有故障,
可點擊這里聯(lián)系客服!

聯(lián)系客服