190 likes | 364 Views
統計應用軟體 Statistical Computations and Analysis. Lecture 2: Introduction of LaTeX / CwTex. Introduction of LaTeX / cwTeX. 文書排版軟體分為兩大類 : 幕前排版:使用方便 輸入文字時,軟體立即編排版面。 幕後排版:排版品質佳 1. 文書編輯軟體 輸入“文稿”與“排版指令” 2. 排版程式 編排文稿 3. 預覽軟體 觀看編排結果. Introduction of LaTeX / cwTeX. 輸入文稿 (Crimson Editor):
E N D
統計應用軟體Statistical Computations and Analysis Lecture 2: Introduction of LaTeX / CwTex
Introduction of LaTeX / cwTeX • 文書排版軟體分為兩大類: • 幕前排版:使用方便 輸入文字時,軟體立即編排版面。 • 幕後排版:排版品質佳 1.文書編輯軟體輸入“文稿”與“排版指令” 2.排版程式編排文稿 3.預覽軟體觀看編排結果
Introduction of LaTeX / cwTeX • 輸入文稿 (Crimson Editor): \documentclass{article} \begin{document} …(內文) \end{document} Example: lec2_1.ctx
輸入文稿 中英文字與數字: 除了右列特殊字元及鍵盤上無對應字元的文字外, 皆可直接在編輯軟體中輸入。
Crimson Editor Syntax • Document Syntax Type LaTeX: 顏色標示 TeX 指令
Introduction of LaTeX / cwTeX 2.排版程式編排文稿: (i) Tools cwTeX (ii) Tools LaTeX 3.預覽編排結果: (i) Tools DVIPS (ii) Tools GSVIEW
Introduction of LaTeX / cwTeX 2.排版程式編排文稿 &3.預覽編排結果 F9 F10 F11 F12 • F9: cwTeX 將中文字轉換為LaTeX字體 • F10: LaTeX 排版 • F11: 將描點字型轉換為描邊字型以利預覽 • F12: 開啟 GSview 預覽編排結果 Example: lec2_1.ctx
Introduction of LaTeX / cwTeX • 依照預設值, 產生的ps檔案存在 c:\xtemp目錄中。 • 將ps檔轉為pdf檔: ps2pdf In Crimson Edt: Tools ps2pdf
排版範例 Fact 1: 每段自動縮排 Fact 2: 空白一行代表換新一段 Fact 3: 換行或空白不影響排版結果
Let’s Try to Type Something on Your Own • 自行練習:網站連結 http://tw.news.yahoo.com/ 任選一則新聞內容, 例用LaTeX / CwTeX重新排版。 • Hint: Macros 選單中有常用中文標點符號及其快速鍵。
More Examples • 接下來將以幾個 CwTeX 的範例介紹常用的文稿輸入指令。 • 章節編排:C://texmf/cwtex/examples/Examp1.ctx • 條列:C://texmf/cwtex/examples/Examp3.ctx • 數學模式:lec2_3.ctx • 圖表:lec2_4.ctx • 浮動圖表:C://texmf/cwtex/examples/Examp4.ctx
細說文稿與指令輸入 1. 自動章節編排: • \section*{…} • \section{…} • \subsection{…} • \subsubsection{…} • 功用: 1. 標題自動編號, 標題大小依序遞減 2. 標題上下留空白 3. 章節第一段自動不內縮
\begin{itemize} \item … \end{itemize} \begin{enumerate} \item … \end{enumerate} \begin{description} \item[…] … \end{description} ● … ● … ● … 1. … 2. … 3. … … … … 細說文稿與指令輸入 2. 條列指令: itemize, enumerate, description 以\texmf\cwtex\examples\examp3.ctx為例
無數學式編號 具數學式編號 細說文稿與指令輸入 3. 數學模式: 數學式可能以兩種形式出現 (以 lec2_3.ctx 為例) • 夾在文章中的數學式: 只需在輸入數式時前後加上$ • 獨立成行的數學式: $$ … $$ \[ …\] \begin{equation} … \end{equation}
細說文稿與指令輸入 4. 在文件中加入圖表: 以lec2_4.ctx為例 • \usepackage{graphicx} • \includegrahics[ control ]{ filename.ps } • control: width, height, angle • \begin{tabular}{ control } & & … & \\ \end{tabular} • control: c = center, l = left, r = right
細說文稿與指令輸入 5. 浮動圖表: 以examp4.ctx為例 • \usepackage{graphicx,booktabs} • position: default: h-t-b-p t = top, b = bottom, h = here, p = a new page • \begin{figure}[position] • \centering • \includegraphics[..]{..} • \caption{…} • \end{figure} • \begin{table}[position] • \centering • \caption{…} • \medskip • \begin{tabular}[ctrl] • … • \end{tabular} • \end{table}
細說文稿與指令輸入 • 其它排版控制 (如: 字型、字體大小、粗斜體…等) 請參見“cwTeX排版系統”。 • 電子檔: http://ccms.ntu.edu.tw/~ntut019/cwtex/cxbook3.pdf
文稿輸入原則 • 中文稿輸入: • 句子內的中文字之間勿留下空白。 • 換新行盡量在標點符號之後或斷行處加%。 • 中文標點符號輸入: Crimson Edt: Macros。 • 中文排版需加寬行距至 18-20 pt 間。 • 數式輸入: • 隨文數式$前後需加空白。 • 展式數式前不需多加一行空白。