Latex-C1
Latex - Chapter 1
Chapter 1 : Elementary Knowledge
pronounciation: Lay-tech
- Continous many space is equal to one space.
- A blank line is used to end the paragraph. Several blank line is same as one.
- Escape character in latex is \. We use \ to get the reserved character, such as # $ % ^ & _ { } ~ \
- In latex, \\ is to get a new paragraph rather than \.
Latex Commands :
- It is variable between capital and lower-case.
- The Command starts with \, adds with letter, and ends up with space, number and other character.
- {} will provide a space after the commands.
- command{parameter}.
Annotate :
- % is for annotation.
- After %, the text, character in this line and the space in next line before the text will be neglected.
Framework :
- The file must start with \documentclass{…}
- We can use package to add new commands, with the \usepackage{…}
- After introduction, we can use \begin{document} to begin the document.
- After text, we use \end{document} to end.
Document Arragement
The type of the document will be provided from \documentclass[options]{class}.
In class, it state the type of document, i.e.
article, report, book, slides. article is for journal, short report, program, invitation. report is for long report, short book and doctoral dissertation. book is only for long book. slides is for powerpoint.
In options, we need to clarify the attribute of the document. For example, [11pt, twoside, a4paper] We can set these parameters.
- The font size can be set as 10/11/12pt, default for 10pt.
- The paper size can be set as a4paper/ a5paper/ letterpaper/ b5paper/ executivepaper/ legalpaper, default for letterpaper.
- fleqn is to make the mathematical formula at the left, rather than middle. leqno is to make the number of formula at the left.
- titlepage, notitlepage is to add a new page or not behind the document title. default in article for no new page, in contrast with that in book.
- onecolumn, twocolumn set the manner of the typeset with one or two column.
- twoside, oneside stand for the typeset with writting on both sides or one side. default in article and report is oneside, in reverse with that in book. But when it is printed, twoside and oneside is the same because it is only for typeset. So you need to set again for print.
- openright, openany defines the start of the chapter only in report and book. In report, default for openany. In book, default for openright.
\usepackage[options]{package} to make package in.
Page Styles :
Command : \pagestyle{style}
We can use this command to define the format of the header/footer.
The predefined set is plain, headings, empty.
We can use \thispagestyle{style} to define the page style of this page.
Big Document :
- \include{filename} add the filename.tex into the document. We need to know the LATEX will begin a new page before the filename.tex.
- \includeonly{filename,filename,filename,…}
- \input{filename} : simply include the file
Fast Check :
\usepackage{syntonly}
\syntaxonly
本博客所有文章除特别声明外,均采用 CC BY-SA 4.0 协议 ,转载请注明出处!