您的位置:首页 > 编程语言 > PHP开发

the use of Latex for paper writing

2010-03-16 05:49 441 查看
A latex file (.tex) need to have a document type, specified like this "/documentclass{myclass}". Each class has an associated *.cls file in the system directories which is read in at start-up time. If you use some default document class, you do not have to have a separete class file, as they are build-in in miktex (like article.cls in the folder C:/Program Files/MiKTeX 2.8/tex/latex/base).

 

 

1, A good software I am using: TeXnicCenter (http://www.texniccenter.org/)

2, To use the figures, one of the most trouble thing -- generating EPS figure!!!

 

I did the following steps:

1) paste the figures into an ppt file;

2) print this file directly into eps (remember to choose the layout to be landscape, and after you got the .prn file, you can rename it to be .eps);

3) use the following format:

/begin{figure}

/centering

/vspace{0.5in}

/epsfig{file=myfigure.eps, height=2.5in}

/vspace{-2.0in}

/caption{A test caption.}

/end{figure}

 

(notice that these steps are based on my own laptop, where there is such an option in the Print window "Print to EPS". I do not remember where it is from. maybe it is because I have installed "CutePDF Writer" or "Qicken PDF Printer", as there is no such an option in my desktop.)

 

this way of generating eps figure will not have any problems like reversed pictures which is hard to adjust -- it ever wasted me a lot of time. You just get what you see in the original figure file, and can use the command of {figure} in latex to reverse the figure any direction you want.

3, To use tables, 

Some useful latex table use:

    http://en.wikibooks.org/wiki/LaTeX/Tables#The_tabular.2A_environment_-_controlling_table_width
    http://www.artofproblemsolving.com/LaTeX/AoPS_L_GuideLay.php#boxes
    http://www.latex-community.org/forum/viewtopic.php?f=35&t=803
 

4, How to set the document size!!!

It is the problem I just understand today. By default, the generated pdf size could be either A4 (8.3*11.7) or Letter(8.5*11). From the conference template, I found my paper size is different from the sample pdf file's, although we are using the same tex file. The effect is, same latex file, but different margins in pdf. Mine does not look like all the others. I googled and find some solutions. This one is best which does not require to change your class file (like setting /pdfpagewidth=8.5in in .tex or .cls) -- http://people.engr.ncsu.edu/txie/publications/writingtools.html. I copy some text directly related here:

 

If I create a PDF file using
PS2PDF or PDFLaTeX the paper size is changed to Letter instead of A4
(the generated PDF has a narrow top margin)


(or the other way around when the
prefered size is letter)


TeXnicCenter
specific

(1beta
6.31)
:

You can
configure the PS2PDF command line options at menu
"Build->Define Output Profiles..." Click
LaTeX=>PS=>PDF on the
left-size list box, then click Postprocessor tag, click the
"Ghostscript (ps2pdf)" entry in the list box on the right. The
"Arguments" box on the bottom should be put with the following command
line options:

-sPAPERSIZE=a4 -dSAFER -dBATCH -dNOPAUSE -sDEVICE=pdfwrite
-dPDFSETTINGS=/printer -dMaxSubsetPct=100 -dSubsetFonts=true
-dEmbedAllFonts=true -sOutputFile="%bm.pdf" -c save pop -f "%bm.ps"

where "-sPAPERSIZE=a4" specifies that A4 size is generated.

If your
preferred size is letter instead of A4, you need to replace the "

-sPAPERSIZE=a4" above with "
-sPAPERSIZE=letter".
In addition, add "-t letter" to the command line argument for dvips.
Note that you don't need to put

/pdfpagewidth=8.5in

/pdfpageheight=11in

to the document preamble as some guideline suggests.

 

 
内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
相关文章推荐