LaTeX Tutorial

What is LaTeX?

LaTeX is a high-quality typesetting system, with features designed for the production of technical and scientific documentation. LaTeX uses tags to mark up the content in documents. With the comprehensive style packets, control macros, commands and high expanding capability, users can produce high-quality documents without spending too time to adjust the layout the style. LaTeX is the de facto standard for the communication and publication of scientific documents.

Why LaTeX?

It is true that we already have some efficient document preparation tools such as Doxygen and DocBook, which actually have done great jobs for generating reference book for APIs etc., but when it goes to some large documents, such as the Developers’ Guide or Getting Started Guide, which require high-quality print out and well documented graphics, resource reference, bibliography, LaTeX is more powerful and more easy tool to use.

LaTeX is used by many famous publish houses and technical organizations as the standard document system for its high efficiency and quality. There are also some additional advantages for SDK team members who will engage document works.

·        Firstly, LaTeX provide very flexible customize methods, so that we can create our own style packet for Motorola SDK documents. The style packet will contain page style definition, environment tags, control macros, which are all closely related to the specific elements in our document, so the engineers can put more efforts on the content rather than worry about the appearance of the documents. For example, engineers can use quite simple tags to embrace the text, only indicating the text should be common description, sample codes or command instructions, then pre-defined LaTeX packet take care of other things. 

·        Secondly, LaTeX can be easily interacted with other tools including Doxygen and DocBook. For example, Doxygen is able to output  *.tex file (LaTeX source file), which can be used to produce DVI, PS and PDF files. We can also copy this generated tex source code into larger documents such as Developers’ Guide. LaTeX file can also be transformed into other format such as HTML, DocBook, XML by some addition tools such as latex2html (www.latex2html.org). A large number of such tools can be found. We will put an incompleted list later in this tutorial.

Installing LaTeX

Windows       I recommend the MiKTeX distribution to install, so you can easily manage TeX packages. It automatically starts to search the web for new packages when your document needs them. It also includes other components that help you work with your TeX system.

Unix-type systems, including Linux        Many unix-like systems usually have TeX as an installation option. However, it is not installed in our ECGL system.  The most widely used distribution is teTeX .

Detailed installation guide can be found in all these distribution packets.

 

Word processing companion

Theoretically speaking, having the latex distribution installed is enough for producing document. However, editing latex source file with numerous tags and commands, without any grammar highlight and spelling check can be daunting. Therefore, some companions are usually used to help people writing tex files. Here are some of them.

Windows

On windows, the best choice may be WinEdt by Dr. Aleksander Simonic.

 

UltraEdit is another choice. If your installed version doesn’t automatically highlight Latex key words, go tohttp://www.ultraedit.com/downloads/additional.html to download the latextag.txt, and then append it to the UltraEdit’s tagfile.

Unix-type systems, including Linux       

The most commonly used editor, vi , can give your basic helps.

 

Personally I refer Emacs for its multi document edit style, quick commands, high customizable features, and plentiful extensions.

 

AUCTex is an extension which makes Emacs even more suitable for typing latex files.

 

Kile is very similar to WinEdt on Windows. It requires Qt3.2 or above. It has beautiful edit environment and many friendly methods for editing, compiling, reviewing.

 

Basic work process

Suppose we have typed a valid latex file named as mydoc.tex, run the following commands to compile it:

$ latex mydoc.tex

the output should be mydoc.dvi if no errors. Note that if hyperlinks or cross reference are used in the document, you may need to run the above command up to three times. The output DVI file can be converted to Postscript file with

$ dvi2ps mydoc.dvi

The postscript is very high quality document format but the file size is quite large. It can be converted to PDF file with tools such as ghostscript, which is available on most Linux system.

It is possible to generate PDF directly from latex source file by using

       $ pdflatex mydoc.tex

Some modifications are needed, such as using JPEG, PNG pictures instead of EPS pictures.

The LaTeX source file

The framework of a latex source file, which has filename extension as tex, is demonstrated as follows.

 

Where to find more?

Of course the knowledge above is not enough for people who want to work with Latex frequently. In fact, Latex is such a large-scale system, and so many people are contributing to this system every day. So here is the list of some places for you can get helps from. It includes books, tutorials, forums, blogs and Wikis.

http://www.ctan.org

The Comprehensive Tex Archive Network, where you can find ALL about latex.

http://www.latex-project.org

The authors of LaTeX2e set up this website, much useful knowledge can be found here.

http://www.chinatex.org

Many useful tips about LaTeX for Chinese language are here.

The Not So Short Introduction to LaTeX

The official manual for beginners.

Starting out the Tex, LaTeX, and friends

A very good tutorial for beginners.

Using Imported Graphics in LaTeX2e

Using graphics in LaTeX really needs more skills. Learn them from this book!

Using Imported Graphics in LaTeX2e - Chinese Version

The book above has been translated in Chinese by Wang Lei, who also put some addition skills according his own experience.

The LaTeX Companion, the 2nd edition

The most comprehensive manual.

 

There are a large number of tools to help LaTeX interacting with other document tools. We can find lots of discussion about them. I will keep on evaluate these tools. The goal is to achieve one unique document content source, and generate the final released document in all necessary formats including HTML, PDF etc.

 

Docbook stylesheet for LaTeX

http://lists.oasis-open.org/archives/docbook-apps/200403/msg00225.html

 

An xsl file for LaTeX

http://xslt.com/html/xsl-list/2000-11/msg00180.html

 

Another xsl

http://sources.redhat.com/ml/xsl-list/2000-11/msg00153.html

 

DB2Latex

http://db2latex.sourceforge.net/

 

xml, Latex, txt2tag, reconstructedTxT and more on the forum

 

 

Some ideas about file format conversion

http://www.cygwin.com/ml/docbook/2004-01/msg00046.html

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值