編輯軟體 latex 之簡介 min-shiang hwang ( 黃明祥 ) department of management information...

22
黃黃黃 編編編Latex 編編編 黃黃黃Latex 黃黃黃 Min-Shiang Hwang ( 黃黃黃 ) Department of Management Information Systems National Chung-Hsing University Email: [email protected] http://isrc.nchu.edu.tw/

Upload: lassie

Post on 18-Mar-2016

122 views

Category:

Documents


0 download

DESCRIPTION

編輯軟體 Latex 之簡介 Min-Shiang Hwang ( 黃明祥 ) Department of Management Information Systems National Chung-Hsing University Email: [email protected] http://isrc.nchu.edu.tw/. 安裝 Latex. 執行 CD 之 Autorun.exe ( 或從本課程教學個人網站下載 ). 開始編輯. 執行 WinEdt ( 或直接點選 tex 格式的檔案 ). 編輯 LaTeX 文件. First.tex. - PowerPoint PPT Presentation

TRANSCRIPT

Page 1: 編輯軟體 Latex 之簡介 Min-Shiang Hwang ( 黃明祥 ) Department of Management Information Systems

黃明祥

編輯軟體 Latex 之簡介

編輯軟體 Latex之簡介Min-Shiang Hwang

(黃明祥 )

Department of Management Information SystemsNational Chung-Hsing UniversityEmail: [email protected]

http://isrc.nchu.edu.tw/

Page 2: 編輯軟體 Latex 之簡介 Min-Shiang Hwang ( 黃明祥 ) Department of Management Information Systems

黃明祥

編輯軟體 Latex 之簡介安裝 Latex執行 CD之 Autorun.exe ( 或從本課程教學個人網站下載 )

Page 3: 編輯軟體 Latex 之簡介 Min-Shiang Hwang ( 黃明祥 ) Department of Management Information Systems

黃明祥

編輯軟體 Latex 之簡介執行 WinEdt ( 或直接點選 tex 格式的檔案 )開始編輯

Page 4: 編輯軟體 Latex 之簡介 Min-Shiang Hwang ( 黃明祥 ) Department of Management Information Systems

黃明祥

編輯軟體 Latex 之簡介First.tex編輯 LaTeX 文件

\documentclass[12pt, A4]{article} \begin{document} How are you!\end{document}

\documentclass[12pt, A4]{article} \begin{document} How are you! \end{document}

語法:\documentclass[ 參數 ]{ 格式 } 說明:

1. 標準的格式有 article 、 report 、 book 、 slides 、 letter 2. 使用的參數有 10pt( 內定文字的大小 )、 11pt 、 12pt 、 letterpaper( 內定紙張規格 )、 A4paper

Page 5: 編輯軟體 Latex 之簡介 Min-Shiang Hwang ( 黃明祥 ) Department of Management Information Systems

黃明祥

編輯軟體 Latex 之簡介latex first.texxdvi first.dvi

執行編譯 1. 執行 Latex 編譯 (產生 .dvi 檔案 )2. 產生 ps 格式檔2.產生 pdf 格式檔3.GSView 編譯結果

檔案名稱

Page 6: 編輯軟體 Latex 之簡介 Min-Shiang Hwang ( 黃明祥 ) Department of Management Information Systems

黃明祥

編輯軟體 Latex 之簡介檔頭

\documentclass[12pt,A4]{article}\title{The General Pay-Word}\author{Lin-Chang Lin \and Min-Shiang Hwang\footnote{Responsible for correspondence.}}\date{Oct. 30, 2006}\begin{document}\maketitle This is my first paper in Latex.\end{document}

設定標題 (title) 、作者 (author) 及日期 (date)

\date 日期;若忽略則內定為系統目前日期。\and 當作者多於一位的時候,就要用到此指令來分開。 \footnote 附註。

Page 7: 編輯軟體 Latex 之簡介 Min-Shiang Hwang ( 黃明祥 ) Department of Management Information Systems

黃明祥

編輯軟體 Latex 之簡介編譯結果

Page 8: 編輯軟體 Latex 之簡介 Min-Shiang Hwang ( 黃明祥 ) Department of Management Information Systems

黃明祥

編輯軟體 Latex 之簡介字型、段落、註解% second.tex\documentclass[12pt,a4paper]{article}\begin{document}This is roman.{\it This is italic.}\\{\bf This is boldface.}

And the default is roman.\end{document}

% 為註解指令所有空白當作一個空格

一個空列是一個段落的結束, 也就是下一個段落的開始粗體字型指令 \bf{text}斜體字型指令 \it{text}

\ 、 \\ 、 $、 &、 %、 #、 _ 等字元,稱為保留字元 若要列出保留字元,須加 \指令。如, \$ 、 \& 、 \% 、 \# 、 \_

\\ 本句 (列 )結束編譯結果

Page 9: 編輯軟體 Latex 之簡介 Min-Shiang Hwang ( 黃明祥 ) Department of Management Information Systems

黃明祥

編輯軟體 Latex 之簡介數學符號及方程式 \documentclass[12pt,a4]{article}\begin{document} The parameters $W_m$, $p^2$, and $q^{m+2}$.\end{document}

使用數學符號需放置在二個 $之間;例如 $x$ ^ 為指數 (上標 );例如 x2 ,則只要寫 $x^2$ _ 為下標;例如 x2 ,則只要寫 $x_2$ 如果指數或下標超過一個字元,就要用大括號括起來 例如 x-2 要寫 $x^{-2}$ ,而 x20 要寫 $x_{20}$編譯結果

Page 10: 編輯軟體 Latex 之簡介 Min-Shiang Hwang ( 黃明祥 ) Department of Management Information Systems

黃明祥

編輯軟體 Latex 之簡介\documentclass[12pt,a4]{article}\begin{document}The following equations:$$ \lim_{\Delta x\to 0} \frac{f(x_0+\Delta x) - f(x_0)}{\Delta x}$$\begin{eqnarray} a &=& p - (q+100), \nonumber\\ b &=& p - (i/q).\end{eqnarray}\end{document}

方程式獨立展示在一列方程式需放置在二個 $$ 之間

將二條式子以等號對齊不列出參考數 (標號 )

\frac{ 分子 }{分母 } % 分式表示指令

編譯結果

Page 11: 編輯軟體 Latex 之簡介 Min-Shiang Hwang ( 黃明祥 ) Department of Management Information Systems

黃明祥

編輯軟體 Latex 之簡介數學符號及方程式 \begin{eqnarray} \label{eq01} \left\{\begin{array}{rrll} K_i &=& K_i \times L_j & \mbox{~if~} I > j,\\ K_j &=& K_j + L_i & otherwise. \end{array} \right.\end{eqnarray}The access right is computed by Equation~(\ref{eq01}).

編譯結果

\label 設定參考標籤名稱為 eq01

\ref 引用參考標籤

\mbox{ 非數學符號 } 在數學方程式內要顯示非數學符號

~表示強迫空一格

Page 12: 編輯軟體 Latex 之簡介 Min-Shiang Hwang ( 黃明祥 ) Department of Management Information Systems

黃明祥

編輯軟體 Latex 之簡介編輯 LaTeX 文件 \begin{eqnarray*} \frac{1}{1 + \frac{1}{1 + \frac{1}{1 + \frac{1}{\cdots}}}}\end{eqnarray*}

編譯結果eqnarray* 不列出參考數 (標號 )

\cdots 中心三點 …\cdot 中心一點 .\ldots 下面三點 …\vdots 垂直三點

Page 13: 編輯軟體 Latex 之簡介 Min-Shiang Hwang ( 黃明祥 ) Department of Management Information Systems

黃明祥

編輯軟體 Latex 之簡介數學符號功能表單

這裡有各種數學符號可供選擇使用

Page 14: 編輯軟體 Latex 之簡介 Min-Shiang Hwang ( 黃明祥 ) Department of Management Information Systems

黃明祥

編輯軟體 Latex 之簡介條列

\begin{itemize}\item Information Security\item Management \item Information Science\end{itemize}

無序列舉 (itemize)

\begin{enumerate}\item Information Security\item Management \item Information Science\end{enumerate}

排序列舉 (enumerate) 編譯結果

Page 15: 編輯軟體 Latex 之簡介 Min-Shiang Hwang ( 黃明祥 ) Department of Management Information Systems

黃明祥

編輯軟體 Latex 之簡介條列

\begin{description}\item[IS:] Information Security\item[M:] Management \item[IN:] Information Science\end{description}

提示 (敘述 )列舉 (description) 編譯結果

由編輯者自行選擇代號或文字

Page 16: 編輯軟體 Latex 之簡介 Min-Shiang Hwang ( 黃明祥 ) Department of Management Information Systems

黃明祥

編輯軟體 Latex 之簡介編輯 LaTeX 簡單幾何圖 \begin{figure*}\begin{center}\setlength{\unitlength}{6.0mm}\begin{picture}(7,5)\put(1.5, 1){\circle{2.4}{A}}\put(5.5, 1){\circle{2.4}{B}}\put(0, 3){\framebox(7, 1){Pre-Subkeys}}\put(0, 5){\framebox(7, 1){Expanded Key}}\put(3.5, 5){\vector(0, -1){1}}\put(1.5, 3){\vector(0, -1){0.9}}\put(5.5, 3){\vector(0, -1){0.9}}\end{picture}\caption{The key scheduling algorithm}\label{f2}\end{center}\end{figure*}

figure*: 設定為圖形,*表以整頁顯示 (沒有 *則由半邊顯示 )設定座標點為 (1.5,1)畫一直徑為 2.4 單位長的圓畫一長為 7 寬為 1單位長的矩形

Page 17: 編輯軟體 Latex 之簡介 Min-Shiang Hwang ( 黃明祥 ) Department of Management Information Systems

黃明祥

編輯軟體 Latex 之簡介編輯 LaTeX 文件 \begin{table}[hbpt]\caption{The rotations}\label{t01}\begin{center}\begin{tabular}{|c|c|} \hline\hlineRotation in Round $i$ & Rotation Value \\ \hline\hline$0-Rot^1$ & 1 \\ \hline$1-Rot^1$ & 5 \\ \hline$2-Rot^2$ & 8 \\ \hline\hline\end{tabular}\end{center}\end{table}

畫二個欄位之表格 (文字在中央 ) \hline 畫一條線段

每一列需以 &來分隔欄位

Page 18: 編輯軟體 Latex 之簡介 Min-Shiang Hwang ( 黃明祥 ) Department of Management Information Systems

黃明祥

編輯軟體 Latex 之簡介LaTeX 論文架構 \begin{abstract}\setlength{\baselineskip}{24pt} \hspace*{6mm} This is an abstract.\end{abstract}\section{Introduction} This is an introduction section.\subsection{motivation} This is my motivation.\section{The Proposed Scheme} This is my method \cite{hwang2001}.

\begin{thebibliography}{1}\bibitem{hwang2001} M. S.~Hwang, I. C.~Lin. and L. H.~Li, ``A simple micro-payment scheme,'' {\em International Journal of Systems and Software}, vol.~55, no.~3, pp.~221--229, 2001.\end{thebibliography}

引用參考文獻

Page 19: 編輯軟體 Latex 之簡介 Min-Shiang Hwang ( 黃明祥 ) Department of Management Information Systems

黃明祥

編輯軟體 Latex 之簡介參考文獻

This is my paper. \input{p451}\newpage\bibliography{mk,cry}\bibliographystyle{IEEEstr}

可以將另外一個檔案 p451.tex插到此處\newpage 從新的一頁開始排版

參考文獻是從 mk.bib 及 cry.bib 引用參考文獻格式為 IEEEstr ,若設定為 unstr 則為內定格式

@ARTICLE{ams1986cr, AUTHOR = "J.~Amsterdam", TITLE = "Data Compression with Huffman Coding", JOURNAL = "Byte", VOLUME = "11", YEAR = "1986", PAGES = "98"}

mk.bib

Page 20: 編輯軟體 Latex 之簡介 Min-Shiang Hwang ( 黃明祥 ) Department of Management Information Systems

黃明祥

編輯軟體 Latex 之簡介bib 檔案 @BOOK{men1993b, AUTHOR = "Alfred J. Menezes", TITLE = "Elliptic Curve Public Key Cryptosystem", PUBLISHER = "Kluwer Academic Publishing", YEAR = "1993"}

@INPROCEEDINGS{aur1997cr, AUTHOR = "T. Aura and P. Nikander", TITLE = "Stateless Connections", BOOKTITLE = "International Conference on Network Security", PAGES = "87-97", PUBLISHER = "Springer-Verlag", SERIES = "Lecture Notes in Computer Science", VOLUME = "1334", ADDRESS = "Beijing, China", MONTH = "Nov.", YEAR = "1997"}

cty.bib

Page 21: 編輯軟體 Latex 之簡介 Min-Shiang Hwang ( 黃明祥 ) Department of Management Information Systems

黃明祥

編輯軟體 Latex 之簡介bib 檔案 @TECHREPORT{mic1993cr, AUTHOR = "S. Micali", TITLE = "Fair Cryptosystems", INSTITUTION = "MIT/LCS", YEAR = "1993", TYPE = "Technical", NUMBER = "TR-579.b"}

cty.bib 1. 執行 Latex 編譯 (產生 .dvi 檔案 )2. 執行 bibtex 程式 (產生 bbl 格式檔 )

5.GSView 編譯結果3.再執行 Latex 編譯二次

4. 產生 ps 格式檔

Page 22: 編輯軟體 Latex 之簡介 Min-Shiang Hwang ( 黃明祥 ) Department of Management Information Systems

黃明祥

編輯軟體 Latex 之簡介中文論文

1. 執行中文 Latex 編譯 (產生 .cdi 檔案 )

4.GSView 編譯結果

\documentclass[12pt,a4paper]{twarticle}\begin{document} 這是一篇中文論文\end{document} 2. 將 cdi轉成 dvi 格式

3. 產生 ps 格式檔