Document directory
- Tex
- Configure latex In Debian
- Configure tex on MacOSX
Tex
White space characters such as latex and tabs are considered as the same white space distance, and multiple are considered as one.
Latex uses empty rows to end a paragraph. Multiple empty rows are considered as one empty row.
# $ % ^ &_{}~ It is a special character and can be obtained only by adding a backslash.
The Tex command is in two forms: 1 is composed of a backslash and a letter, and 2 is composed of a backslash and a special character. The parameter is enclosed, you can also use [] to add some options.
Comment %
The structure of the Tex file:
Starts with/documentclass {...}, which specifies the document category
/Usepackage {...} calls some macro Sets
/Begin {document} starts the document
/End {document} ends the document and writes the body between begin and end.
Set document type/document [Options] {class} class to specify the type of the document to be created, such as Article technology issue, program document, and report
Reports, long reports, papers, books, slides, etc. Options can be used to set some options, such as paper and font.
For example, the/documentclass [11pt, twoside, a4paper] {Article} command sets the use of 11pt words, double-sided format, A4 paper.
Use macro package/usepackage [Options] {package}
Various latex files:
Tex: source file of Tex or latex
Sty: latex macro package
Dtx: file-based Tex file, the main format of latex macro package release
INS: Corresponding dtx Installation File
DVI: device-independent File
Log: Log File
TOC: stores chapter titles to generate directories.
Lof: similar to TOC, a graphical directory can be generated.
Lot: similar to TOC, table directory can be generated
Aux: Auxiliary file used to pass the next compilation Information
Idx: Contains indexes, which must be processed by makindex.
IND: The processed idx file, which can be added to the document at next compilation.
Ilg: The record file generated by running makeindex
Some macro packages released with latex:
Normalfontdoc: Typographical latex program documentation
Exscale: Provides scalable numeric font extensions
Normalfontfontenc: declare the font encoding used by latex
Ifthen: the prompt "If... then do... otherwise do..." appears ..."
Latexsym: Call this macro package to use the latex symbol in the document
Makeidx: Provides the index Generation Command.
Syntonly: Only processes documents and does not typeset them.
Inputenc: allows the declaration of ASCII, ISO Latin-1, IOS Latin-2, 437/850 IBM encoding page, Apple Macintosh, next, ANSI-windows or self-input Encoding
/// Or/newline
// * Forcibly disconnect the row and disable Paging
/Newpage starts a new page
/Mbox {text} put several words on the same line
/Fbox is similar to/mbox, and fbox draws a box around the content
Special commands:
/today
/TeX
/LaTeX
/LaTeXe
In Tex, two 'are used to generate the left quotation mark, two' are used to generate the right quotation mark, and one 'and' are used to generate the single quotation mark.
/Ldots ellipsis
Segmented commands
/section{...}
/subsection[...}
/subsubsection{...}
/paragraph{...}
/subparagraph{...}
For reports and books, there are also/part {...} And/Chapter {...} for segmentation
/Appendix without parameters. Change the marker of the chapter to a letter mark.
/Tableofcontents Insert the directory where it appears
/Underlint {text} underline
/Emph {text} Italic
/Begin {environment} text/end {environment} defines the environment, which can be nested
The itemize environment is used for a simple list, the enumerate environment is used for a list with serial numbers, and the description environment is used for a list with descriptions.
Flushleft and flushright generate paragraphs arranged on the left and right, and center generates center text.
Quote environment example reference, the quotation environment is used for more than a few long references, verse environment is used for poetry.
Text located between/begin {verbatim} And/eng {verbatim} will be printed directly, including broken lines and blank spaces, without executing any latex command.
The tabular environment is used to generate tables. Latex automatically determines the width of each column, and the/begin {tabular} {table spec} table
Spec defines the style of the table, uses an L column to produce the left alignment, uses an R column to produce the right alignment, and uses C to generate the center, use P {width} to generate columns with the corresponding width containing the automatically disconnected line text. | Lead Generation
Straight table line. In the tabular environment, use & to jump to the next column, start a new row with //, and insert a horizontal table line with/hline, use/Cline {J-I} to add some table lines.
J and I indicate the sequence numbers of the start and end columns of the table line.
The content enclosed in the Environment figure or table is considered floating content.
Configure latex In Debian
The default latex In Debian already supports Chinese characters. APT-Get install tetex-Base
Tetex-bin tetex-extra texmf-ZH, which is installed with tetex. Apt-Get install
CJK-latex. Run this command to install cjk4.5.1. Apt-Get install
Dvipdfm-CJK-cmap. This command installs several Chinese fonts of adobe. Apt-Get install
The TFM-aprhic * command will be installed with a Chinese font. Apt-Get install
Gbkfonts. This command will install a font conversion tool, which will be required when GBK is installed below. Now latex can process Chinese GB code and can be used in two fonts.
However, because the cjk4.5.1 In Debian does not support GBK, You need to configure it to process GBK.
Next we need to configure latex to support GBK. In order to make GBK and the original latex do not interfere, configure GBK in the user directory, create a texmf directory under the user directory
Copy simsun. TTF under ipvs to the fonts/TrueType directory of texmf and execute gbkfonts under texmf.
Fonts/TrueType/simsun. TTF
Song, which generates the font library we need. You can also generate font libraries with other fonts. To enable dvips to use CJK, you need to move the generated CJK. map to the dvips directory.
And edit the dvips/config. PS file (if not, copy one from/usr/share/texmf/dvips/config ).
Add "p" to the last line
+ CJK. Map ". To allow pdflatex to use CJK, copy the generated gdbsong. Map File to vertex Tex/config and edit vertex Tex.
/Config/tex Tex. cfg file (if not, copy one from/usr/share/texmf/pdftex/config), and add "Map
+ Gbksong. Map ", also added if there are multiple fonts. To make dvipdfm-CJK use CJK, You need to copy the generated cid-x.map
Under dvipdfm/config, and edit dvipdfm/config (if not, run/usr/share/texmf/dvipdfm from/usr/share/texmf/dvipdfm
/Config copy), add "f cid-x.map" at the end ". From http://cjk.ffii.org/
Download cjk4.5.2, and then place the entire folder in texmf/tex/latex. Run mktexlsr. Now you can use the pdflatex command to generate Chinese characters.
GBK documentation. However, you cannot use dvipdfmx, because only the PDF generated by dvipdfmx supports Chinese copying, So we apt-Get install
Dvipdfmx, and then you need to prepare the font for dvipdfm. You can use apt-Get install.
Dvipdfm-CJK-cmap, Some fonts will be installed when this package is installed, but some of my test results are still not supported, so I install
Copy the font in dvipdfm/cmap. Here, a PDF is provided to show which are simplified Chinese characters. You can copy the text as needed (if ctex is not installed, you only need to install Adobe
Reader, you can find cmap in the Adobe Reader directory). Now you can use dvipdfmx to generate PDF documents that support Chinese copying.
Configure tex on MacOSX
Reference http://www.livejournal.com/users/exaos/
In "exaos-configure Chinese latex environment on MacOS X. Configure tex in Mac OS X 10.3.5.
Use Fink to install the tetex system. Use CJK to configure Chinese characters to support Unicode and GBK.
You have learned about the Tex and TDS directory structures and the fonts used to generate Tex from TTF by using gbkfonts.