1.3 IATEX Input Files 5 1.3.2 Special Characters ein al ormally not prin yon enter #$名·点-{」~八 As you will see.these characters can be used in your documents all the same by using a prefix backslash: HHWOWL VUVO #s%&_{}-\ The other symbols and many more can be printed with special commands in mathematical formulae or as accents the backslash character can not be entered by adding another backslash in front of it (\)this sequence is used for line breaking.Use the \textbackslash command instead. 1.3.3 IATEX Commands IXTEX commands are case sensitive,and take one of the following two for- mats: They start with a backslash and then have a name consisting of letters only.Command names are terminated by a space,a number or any other 'non-letter.' They consist of a backslash and exactly one non-letter. .Many commands exist in a'starred variant'where a star is appended to the command name. LTEX ignores whitespace after commands.If you want to get a s after a command,you have to put either an empty parameter (and a blank or a special spacing command after the command name.The empty param- eter (stops INTEX from eating up all the white space after the command name. New \Tex users may miss whitespaces renders wrong miss white ces af- T whit \Tex perts.and k o hot to use whitespaces.renders correct r which has to be
1.3 LATEX Input Files 5 1.3.2 Special Characters The following symbols are reserved characters that either have a special meaning under LATEX or are not available in all the fonts. If you enter them directly in your text, they will normally not print, but rather coerce LATEX to do things you did not intend. # $ % ^ & _ { } ~ \ As you will see, these characters can be used in your documents all the same by using a prefix backslash: \# \$ \% \^{} \& \_ \{ \} \~{} \textbackslash # $ % ^ & _ { } ~ \ The other symbols and many more can be printed with special commands in mathematical formulae or as accents. The backslash character \ can not be entered by adding another backslash in front of it (\\); this sequence is used for line breaking. Use the \textbackslash command instead. 1.3.3 LATEX Commands LATEX commands are case sensitive, and take one of the following two formats: • They start with a backslash \ and then have a name consisting of letters only. Command names are terminated by a space, a number or any other ‘non-letter.’ • They consist of a backslash and exactly one non-letter. • Many commands exist in a ‘starred variant’ where a star is appended to the command name. LATEX ignores whitespace after commands. If you want to get a space after a command, you have to put either an empty parameter {} and a blank or a special spacing command after the command name. The empty parameter {} stops LATEX from eating up all the white space after the command name. New \TeX users may miss whitespaces after a command. % renders wrong Experienced \TeX{} users are \TeX perts, and know how to use whitespaces. % renders correct New TEXusers may miss whitespaces after a command. Experienced TEX users are TEXperts, and know how to use whitespaces. Some commands require a parameter, which has to be given between curly braces { } after the command name. Some commands take optional
Things You Need to Know parameters,which are inserted after the command name in square brack. cts【]. \command [optional parameter](parameter} The next examples use some LTEX commands.Don't worry about them they will be explained later. You can \textal{lean}on me You can lean on me a new line e,start a new line right here! Thank you! Thank you 1.3.4 Comments When IXTEX encounters a character while processing an input file,it ig- nores the rest of the present line,the line break,and all whitespace at the beginning of phh。anbe This is an example:Supercalifragilisticex- pialidocious The character can also be used to split long input lines where no whitespace or line breaks are allowed. For longer comments you could use the comment environment provided by the verbatim package.Add the line \usepackagefverbatim}to the preamble of your document as explained below to use this command This is another \begin{cor but helpful d This is another example for embedding comments in your document. t. 1。fg Note that this won't work inside complex environments,like math for example
6 Things You Need to Know parameters, which are inserted after the command name in square brackets [ ]. \command[optional parameter]{parameter} The next examples use some LATEX commands. Don’t worry about them; they will be explained later. You can \textsl{lean} on me! You can lean on me! Please, start a new line right here!\newline Thank you! Please, start a new line right here! Thank you! 1.3.4 Comments When LATEX encounters a % character while processing an input file, it ignores the rest of the present line, the line break, and all whitespace at the beginning of the next line. This can be used to write notes into the input file, which will not show up in the printed version. This is an % stupid % Better: instructive <---- example: Supercal% ifragilist% icexpialidocious This is an example: Supercalifragilisticexpialidocious The % character can also be used to split long input lines where no whitespace or line breaks are allowed. For longer comments you could use the comment environment provided by the verbatim package. Add the line \usepackage{verbatim} to the preamble of your document as explained below to use this command. This is another \begin{comment} rather stupid, but helpful \end{comment} example for embedding comments in your document. This is another example for embedding comments in your document. Note that this won’t work inside complex environments, like math for example
1.4 Input File Structure 7 1.4 Input File Structure When ITEX2e processes an input file,it expects it to follow a certain struc- ture.Thus every input file must start with the command \documentclassf...} This specifies what sort of document ent,or load packages that add new features to the ITEX system.To load such a package you use the command \usepackagef...} When all the setup work is done.you start the body of the text with the command \begin{document} Now you enter the text mixed with some useful ITX commands.At the end of the document you add the \end{document} Figure 1.1 shows the contents of a minimal LTEX2 file.A slightly more complicated input file is given in Figure 1.2. 1.5 A Typical Command Line Session I bet you must be dving to try out the neat small iATex input file show on page 7.Here is some help:IXTEX itself comes without a GUI or fancy buttons to press.It is just a program that crunches away at your input file.Some LyTEX installations feature a graphical front-end where there is a ITEX button to start compiling your input file.On other systems there The area between docue and)is called \documentclass{article} \begin{document】 is beautiful \end{document} Figure 1.1:A Minimal LXTEX File
1.4 Input File Structure 7 1.4 Input File Structure When LATEX 2ε processes an input file, it expects it to follow a certain structure. Thus every input file must start with the command \documentclass{...} This specifies what sort of document you intend to write. After that, add commands to influence the style of the whole document, or load packages that add new features to the LATEX system. To load such a package you use the command \usepackage{...} When all the setup work is done,4 you start the body of the text with the command \begin{document} Now you enter the text mixed with some useful LATEX commands. At the end of the document you add the \end{document} command, which tells LATEX to call it a day. Anything that follows this command will be ignored by LATEX. Figure 1.1 shows the contents of a minimal LATEX 2ε file. A slightly more complicated input file is given in Figure 1.2. 1.5 A Typical Command Line Session I bet you must be dying to try out the neat small LATEX input file shown on page 7. Here is some help: LATEX itself comes without a GUI or fancy buttons to press. It is just a program that crunches away at your input file. Some LATEX installations feature a graphical front-end where there is a LATEX button to start compiling your input file. On other systems there 4The area between \documentclass and \begin{document} is called the preamble. \documentclass{article} \begin{document} Small is beautiful. \end{document} Figure 1.1: A Minimal LATEX File
Things You Need to Know might be some typing involved,so here is how to coax IXTEX into compiling your input file on a text based system.Please note:this description assumes that a working ITEX installation already sits on your computer Edit Create yoll create just that the file in Ascu o it be the .tex. on your inpu input file has a bug ITEX will tell you about it and stop processing your input file.Type ctrl-D to get back to the command line. xelatex foo.tex the cooUnls SRee ix \documentclass [a4paper,11pt]{article} define the title \author(H."Partl} \title{Minimalism) \begin{document} generates the title the table of contents tebti8tf8otemiaterestingorda Well,and here begins my lovely article \section{Good Bye World} \ldots{}and here it ends. \end{document Figure 12:Example of a realistic Journal article.Note that all the com mands you see in this example will be explained later in the introduction
8 Things You Need to Know might be some typing involved, so here is how to coax LATEX into compiling your input file on a text based system. Please note: this description assumes that a working LATEX installation already sits on your computer.5 1. Edit/Create your LATEX input file. This file must be plain ASCII text. On Unix all the editors will create just that. On Windows you might want to make sure that you save the file in ASCII or Plain Text format. When picking a name for your file, make sure it bears the extension .tex. 2. Open a shell or cmd window, cd to the directory where your input file is located and run LATEX on your input file. If successful you will end up with a .pdf file. It may be necessary to run LATEX several times to get the table of contents and all internal references right. When your input file has a bug LATEX will tell you about it and stop processing your input file. Type ctrl-D to get back to the command line. xelatex foo.tex 5This is the case with most well groomed Unix Systems, and … Real Men use Unix, so … ;-) \documentclass[a4paper,11pt]{article} % define the title \author{H.~Partl} \title{Minimalism} \begin{document} % generates the title \maketitle % insert the table of contents \tableofcontents \section{Some Interesting Words} Well, and here begins my lovely article. \section{Good Bye World} \ldots{} and here it ends. \end{document} Figure 1.2: Example of a Realistic Journal Article. Note that all the commands you see in this example will be explained later in the introduction
1.6 The Layout of the Document 9 1.6 The Layout of the Document 1.6.1 Document Classes The first information ITEX needs to know when processing an input file is the type of document the author wants to create.This is specified with the \documentclass command. \documentclass [options]{class} document classes e options have to be separated by commas.The most common options for the standard document classes are listed in Table 1.2. Example:An input file for a LTEX document could start with the line \documentclass[1ipt,twoside,a4paper]{article} ructs ITEX to typeset the document as an en points,and to produce a layout suit Table 1.1:Document Classes. article for articles in scientific journals,presentations,short reports,pro- gram documentation,invitations,.. proc a class for proceedings based on the article class. minimal is as small as it can get.It only sets a page size and a base font. It is mainly used for debugging purposes. report for longer reports containing several chapters,small books,PhD theses. book for real books serif letters.You might want to using the Be ead
1.6 The Layout of the Document 9 1.6 The Layout of the Document 1.6.1 Document Classes The first information LATEX needs to know when processing an input file is the type of document the author wants to create. This is specified with the \documentclass command. \documentclass[options]{class} Here class specifies the type of document to be created. Table 1.1 lists the document classes explained in this introduction. The LATEX 2ε distribution provides additional classes for other documents, including letters and slides. The options parameter customizes the behavior of the document class. The options have to be separated by commas. The most common options for the standard document classes are listed in Table 1.2. Example: An input file for a LATEX document could start with the line \documentclass[11pt,twoside,a4paper]{article} which instructs LATEX to typeset the document as an article with a base font size of eleven points, and to produce a layout suitable for double sided printing on A4 paper. Table 1.1: Document Classes. article for articles in scientific journals, presentations, short reports, program documentation, invitations, … proc a class for proceedings based on the article class. minimal is as small as it can get. It only sets a page size and a base font. It is mainly used for debugging purposes. report for longer reports containing several chapters, small books, PhD theses, … book for real books slides for slides. The class uses big sans serif letters. You might want to consider using the Beamer class instead