![]() TeX commands-instructions to the typesetter-always begin with \.Everything from % to the end of a line is ignored by the typesetter. Here are the most important things about TeX syntax. I’ll talk about the body first and then come back to the preamble. The preamble commands are trickier to master than the body commands, so what you really need is someone else’s preamble to get you going. Ideally the preamble describes the details of the appearance of the final page, whereas the body describes the structured content of the document. Enjoy! A minimal sample documentīut on to the promised description of the sample.Ī LaTeX document has two sections, the preamble and the body. Here is a sample file in LaTeX, to be processed with pdflatex:. But if you run into trouble, try switching to pdflatex. I think the font-and-Unicode combo is compelling enough that humanists should use XeLaTeX, so for the rest of this post I’ll talk about that. Unlike ( pdf) latex, xelatex uses your system fonts. ![]() XeLaTeX source is LaTeX with a certain preamble and Unicode characters used freely throughout. If you are reading introductions to LaTeX (or Mittlebach and Goosens’s big reference book, the LaTeX Companion) and you want to try out their example code, try it in pdflatex. Pretty much anything you can latex you can pdflatex. Pdflatex processes LaTeX source directly into PDF. If you like the command line, the command is simply Ĭlassic latex processes LaTeX source into DVI (“device independent”) format, a TeX-specific filetype devised in pre-PDF days. TeXShop will automatically use pdflatex if you choose “LaTeX” from its menu. Here is what it looks like in the MacOS program TeXShop:Ĭlick the “Typeset” button to produce a PDF. How do you use an “engine”? If you are working in a graphical front-end program, look for a pulldown menu that allows you to choose one. (There are more out there, but never mind them). A TeX distribution comes with three important LaTeX engines: latex, pdflatex, and xelatex. Stick with LaTeX, which is easier and much more in the spirit of contemporary document markup (XML, etc.). First of all there’s the contrast between the original or “plain” TeX and LaTeX. TeX has been around long enough to have developed a bunch of variants, each with their corresponding processing engine. ![]() In the rest of this post, I’ll walk through that source file, but before we can do that, there’s one technicality to get out of the way: what engine will you use? The engine is the program that converts your TeX source code into a presentational format like PDF. If your setup is working like mine-and if you have the fonts I use-you should be able to typeset it with XeLaTeX and get a result that looks like this:. However you do things, here is a file to start playing around with:. If Unix, pffft open up an xterm and vim/emacs. If you are on a Mac, look for the TeXShop application if you are on Windows, look for TeXnicCenter. The TeX Users Group website has a Getting Started Page with the essentials: introductory documents, examples, and, most importantly, links to the software itself: TeX Live on Unix, MacTeX on Mac, proTeXt on Windows (all free, and rather enormous, downloads). From there, you can proceed by means of examples of your commands of interest.So you just want to begin. And that's about it.įor more details on customizing autocompletion with cwl files, check the TeXstudio manual, section "4.13 Description of the cwl format".Ī tip: If the manual seems complicated, and you'd like to emulate the behavior of some command's autocompletion you like, you might want to download the sourcecode tarball at, unpack it and look at the built-in cwl files in the "completion" folder. Then, in TeXstudio, go to Options -> Configure TeXstudio -> Completion and check mycwl.cwl on the list ( crucial). For further commands, just add a new line to your mycwl.cwl. ![]() TeXstudio does a pretty good job with autocompletion. ![]()
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |