Upload
hathuy
View
226
Download
1
Embed Size (px)
Citation preview
LATEX
Chen-Ching Ting(丁振卿)
Mechanical Engineering, National Taipei University of Technology(國立台北科技大學機械系)
Homepage: http://cct.me.ntut.edu.tw/E-mail: [email protected]
February 24, 2010
Chen-Ching Ting (丁振卿) Mechanical Engineering, National Taipei University of Technology (國立台北科技大學機械系) Homepage: http://cct.me.ntut.edu.tw/ E-mail: [email protected] ()LATEX February 24, 2010 1 / 73
課程大綱 I
1 程式安裝Windows XP
WinEdt - EditorTexmaker - EditorMikTeX - Compiler
Ubuntu Linux 9.1Kile - EditorTexmaker - EditorTexmf - Compiler
2 文章編輯一般結構特殊效果
3 投影片製作安裝套件環境設置
4 轉LATEX到HTMLChen-Ching Ting (丁振卿) Mechanical Engineering, National Taipei University of Technology (國立台北科技大學機械系) Homepage: http://cct.me.ntut.edu.tw/ E-mail: [email protected] ()LATEX February 24, 2010 2 / 73
課程大綱 II
latex2htmltex4ht
Chen-Ching Ting (丁振卿) Mechanical Engineering, National Taipei University of Technology (國立台北科技大學機械系) Homepage: http://cct.me.ntut.edu.tw/ E-mail: [email protected] ()LATEX February 24, 2010 3 / 73
參考文獻
丁振卿,計算機概論。
廖榮貴研究室,計算機概論,文魁資訊股份有限公司,2003。
http://www.cmlab.csie.ntu.edu.tw/∼r92045/Collection of LaTeX Solutions.htm
Chen-Ching Ting (丁振卿) Mechanical Engineering, National Taipei University of Technology (國立台北科技大學機械系) Homepage: http://cct.me.ntut.edu.tw/ E-mail: [email protected] ()LATEX February 24, 2010 4 / 73
程式安裝 Windows XP
編輯程式(ASCII Editor)
編寫程式所需的工具不外乎三項,『編輯程式』、『編譯程式』及『瀏覽程式』。編輯程式必須為可儲存成ASCII 碼,即一般TXT 檔的文書編輯程式,如微軟所提供的Notepad。當然,一個好的編輯程式最好能夠提供編譯時所需的連結按鍵,以方便編輯好的程式直接測試。另外巨集編寫等功能可說非常重要,在介紹程式語言之前先介紹一個功能非常強大的ASCII 編輯程式- WinEdt,WinEdt 為一共享軟體(Shareware),有關軟體的介紹可參看網站”www.winedt.com”,在此將對如何使用此編輯程式作介紹,WinEdt 是一個提供支援多種程式語言的微軟視窗ASCII 編輯程式,它不但提供給使用者非常大的修改及自定Menu 和Icon 空間,尤甚者,它提供了非常簡單的具集編寫和輸入方法,而且它能讀取的非常大的檔案,可說是程式編輯者的極有力助手。
Chen-Ching Ting (丁振卿) Mechanical Engineering, National Taipei University of Technology (國立台北科技大學機械系) Homepage: http://cct.me.ntut.edu.tw/ E-mail: [email protected] ()LATEX February 24, 2010 5 / 73
程式安裝 Windows XP
WinEdt - Editor
Chen-Ching Ting (丁振卿) Mechanical Engineering, National Taipei University of Technology (國立台北科技大學機械系) Homepage: http://cct.me.ntut.edu.tw/ E-mail: [email protected] ()LATEX February 24, 2010 6 / 73
程式安裝 Windows XP
WinEdt
WinEdt 除了支援單碼(8bit)的拉丁(Latin)文字編輯外,當然也支援雙碼(16bit)的東方語系文字(CJK)編輯,以滑鼠選擇Menu 的Options 下的Settings,再將”Wide (16bit) Characters Enabled”選項打勾後確定及完成。
Chen-Ching Ting (丁振卿) Mechanical Engineering, National Taipei University of Technology (國立台北科技大學機械系) Homepage: http://cct.me.ntut.edu.tw/ E-mail: [email protected] ()LATEX February 24, 2010 7 / 73
程式安裝 Windows XP
WinEdt
Chen-Ching Ting (丁振卿) Mechanical Engineering, National Taipei University of Technology (國立台北科技大學機械系) Homepage: http://cct.me.ntut.edu.tw/ E-mail: [email protected] ()LATEX February 24, 2010 8 / 73
程式安裝 Windows XP
WinEdt
WinEdt 還提供了自動同步檢查拼字的功能,其字庫除了WinEdt 本身所提供的之外,還提供了讓使用者自定的功能,對於論文的寫作可說提供了極大的方便,以滑鼠選擇”Menu” 的”Options”下的”Dictionary” 便可進入字典設定。
Chen-Ching Ting (丁振卿) Mechanical Engineering, National Taipei University of Technology (國立台北科技大學機械系) Homepage: http://cct.me.ntut.edu.tw/ E-mail: [email protected] ()LATEX February 24, 2010 9 / 73
程式安裝 Windows XP
WinEdt
WinEdt 允許對不同的檔案格式作個別的語言設定,當欲增加新字庫時,只需先以滑鼠
左鍵點擊”Dictionaries” 下的任一本字庫,再點擊滑鼠右鍵並選擇Insert 便可增加字
庫,當然得指定正確的字庫路徑,若字庫被選擇”Load On Start”,則表示當開
啟WinEdt 時便同時開啟所選字庫的自動檢查,若字庫被選擇”Add New Words”,即表
示在寫作時,若遇到字庫內沒有的字時,可以手動的方式增加到所指的字庫內,以便而
後自動檢查,當然要將字庫同時選擇”Save On Exit”,以便當結束WinEdt 時,所做的
字庫增加結果完成存檔。
Chen-Ching Ting (丁振卿) Mechanical Engineering, National Taipei University of Technology (國立台北科技大學機械系) Homepage: http://cct.me.ntut.edu.tw/ E-mail: [email protected] ()LATEX February 24, 2010 10 / 73
程式安裝 Windows XP
WinEdt
WinEdt 提供給使用者極大的空間自己設定Menu,其方法為由選單(Menu)的Options 進入Menu Setup,或者以滑鼠右鍵點擊選單(Menu)或者Icon 位置。
Chen-Ching Ting (丁振卿) Mechanical Engineering, National Taipei University of Technology (國立台北科技大學機械系) Homepage: http://cct.me.ntut.edu.tw/ E-mail: [email protected] ()LATEX February 24, 2010 11 / 73
程式安裝 Windows XP
WinEdt
Chen-Ching Ting (丁振卿) Mechanical Engineering, National Taipei University of Technology (國立台北科技大學機械系) Homepage: http://cct.me.ntut.edu.tw/ E-mail: [email protected] ()LATEX February 24, 2010 12 / 73
程式安裝 Windows XP
WinEdt
Chen-Ching Ting (丁振卿) Mechanical Engineering, National Taipei University of Technology (國立台北科技大學機械系) Homepage: http://cct.me.ntut.edu.tw/ E-mail: [email protected] ()LATEX February 24, 2010 13 / 73
程式安裝 Windows XP
WinEdt
WinEdt 所提供編輯與修改次層選單(Submenu)的方式有下列四項,即Command、Macro、Utility與Document。
Command: 此項功能為了快速呼叫WinEdt 內定的命令,設定好後便可在選單上進行命令呼叫。
Macro: 此項功能為WinEdt 所提供的超強具集(macro)輸入,所謂具集(macro)指的是以一個簡短名稱代替多個語句或指令、甚至一長串文字或文章,當點擊此簡短名稱時,便可將其所代表的內容輸入所開啟的檔案內,善用具集(macro) 的強大功能將能對程式編輯提供無可言語的快便,WinEdt 的最大長處便是提供非常簡便的具集(macro)編寫與修改。WinEdt 所提供的具集(macro)編寫與修改分為兩種方式進行,一種為直接在具集(macro)命令行內寫入欲輸入的字串,另一種則將欲輸入的內容先編寫並儲存在一個文字檔案內,然後再於具集(macro)命令行下以呼叫此一文字檔案,並將此一文字檔案的內容輸入在所開啟的檔案內,WinEdt 對此輸入方式和其他的編輯程式(Editor)不同,WinEdt 將事先編輯好的文字檔完全不變的輸入於所開啟的檔案內,並不需要增加任何的額外學習,因此編寫具集(macro)可說非常簡單,下面的指令行為直接在具集(macro)命令行內寫入欲輸入的字串的例子,在雙引號內(” ”)的內容將會被輸入於所開啟的檔案內,只要將雙引號內(” ”)的內容做修改便能輕易的編寫其他的具集(macro)。
[SetSel(0);Ins("\usepackage{CJK}")]
Chen-Ching Ting (丁振卿) Mechanical Engineering, National Taipei University of Technology (國立台北科技大學機械系) Homepage: http://cct.me.ntut.edu.tw/ E-mail: [email protected] ()LATEX February 24, 2010 14 / 73
程式安裝 Windows XP
WinEdt
接下來的指令為輸入一文字檔進入所開啟檔案的命令,在此行命令內只需修改ReadFile 後面括弧內的雙引號內(” ”)的文字檔案名稱即可,其中%B 代表WinEdt 的程式主資料夾,例如,如果WinEdt 程式被安裝在d:\program\editor\winedt 內,那麼%B 即是d:\program\editor\winedt的意思,還有,WinEdt 還提供了Bullet 的特殊符號,當在編輯欲輸入的文字檔時,可與此文字檔內需要之後填寫內容的地方以Bullet 的特殊符號作記號,方便輸入之後進行再編輯。
[SetSel(0);Mark(9);ReadFile("%B\tex\macros\doc\article\articlech.tex",9);
InsLine;CMD("Go To Beginning Of Line");InsText("%!9");Goto(9);
CMD("Next Bullet")]
Chen-Ching Ting (丁振卿) Mechanical Engineering, National Taipei University of Technology (國立台北科技大學機械系) Homepage: http://cct.me.ntut.edu.tw/ E-mail: [email protected] ()LATEX February 24, 2010 15 / 73
程式安裝 Windows XP
WinEdt
Utility: WinEdt 提供此項功能目的在快速呼叫工作程式與下達執行命令,若要在WinEdt 上呼叫工作程式,只需在”Menu Setup” 的”Submenu” 內以滑鼠左鍵先點擊在欲增加的位置,在以滑鼠右鍵點擊並選擇”Insert” 內的”Utility”,參看圖形??下,在”Utility”的位置填入工作程式的執行檔便可(這裡要特別注意,如果未事先設定好工作程式的路徑(path),那麼必須完整填寫含完整路徑的工作程式執行檔。),另外在下達執行命令的部分,WinEdt 提供了一個強大的語言,利用此語言編寫好的檔案存為.edt 的檔名後便可直接呼叫,在此並不是要介紹此種語言,而是要介紹利用微軟DOS 模式所提供的強大批次檔(batch)功能,也就是簡單將欲下達的指令先以批次檔(batch)的方式寫下並存為.bat 檔名,再呼叫此批次檔(batch)命其執行於完成的工作,底下為呼叫GNU C Compiler (gcc)進行編譯檔案的批次檔(batch)寫法範例,將星號內的內容儲存成gcc.bat 後再呼叫gcc.bat 便可進行編譯工作。
@echo on
gcc.exe -Wall %1.c -o %1.exe -lm
pause
在”Utility” 內填入如下的命令行後,便可點擊並呼叫此項工作,命令行中%N為欲編譯的檔案名稱不含屬性,例如:檔案file.c ,在此%N 等於file。
%B\gcc\bin\gcc.bat %N
在此如欲編譯的檔案名稱含屬性的寫法為%N%T。
Chen-Ching Ting (丁振卿) Mechanical Engineering, National Taipei University of Technology (國立台北科技大學機械系) Homepage: http://cct.me.ntut.edu.tw/ E-mail: [email protected] ()LATEX February 24, 2010 16 / 73
程式安裝 Windows XP
WinEdt
Document: WinEdt 提供此項功能目的在幫助電腦工作者整理與分類檔案並快速呼叫以進行編輯,在由”Menu Setup” 進入”Submenu” 並選擇”Insert” 內的”Document”後,可於”Document” 內直接填入檔案位置與名稱,或者在”Document” 的空格上按滑鼠右鍵並選擇”Browse” ,藉”Browse” 功能找尋填入檔案位置與名稱。
Chen-Ching Ting (丁振卿) Mechanical Engineering, National Taipei University of Technology (國立台北科技大學機械系) Homepage: http://cct.me.ntut.edu.tw/ E-mail: [email protected] ()LATEX February 24, 2010 17 / 73
程式安裝 Windows XP
WinEdt
Chen-Ching Ting (丁振卿) Mechanical Engineering, National Taipei University of Technology (國立台北科技大學機械系) Homepage: http://cct.me.ntut.edu.tw/ E-mail: [email protected] ()LATEX February 24, 2010 18 / 73
程式安裝 Windows XP
WinEdt
Chen-Ching Ting (丁振卿) Mechanical Engineering, National Taipei University of Technology (國立台北科技大學機械系) Homepage: http://cct.me.ntut.edu.tw/ E-mail: [email protected] ()LATEX February 24, 2010 19 / 73
程式安裝 Windows XP
WinEdt
Chen-Ching Ting (丁振卿) Mechanical Engineering, National Taipei University of Technology (國立台北科技大學機械系) Homepage: http://cct.me.ntut.edu.tw/ E-mail: [email protected] ()LATEX February 24, 2010 20 / 73
程式安裝 Windows XP
WinEdt
Chen-Ching Ting (丁振卿) Mechanical Engineering, National Taipei University of Technology (國立台北科技大學機械系) Homepage: http://cct.me.ntut.edu.tw/ E-mail: [email protected] ()LATEX February 24, 2010 21 / 73
程式安裝 Windows XP
WinEdt
Chen-Ching Ting (丁振卿) Mechanical Engineering, National Taipei University of Technology (國立台北科技大學機械系) Homepage: http://cct.me.ntut.edu.tw/ E-mail: [email protected] ()LATEX February 24, 2010 22 / 73
程式安裝 Windows XP
WinEdt
Chen-Ching Ting (丁振卿) Mechanical Engineering, National Taipei University of Technology (國立台北科技大學機械系) Homepage: http://cct.me.ntut.edu.tw/ E-mail: [email protected] ()LATEX February 24, 2010 23 / 73
程式安裝 Windows XP
Texmaker - Editor
Chen-Ching Ting (丁振卿) Mechanical Engineering, National Taipei University of Technology (國立台北科技大學機械系) Homepage: http://cct.me.ntut.edu.tw/ E-mail: [email protected] ()LATEX February 24, 2010 24 / 73
程式安裝 Windows XP
Texmaker
隨著中文LATEX發展進入UTF8編碼,解決了BIG5編碼時代必須先行鎖碼再編譯的麻煩,也讓中文LATEX與拉丁文共同使用更方便,沒有溝槽,即LATEX在使用中文時不再需要特別指令。但在微軟系統習慣BIG5碼的環境下,Texmaker是一個提供在微軟系統下進行UTF8編碼的LATEX專用免費編輯程式,Texmaker是一個從Linux重新編譯給Windows使用的程式,即Texmaker 具有Linux及Windows版本。
Chen-Ching Ting (丁振卿) Mechanical Engineering, National Taipei University of Technology (國立台北科技大學機械系) Homepage: http://cct.me.ntut.edu.tw/ E-mail: [email protected] ()LATEX February 24, 2010 25 / 73
程式安裝 Windows XP
Texmaker
Chen-Ching Ting (丁振卿) Mechanical Engineering, National Taipei University of Technology (國立台北科技大學機械系) Homepage: http://cct.me.ntut.edu.tw/ E-mail: [email protected] ()LATEX February 24, 2010 26 / 73
程式安裝 Windows XP
MikTeX 2.8
Chen-Ching Ting (丁振卿) Mechanical Engineering, National Taipei University of Technology (國立台北科技大學機械系) Homepage: http://cct.me.ntut.edu.tw/ E-mail: [email protected] ()LATEX February 24, 2010 27 / 73
程式安裝 Windows XP
MikTeX 2.8安裝
1 從http://cct.me.ntut.edu.tw/下載Miktex 2.8。
2 解壓縮後點兩下basic-miktex-2.8.3582.exe開始安裝。
3 安裝好以後,從開始→所有程式→MikTex可以找到”Update”,進去後也是一直按下一步,把目前安裝的MikTex更新到最新版。
4 在命令提示字元下執行texhash、updmap,讓MikTex重新抓字型設定。
5 安裝中文楷書bkai字型,解壓縮bkai.zip後得到texmf資料夾,把它放到你高興的地方。
6 開始→所有程式→MikTex→Settings→Root頁籤,Add剛才你的字型資料夾。(如果放在C:�就是C:�texmf)
7 開始→所有程式→MikTex→Settings→General,Update Formats。
8 update.bat
Chen-Ching Ting (丁振卿) Mechanical Engineering, National Taipei University of Technology (國立台北科技大學機械系) Homepage: http://cct.me.ntut.edu.tw/ E-mail: [email protected] ()LATEX February 24, 2010 28 / 73
程式安裝 Ubuntu Linux 9.1
Kile - Editor
Chen-Ching Ting (丁振卿) Mechanical Engineering, National Taipei University of Technology (國立台北科技大學機械系) Homepage: http://cct.me.ntut.edu.tw/ E-mail: [email protected] ()LATEX February 24, 2010 29 / 73
程式安裝 Ubuntu Linux 9.1
Kile
Chen-Ching Ting (丁振卿) Mechanical Engineering, National Taipei University of Technology (國立台北科技大學機械系) Homepage: http://cct.me.ntut.edu.tw/ E-mail: [email protected] ()LATEX February 24, 2010 30 / 73
程式安裝 Ubuntu Linux 9.1
Texmaker - Editor
Chen-Ching Ting (丁振卿) Mechanical Engineering, National Taipei University of Technology (國立台北科技大學機械系) Homepage: http://cct.me.ntut.edu.tw/ E-mail: [email protected] ()LATEX February 24, 2010 31 / 73
程式安裝 Ubuntu Linux 9.1
Texmaker
Chen-Ching Ting (丁振卿) Mechanical Engineering, National Taipei University of Technology (國立台北科技大學機械系) Homepage: http://cct.me.ntut.edu.tw/ E-mail: [email protected] ()LATEX February 24, 2010 32 / 73
程式安裝 Ubuntu Linux 9.1
Texmf - Compiler
Chen-Ching Ting (丁振卿) Mechanical Engineering, National Taipei University of Technology (國立台北科技大學機械系) Homepage: http://cct.me.ntut.edu.tw/ E-mail: [email protected] ()LATEX February 24, 2010 33 / 73
程式安裝 Ubuntu Linux 9.1
Texmf安裝
安裝cjk-latex, latex-cjk-chinese, latex-cjk-chinese-arphic-bkai00mp,latex-beamer等套件。
Chen-Ching Ting (丁振卿) Mechanical Engineering, National Taipei University of Technology (國立台北科技大學機械系) Homepage: http://cct.me.ntut.edu.tw/ E-mail: [email protected] ()LATEX February 24, 2010 34 / 73
文章編輯
文文文章章章編編編輯輯輯
Chen-Ching Ting (丁振卿) Mechanical Engineering, National Taipei University of Technology (國立台北科技大學機械系) Homepage: http://cct.me.ntut.edu.tw/ E-mail: [email protected] ()LATEX February 24, 2010 35 / 73
文章編輯 一般結構
一般結構
1 頁面設置
2 目錄設置
3 章節
4 條列式表達
5 數學表達與特殊符號
6 表格
7 圖片
8 參考資料
9 參照
10 索引
Chen-Ching Ting (丁振卿) Mechanical Engineering, National Taipei University of Technology (國立台北科技大學機械系) Homepage: http://cct.me.ntut.edu.tw/ E-mail: [email protected] ()LATEX February 24, 2010 36 / 73
文章編輯 一般結構
頁面設置\setlength{\textheight}{235mm}
Chen-Ching Ting (丁振卿) Mechanical Engineering, National Taipei University of Technology (國立台北科技大學機械系) Homepage: http://cct.me.ntut.edu.tw/ E-mail: [email protected] ()LATEX February 24, 2010 37 / 73
文章編輯 一般結構
目錄設置\tableofcontents
Chen-Ching Ting (丁振卿) Mechanical Engineering, National Taipei University of Technology (國立台北科技大學機械系) Homepage: http://cct.me.ntut.edu.tw/ E-mail: [email protected] ()LATEX February 24, 2010 38 / 73
文章編輯 一般結構
圖形目錄設置\listoffigures
Chen-Ching Ting (丁振卿) Mechanical Engineering, National Taipei University of Technology (國立台北科技大學機械系) Homepage: http://cct.me.ntut.edu.tw/ E-mail: [email protected] ()LATEX February 24, 2010 39 / 73
文章編輯 一般結構
表格目錄設置\listoftables
Chen-Ching Ting (丁振卿) Mechanical Engineering, National Taipei University of Technology (國立台北科技大學機械系) Homepage: http://cct.me.ntut.edu.tw/ E-mail: [email protected] ()LATEX February 24, 2010 40 / 73
文章編輯 一般結構
章節
1 book:1 part2 chapter3 section4 subsection5 subsubsection6 paragraph7 subparagraph
1 article:1 section2 subsection3 subsubsection4 paragraph5 subparagraph
2 report:
3 letter:
\part{部份}\chapter{章}\subsection{節}
Chen-Ching Ting (丁振卿) Mechanical Engineering, National Taipei University of Technology (國立台北科技大學機械系) Homepage: http://cct.me.ntut.edu.tw/ E-mail: [email protected] ()LATEX February 24, 2010 41 / 73
文章編輯 一般結構
條列式表達
\begin{itemize}\item A\item B\end{itemize}
A
B
\begin{enumerate}\item A\item B\end{enumerate}
1 A
2 B
\begin{description}\item[A] A\item[B] B\end{description}
A A
B B
Chen-Ching Ting (丁振卿) Mechanical Engineering, National Taipei University of Technology (國立台北科技大學機械系) Homepage: http://cct.me.ntut.edu.tw/ E-mail: [email protected] ()LATEX February 24, 2010 42 / 73
文章編輯 一般結構
數學表達與特殊符號\usepackage{latexsym}
\begin{eqnarray}y&=&x^2+2\\z&=&x^2+y^3\end{eqnarray}
$\alpha$$\beta$$\gamma$
Chen-Ching Ting (丁振卿) Mechanical Engineering, National Taipei University of Technology (國立台北科技大學機械系) Homepage: http://cct.me.ntut.edu.tw/ E-mail: [email protected] ()LATEX February 24, 2010 43 / 73
文章編輯 一般結構
表格
\begin{table}[htb!]\begin{center}\begin{tabular}{|c|c|c|}\hline內容&內容&內容\\\hline內容&內容&內容\\\hline內容&內容&內容\\\hline\end{tabular}\end{center}\caption{{\bf 解說}}\label{標籤}\end{table}
Chen-Ching Ting (丁振卿) Mechanical Engineering, National Taipei University of Technology (國立台北科技大學機械系) Homepage: http://cct.me.ntut.edu.tw/ E-mail: [email protected] ()LATEX February 24, 2010 44 / 73
文章編輯 一般結構
圖片\usepackage{graphicx}
\begin{figure}[htb!]\centering\includegraphics[angle=0,width=0.9\textwidth]{fig/圖片檔}\caption{{\bf 解說}}\label{標籤}\end{figure}
Chen-Ching Ting (丁振卿) Mechanical Engineering, National Taipei University of Technology (國立台北科技大學機械系) Homepage: http://cct.me.ntut.edu.tw/ E-mail: [email protected] ()LATEX February 24, 2010 45 / 73
文章編輯 一般結構
參考資料
Chen-Ching Ting (丁振卿) Mechanical Engineering, National Taipei University of Technology (國立台北科技大學機械系) Homepage: http://cct.me.ntut.edu.tw/ E-mail: [email protected] ()LATEX February 24, 2010 46 / 73
文章編輯 一般結構
參照file.bib
\label{標籤}\ref{標籤}
@ARTICLE{參考資料代號,author = {{\rm 作者}},title = {{\it 標題}},journal = {{\rm 雜誌}},year = {{\rm 年代}},volume = {{\bf 冊}},number = {{\rm 號碼}},pages = {{\rm 頁}},note = {{\rm 註解}},file = F
}\cite{參考資料代號}
Chen-Ching Ting (丁振卿) Mechanical Engineering, National Taipei University of Technology (國立台北科技大學機械系) Homepage: http://cct.me.ntut.edu.tw/ E-mail: [email protected] ()LATEX February 24, 2010 47 / 73
文章編輯 一般結構
參照
\begin{thebibliography}{1}
\bibitem{Bejan88} A. Bejan, {\it Advanced Engineering Thermodynamics}, Wiley,
New York, 1988.
\end{thebibliography}
Chen-Ching Ting (丁振卿) Mechanical Engineering, National Taipei University of Technology (國立台北科技大學機械系) Homepage: http://cct.me.ntut.edu.tw/ E-mail: [email protected] ()LATEX February 24, 2010 48 / 73
文章編輯 一般結構
索引\usepackage{makeidx}
替代能源\index{替代能源}
Chen-Ching Ting (丁振卿) Mechanical Engineering, National Taipei University of Technology (國立台北科技大學機械系) Homepage: http://cct.me.ntut.edu.tw/ E-mail: [email protected] ()LATEX February 24, 2010 49 / 73
文章編輯 特殊效果
特殊效果
1 Headers and Footers – fancyhdr.sty
2 轉PDF檔之A4格式成A5格式
3 設定背景顏色
4 設定字體顏色
5 設定背景圖案
Chen-Ching Ting (丁振卿) Mechanical Engineering, National Taipei University of Technology (國立台北科技大學機械系) Homepage: http://cct.me.ntut.edu.tw/ E-mail: [email protected] ()LATEX February 24, 2010 50 / 73
文章編輯 特殊效果
Headers and Footers – fancyhdr.sty
\usepackage{fancyhdr,lastpage}
\pagestyle{fancy}
\renewcommand{\headrulewidth}{0pt}
\chead{{\rm {\footnotesize 第十五屆中華民國振動與噪音工程學術研討會~台北~中華民國九十六年六月十六日\\
The 15$^{th}$ National Conference on Sound and Vibration, Taipei, June 16, 2007}}}
\lhead{}
\rhead{}
headrulewidth為定義線條粗細,lhead、chead、rhead為個別定義Head文字左、中、右對期。
Chen-Ching Ting (丁振卿) Mechanical Engineering, National Taipei University of Technology (國立台北科技大學機械系) Homepage: http://cct.me.ntut.edu.tw/ E-mail: [email protected] ()LATEX February 24, 2010 51 / 73
文章編輯 特殊效果
轉PDF檔之A4格式成A5格式
\NeedsTeXFormat{LaTeX2e}\documentclass[10pt,a4paper,landscape]{article}\usepackage{pdfpages}\begin{document}\includepdf[pages={1-14}, nup=2, scale=1]{report.pdf}\end{document}
Chen-Ching Ting (丁振卿) Mechanical Engineering, National Taipei University of Technology (國立台北科技大學機械系) Homepage: http://cct.me.ntut.edu.tw/ E-mail: [email protected] ()LATEX February 24, 2010 52 / 73
文章編輯 特殊效果
設定背景顏色
\usepackage{color}\definecolor{pink}{rgb}{1,0.5,0.5}\pagecolor{pink}
Chen-Ching Ting (丁振卿) Mechanical Engineering, National Taipei University of Technology (國立台北科技大學機械系) Homepage: http://cct.me.ntut.edu.tw/ E-mail: [email protected] ()LATEX February 24, 2010 53 / 73
文章編輯 特殊效果
設定字體顏色
\usepackage{color}\definecolor{pink}{rgb}{1,0.5,0.5}\color{pink}
Chen-Ching Ting (丁振卿) Mechanical Engineering, National Taipei University of Technology (國立台北科技大學機械系) Homepage: http://cct.me.ntut.edu.tw/ E-mail: [email protected] ()LATEX February 24, 2010 54 / 73
文章編輯 特殊效果
設定背景圖案
\usepackage{eso-pic}\newcommand\BackgroundPic{\put(0,0){\parbox[b][\paperheight]{\paperwidth}{\vfill\centering\includegraphics[width=\paperwidth,height=\paperheight,keepaspectratio]{fig/cctlogo}\vfill}}}\begin{document}\AddToShipoutPicture{\BackgroundPic}
Chen-Ching Ting (丁振卿) Mechanical Engineering, National Taipei University of Technology (國立台北科技大學機械系) Homepage: http://cct.me.ntut.edu.tw/ E-mail: [email protected] ()LATEX February 24, 2010 55 / 73
投影片製作
投投投影影影片片片製製製作作作
Chen-Ching Ting (丁振卿) Mechanical Engineering, National Taipei University of Technology (國立台北科技大學機械系) Homepage: http://cct.me.ntut.edu.tw/ E-mail: [email protected] ()LATEX February 24, 2010 56 / 73
投影片製作 安裝套件
安安安裝裝裝套套套件件件
Chen-Ching Ting (丁振卿) Mechanical Engineering, National Taipei University of Technology (國立台北科技大學機械系) Homepage: http://cct.me.ntut.edu.tw/ E-mail: [email protected] ()LATEX February 24, 2010 57 / 73
投影片製作 安裝套件
latex-beamer套件安裝
在Ubuntu Linux 9.1下將latex-beamer套件安裝好,安裝物件的路徑為/usr/share/texmf/tex/latex/beamer
Chen-Ching Ting (丁振卿) Mechanical Engineering, National Taipei University of Technology (國立台北科技大學機械系) Homepage: http://cct.me.ntut.edu.tw/ E-mail: [email protected] ()LATEX February 24, 2010 58 / 73
投影片製作 環境設置
環環環境境境設設設置置置
Chen-Ching Ting (丁振卿) Mechanical Engineering, National Taipei University of Technology (國立台北科技大學機械系) Homepage: http://cct.me.ntut.edu.tw/ E-mail: [email protected] ()LATEX February 24, 2010 59 / 73
投影片製作 環境設置
環境基本架構- BIG5碼
\documentclass[cjk]{beamer}\usepackage{CJK}\usetheme{AnnArbor}\usepackage{array}\setlength{\extrarowheight}{4pt}\logo{\includegraphics[height=0.5cm]{fig/cctlogo}\includegraphics[height=0.5cm]{fig/ntutlogo}}\begin{document}\begin{CJK*}{Bg5}{kai}\begin{frame}\frametitle{大綱}
內容\end{frame}\end{CJK*}\end{document}
Chen-Ching Ting (丁振卿) Mechanical Engineering, National Taipei University of Technology (國立台北科技大學機械系) Homepage: http://cct.me.ntut.edu.tw/ E-mail: [email protected] ()LATEX February 24, 2010 60 / 73
投影片製作 環境設置
環境基本架構- UTF8碼
\documentclass[unicode]{beamer}\usepackage{CJKutf8}\usetheme{AnnArbor}\usepackage{array}\setlength{\extrarowheight}{4pt}\logo{\includegraphics[height=0.5cm]{fig/cctlogo}\includegraphics[height=0.5cm]{fig/ntutlogo}}\begin{document}\begin{CJK*}{UTF8}{kai}\begin{frame}\frametitle{大綱}
內容\end{frame}\end{CJK*}\end{document}
Chen-Ching Ting (丁振卿) Mechanical Engineering, National Taipei University of Technology (國立台北科技大學機械系) Homepage: http://cct.me.ntut.edu.tw/ E-mail: [email protected] ()LATEX February 24, 2010 61 / 73
投影片製作 環境設置
單頁一般設置
\begin{frame}\frametitle{大綱}
內容\end{frame}
\frame{\frametitle{大綱}
內容}
Chen-Ching Ting (丁振卿) Mechanical Engineering, National Taipei University of Technology (國立台北科技大學機械系) Homepage: http://cct.me.ntut.edu.tw/ E-mail: [email protected] ()LATEX February 24, 2010 62 / 73
投影片製作 環境設置
單頁具verbatim功能設置
\begin{frame}[containsverbatim]\frametitle{大綱}
\begin{verbatim}內容\end{verbatim }\end{frame}
Chen-Ching Ting (丁振卿) Mechanical Engineering, National Taipei University of Technology (國立台北科技大學機械系) Homepage: http://cct.me.ntut.edu.tw/ E-mail: [email protected] ()LATEX February 24, 2010 63 / 73
投影片製作 環境設置
封面設置
\title{\LaTeX}
\author{Chen-Ching Ting\\
(丁振卿)\\
Mechanical Engineering, National Taipei University of Technology\\
(國立台北科技大學機械系)\\
Homepage: \textcolor{blue}{http://cct.me.ntut.edu.tw/chchting/}\\
E-mail: \textcolor{blue}{[email protected]}
}
\date{\today}
\frame{\titlepage}
Chen-Ching Ting (丁振卿) Mechanical Engineering, National Taipei University of Technology (國立台北科技大學機械系) Homepage: http://cct.me.ntut.edu.tw/ E-mail: [email protected] ()LATEX February 24, 2010 64 / 73
投影片製作 環境設置
內容大綱
\begin{frame}\frametitle{課程大綱}\tableofcontents\end{frame}
投影片內容編輯section、subsection、subsubsection等將會自動編成內容大綱頁面。
Chen-Ching Ting (丁振卿) Mechanical Engineering, National Taipei University of Technology (國立台北科技大學機械系) Homepage: http://cct.me.ntut.edu.tw/ E-mail: [email protected] ()LATEX February 24, 2010 65 / 73
投影片製作 環境設置
內容大綱
\begin{columns}[c]\column{0.5\textwidth}內容A\column{0.5\textwidth}內容B\end{columns}
Chen-Ching Ting (丁振卿) Mechanical Engineering, National Taipei University of Technology (國立台北科技大學機械系) Homepage: http://cct.me.ntut.edu.tw/ E-mail: [email protected] ()LATEX February 24, 2010 66 / 73
投影片製作 環境設置
檔案引入PDF進行合併檔製作
\usepackage{pdfpages}
\makeatletter
\let\fsvtpage=\ps@navigation
\makeatother
於文章開頭引入pdfpages套件,接著再下三行命令以定義fsvtpage的使用。
{
\setbeamercolor{background canvas}{bg=}
\includepdf[pages={1-5}, pagecommand={\fsvtpage}, nup=1, scale=0.95]{file.pdf}
}
引入file.pdf檔案,並保有本主文的投影片風格,引入的PDF頁面大小再以scale來設定。
{
\setbeamercolor{background canvas}{bg=}
\includepdf[pages={1-5}]{file.pdf}
}
引入file.pdf檔案,不保有本主文的投影片風格。
Chen-Ching Ting (丁振卿) Mechanical Engineering, National Taipei University of Technology (國立台北科技大學機械系) Homepage: http://cct.me.ntut.edu.tw/ E-mail: [email protected] ()LATEX February 24, 2010 67 / 73
投影片製作 環境設置
自動多頁面設定
\begin{frame}[shrink,allowframebreaks]內容\end{frame}
其中,shrink為將所寫的資料縮小放置在單一頁面;allowframebreaks為將所寫的資料自動分成多頁面。
Chen-Ching Ting (丁振卿) Mechanical Engineering, National Taipei University of Technology (國立台北科技大學機械系) Homepage: http://cct.me.ntut.edu.tw/ E-mail: [email protected] ()LATEX February 24, 2010 68 / 73
轉LATEX到HTML
轉轉轉LATEX到到到HTML
Chen-Ching Ting (丁振卿) Mechanical Engineering, National Taipei University of Technology (國立台北科技大學機械系) Homepage: http://cct.me.ntut.edu.tw/ E-mail: [email protected] ()LATEX February 24, 2010 69 / 73
轉LATEX到HTML latex2html
latex2html
Ubuntu Linux下安裝latex2html套件。
Chen-Ching Ting (丁振卿) Mechanical Engineering, National Taipei University of Technology (國立台北科技大學機械系) Homepage: http://cct.me.ntut.edu.tw/ E-mail: [email protected] ()LATEX February 24, 2010 70 / 73
轉LATEX到HTML tex4ht
tex4ht
Ubuntu Linux下安裝tex4ht套件。
Chen-Ching Ting (丁振卿) Mechanical Engineering, National Taipei University of Technology (國立台北科技大學機械系) Homepage: http://cct.me.ntut.edu.tw/ E-mail: [email protected] ()LATEX February 24, 2010 71 / 73
轉LATEX到HTML tex4ht
結結結論論論
Chen-Ching Ting (丁振卿) Mechanical Engineering, National Taipei University of Technology (國立台北科技大學機械系) Homepage: http://cct.me.ntut.edu.tw/ E-mail: [email protected] ()LATEX February 24, 2010 72 / 73
轉LATEX到HTML tex4ht
結論
文書編排的方式一般分為幕前編排與幕後編排兩種,所謂幕前編排乃指編輯者以指令的方式進行編排,如LATEX與HTML等文書編排程式語言;幕後編排乃指編輯者於編排文件時,不必考慮文書編排程式指令,所有文書編排工作乃由所使用的套裝軟體自動於幕後執行編排完成,如Winword、Frontpage等文書編排套裝軟體。
幕後編排的優點在於編輯者不必具備專業的電腦使用能力,缺點則是沒有絕對編排主導權;幕前編排之編輯者需具備專業的電腦使用能力,優點是完全掌控編排主導權。
Chen-Ching Ting (丁振卿) Mechanical Engineering, National Taipei University of Technology (國立台北科技大學機械系) Homepage: http://cct.me.ntut.edu.tw/ E-mail: [email protected] ()LATEX February 24, 2010 73 / 73