SlideShare une entreprise Scribd logo
1  sur  27
Télécharger pour lire hors ligne
LATEX 入入入門門門
林小草
September 5, 2008
開開開始始始之之之前前前
2 / 27
關關關於於於. . .
3 / 27
■ 本投影片由 powerdot 產生
(powerdot 是我一天比一天更愛 LATEX 的開端!)
■ 本投影片架構從吳老師 Debian 講義亂改而來,特此謝忱
■ 回去沒練習,不要說入門,連門把都會掉下來
■ 對 LATEX 有興趣→好好練,不然很快就忘光了;
沒興趣→要跟 word 更熟一點!
■ 你和 word 有多熟?
怎麼建目錄、怎麼設定交互參照、怎麼把圖表排好· · ·
(LATEX 一次痛完!學會以後,這些事都交給 LATEX 幫你完成!)
簡簡簡介介介
4 / 27
SWOT for LaTeX
5 / 27
■ 醜話說前面
◆ 缺點
■ 不是圖形介面,調整不容易
(每次都要等它編完才能看到結果,期待又怕受傷害)
■ 沒有陣痛期
(根據經驗,80% 的人還沒痛到就想要換回 MS word 了)
■ 打數學方程式的人要放書在手邊備查
(在圖書館寫論文的日子,我自己也不想帶著書走· · ·)
■ 目前林小草找不到完美的中文斜體解決方案
(現在所使用的字體只能產生粗粗粗斜斜斜體體體)
SWOT for LaTeX
6 / 27
■ 醜話說前面
◆ 威脅
■ OS 還在 windows 的人很難抗拒 word 的誘惑
(deadline 逼近你的時候,舊愛總是最可愛)
■ 看到教材的厚度就晚安了
■ 會的人太少沒人要教我,哭哭Q Q
■ 很難求進步,因為只能拿來上進,不能做壞事
(吳老師名言:幹壞事是進步的原動力)
SWOT for LaTeX
7 / 27
■ 趕快來護航. . .
◆ 優點
■ 不是圖形介面,內容與排版完整分離
■ 智慧型斷字,左右對齊漂漂亮亮
(從此和 word 中間莫名奇妙的空白說再見!
■ 浮動排版,圖片、表格自動乖乖排隊站好
■ 100% 跨平台,論文在哪都能寫
(除了中文文件因為字型需要改設定值)
■ 搭配 subversion,版本差異一目瞭然
SWOT for LaTeX
8 / 27
■ 趕快來護航. . .
◆ 機會
■ 老闆大人也會用,不怕他拒收
■ 國際性研討會提供 tex 樣版
(再也不會莫名奇妙版面走樣)
■ 聽到隔壁同學的 word 自動關閉的慘叫聲· · ·
(好險我打論文的工具是不會自動罷工的 VIM)
SWOT for LaTeX
9 / 27
■ 更好的是. . .
◆ 我們有萬能的吳老師可以問問題
◆ 習慣文字介面,RSI 不上身
◆ 遇到問題還可以找他們
■ CTAN: http://www.ctan.org/
■ Google: http://www.google.com
■ 批踢踢: telnet://ptt.cc, LATEX 板
系系系統統統安安安裝裝裝
10 / 27
Debian
11 / 27
■ 基本環境 TeXLive
◆ sudo aptitude install texlive-full
◆ TexLive DVD:
ftp://ftp.ccu.edu.tw/pub/tex/systems/texlive/Images/
■ 中文解決方案 CJK
◆ sudo aptitude install latex-cjk-all
Windows
12 / 27
■ MikTeX: http://miktex.org/
■ 安裝步驟:下一步,更新,重開機
■ 內建套件管理 (Browse Packages)
■ 新的 Packages 在初次使用時會自動安裝
進進進正正正題題題
13 / 27
線線線上上上 & 紙紙紙本本本教教教材材材
14 / 27
每一份都有優缺點,建議有空就讀增加經驗值
■ 線上
◆ 李果正的 LaTeX 123
http://edt1023.sayya.org/tex/latex123/
◆ 吳聰敏的 cwTeX
http://homepage.ntu.edu.tw/~ntut019/cwtex/cwtex.html
■ 紙本@ NKNU LIB.
◆ David F. Griffiths, Desmond J. Higham, “Learning LaTeX”.
◆ Leslie Lamport, “LATEX : a document preparation system”.
◆ 藤田真作,最新LATEX2e排版指令參考辭典,博碩
◆ 還有. . .
選選選用用用合合合適適適的的的編編編輯輯輯器器器
15 / 27
依需求來說. . .
■ 最低需求:語法上色 (syntax highlight)
(白底黑字看久了眼睛超累、debug 超煩 Orz)
■ 進階需求:圖形介面的符號輸入輔助
目前大家常用的. . .
■ VIM: http://www.vim.org/ (freeware)
本身就有語法上色、也有 LATEX 相關外掛可以用
■ WinEdt: http://www.winedt.com/ (shareware)
適合想要隨手點點就按出特殊符號、不想背太多指令的人
操操操作作作練練練習習習
16 / 27
基基基本本本練練練習習習
17 / 27
1 documentclass{article}
2 begin{document}
3 test % 沒有 CJK 的狀態下只能打英文
4 end{document} % 有 begin 就要有 end
文件類別: article, report, book, powerdot . . . etc.
■ 用途不同: 短文/小論文/書籍/投影片 . . . etc.
■ 有無封面: 封面頁(title page),report & book 會獨立成頁
■ 奇偶數頁: book 會區分奇偶數頁,把裝訂邊留在不同側
■ 標題層級: 有無 part/chapter/section
層級表可參考 cwTeX 手冊 “表7.4: 章節指令之層級與編號”
中中中文文文練練練習習習
18 / 27
1 documentclass{article}
2 usepackage{CJKutf8}
3 begin{CJK}{UTF8}{cwhbu}
4 begin{document}
5 中文測試
6 end{CJK}
7 end{document}
引入 CJKutf8 套件讓文件可以編中文
此例使用 CJK 套件,編碼為 utf-8,字型黑體字 (cwhbu)
(還是看不到中文的原因:字型缺字,或根本沒中文字型)
中中中文文文字字字型型型安安安裝裝裝
19 / 27
字型下載
■ 蔡炎龍(cwTeX 字型)
http://riemann.math.nccu.edu.tw/~yenlung/file/texmf.zip
■ 李果正(標點置中)
http://cle.linux.org.tw/fonts/cwttf/type1/
中中中文文文字字字型型型安安安裝裝裝 (cont.)
20 / 27
安裝
1. 解壓縮到你高興的地方 (e.g. C:texmf)
2. 開始→所有程式→MikTex→Settings→Root頁籤
Add→剛才的字型資料夾
3. 取代字型(選用步驟,喜歡 cwTeX 標點靠齊基線就不用做)
4. initexmf -u
5. initexmf −−edit-config-file updmap
跳出記事本後加上以下內容:
Map cwmu.map
Map cwku.map
Map cwfsu.map
Map cwhbu.map
Map cwyu.map
6. initexmf −−mkmaps
數數數學學學公公公式式式
21 / 27
請跟著我一起翻開“大家來學 Latex”的第十章
■ 隨文數式 (math inline mode)
◆ 在內文中打數學方程式
◆ $數學式$
■ 展式數式 (math display mode)
◆ 會獨立成行,分成有編號和沒編號兩種
接下來我們用謝老師的 paper 當範例 . . . (*羞*)
現現現有有有樣樣樣版版版
22 / 27
SCIS 2008
23 / 27
■ 格式下載:
http://scis2008.cs.dm.u-tokai.ac.jp/format.html
■ 必備檔案:
本文 tex 檔,scis2008e.sty 樣式檔
(要記得換成 2009 新版本,頁首頁尾會不一樣)
SCIS 2008 (cont.)
24 / 27
1 documentclass{article}
2 usepackage{scis2008e}
3 begin{document}
4 title{標題}
5 author{
6 第一作者thanks{單位}
7 and 第二作者thanks{單位}
8 }
9 abstract{摘要}
10 keywords{關鍵字}
11 maketitle
12 section{章節名稱}
13 內文...
14 end{document}
LNCS for JWIS 2008
25 / 27
■ 格式下載:
http://www.springer.de/comp/lncs/authors.html
http://www.springer.com/computer/lncs?SGWID=0-164-7-72376
■ 必備檔案:
本文 tex 檔 (typeinst.zip)
llncs.cls 樣式檔 (llncs2e.zip)
所所所上上上碩碩碩論論論樣樣樣版版版
26 / 27
■ 樣式檔內容:
讀書會的 wiki 有一份!
(包含浮水印 tex 檔、本文 tex 檔、投影片 tex 檔)
■ 必備檔案:
本文 tex 檔,
浮水印 tex 檔,
浮水印圖檔(圖書館下載)
■ 吳老師的口試投影片和講義稿都是 powerdot 做的唷~
END
27 / 27

Contenu connexe

En vedette

How Race, Age and Gender Shape Attitudes Towards Mental Health
How Race, Age and Gender Shape Attitudes Towards Mental HealthHow Race, Age and Gender Shape Attitudes Towards Mental Health
How Race, Age and Gender Shape Attitudes Towards Mental Health
ThinkNow
 
Social Media Marketing Trends 2024 // The Global Indie Insights
Social Media Marketing Trends 2024 // The Global Indie InsightsSocial Media Marketing Trends 2024 // The Global Indie Insights
Social Media Marketing Trends 2024 // The Global Indie Insights
Kurio // The Social Media Age(ncy)
 

En vedette (20)

2024 State of Marketing Report – by Hubspot
2024 State of Marketing Report – by Hubspot2024 State of Marketing Report – by Hubspot
2024 State of Marketing Report – by Hubspot
 
Everything You Need To Know About ChatGPT
Everything You Need To Know About ChatGPTEverything You Need To Know About ChatGPT
Everything You Need To Know About ChatGPT
 
Product Design Trends in 2024 | Teenage Engineerings
Product Design Trends in 2024 | Teenage EngineeringsProduct Design Trends in 2024 | Teenage Engineerings
Product Design Trends in 2024 | Teenage Engineerings
 
How Race, Age and Gender Shape Attitudes Towards Mental Health
How Race, Age and Gender Shape Attitudes Towards Mental HealthHow Race, Age and Gender Shape Attitudes Towards Mental Health
How Race, Age and Gender Shape Attitudes Towards Mental Health
 
AI Trends in Creative Operations 2024 by Artwork Flow.pdf
AI Trends in Creative Operations 2024 by Artwork Flow.pdfAI Trends in Creative Operations 2024 by Artwork Flow.pdf
AI Trends in Creative Operations 2024 by Artwork Flow.pdf
 
Skeleton Culture Code
Skeleton Culture CodeSkeleton Culture Code
Skeleton Culture Code
 
PEPSICO Presentation to CAGNY Conference Feb 2024
PEPSICO Presentation to CAGNY Conference Feb 2024PEPSICO Presentation to CAGNY Conference Feb 2024
PEPSICO Presentation to CAGNY Conference Feb 2024
 
Content Methodology: A Best Practices Report (Webinar)
Content Methodology: A Best Practices Report (Webinar)Content Methodology: A Best Practices Report (Webinar)
Content Methodology: A Best Practices Report (Webinar)
 
How to Prepare For a Successful Job Search for 2024
How to Prepare For a Successful Job Search for 2024How to Prepare For a Successful Job Search for 2024
How to Prepare For a Successful Job Search for 2024
 
Social Media Marketing Trends 2024 // The Global Indie Insights
Social Media Marketing Trends 2024 // The Global Indie InsightsSocial Media Marketing Trends 2024 // The Global Indie Insights
Social Media Marketing Trends 2024 // The Global Indie Insights
 
Trends In Paid Search: Navigating The Digital Landscape In 2024
Trends In Paid Search: Navigating The Digital Landscape In 2024Trends In Paid Search: Navigating The Digital Landscape In 2024
Trends In Paid Search: Navigating The Digital Landscape In 2024
 
5 Public speaking tips from TED - Visualized summary
5 Public speaking tips from TED - Visualized summary5 Public speaking tips from TED - Visualized summary
5 Public speaking tips from TED - Visualized summary
 
ChatGPT and the Future of Work - Clark Boyd
ChatGPT and the Future of Work - Clark Boyd ChatGPT and the Future of Work - Clark Boyd
ChatGPT and the Future of Work - Clark Boyd
 
Getting into the tech field. what next
Getting into the tech field. what next Getting into the tech field. what next
Getting into the tech field. what next
 
Google's Just Not That Into You: Understanding Core Updates & Search Intent
Google's Just Not That Into You: Understanding Core Updates & Search IntentGoogle's Just Not That Into You: Understanding Core Updates & Search Intent
Google's Just Not That Into You: Understanding Core Updates & Search Intent
 
How to have difficult conversations
How to have difficult conversations How to have difficult conversations
How to have difficult conversations
 
Introduction to Data Science
Introduction to Data ScienceIntroduction to Data Science
Introduction to Data Science
 
Time Management & Productivity - Best Practices
Time Management & Productivity -  Best PracticesTime Management & Productivity -  Best Practices
Time Management & Productivity - Best Practices
 
The six step guide to practical project management
The six step guide to practical project managementThe six step guide to practical project management
The six step guide to practical project management
 
Beginners Guide to TikTok for Search - Rachel Pearson - We are Tilt __ Bright...
Beginners Guide to TikTok for Search - Rachel Pearson - We are Tilt __ Bright...Beginners Guide to TikTok for Search - Rachel Pearson - We are Tilt __ Bright...
Beginners Guide to TikTok for Search - Rachel Pearson - We are Tilt __ Bright...
 

Learning LaTeX || LaTeX 入門

  • 3. 關關關於於於. . . 3 / 27 ■ 本投影片由 powerdot 產生 (powerdot 是我一天比一天更愛 LATEX 的開端!) ■ 本投影片架構從吳老師 Debian 講義亂改而來,特此謝忱 ■ 回去沒練習,不要說入門,連門把都會掉下來 ■ 對 LATEX 有興趣→好好練,不然很快就忘光了; 沒興趣→要跟 word 更熟一點! ■ 你和 word 有多熟? 怎麼建目錄、怎麼設定交互參照、怎麼把圖表排好· · · (LATEX 一次痛完!學會以後,這些事都交給 LATEX 幫你完成!)
  • 5. SWOT for LaTeX 5 / 27 ■ 醜話說前面 ◆ 缺點 ■ 不是圖形介面,調整不容易 (每次都要等它編完才能看到結果,期待又怕受傷害) ■ 沒有陣痛期 (根據經驗,80% 的人還沒痛到就想要換回 MS word 了) ■ 打數學方程式的人要放書在手邊備查 (在圖書館寫論文的日子,我自己也不想帶著書走· · ·) ■ 目前林小草找不到完美的中文斜體解決方案 (現在所使用的字體只能產生粗粗粗斜斜斜體體體)
  • 6. SWOT for LaTeX 6 / 27 ■ 醜話說前面 ◆ 威脅 ■ OS 還在 windows 的人很難抗拒 word 的誘惑 (deadline 逼近你的時候,舊愛總是最可愛) ■ 看到教材的厚度就晚安了 ■ 會的人太少沒人要教我,哭哭Q Q ■ 很難求進步,因為只能拿來上進,不能做壞事 (吳老師名言:幹壞事是進步的原動力)
  • 7. SWOT for LaTeX 7 / 27 ■ 趕快來護航. . . ◆ 優點 ■ 不是圖形介面,內容與排版完整分離 ■ 智慧型斷字,左右對齊漂漂亮亮 (從此和 word 中間莫名奇妙的空白說再見! ■ 浮動排版,圖片、表格自動乖乖排隊站好 ■ 100% 跨平台,論文在哪都能寫 (除了中文文件因為字型需要改設定值) ■ 搭配 subversion,版本差異一目瞭然
  • 8. SWOT for LaTeX 8 / 27 ■ 趕快來護航. . . ◆ 機會 ■ 老闆大人也會用,不怕他拒收 ■ 國際性研討會提供 tex 樣版 (再也不會莫名奇妙版面走樣) ■ 聽到隔壁同學的 word 自動關閉的慘叫聲· · · (好險我打論文的工具是不會自動罷工的 VIM)
  • 9. SWOT for LaTeX 9 / 27 ■ 更好的是. . . ◆ 我們有萬能的吳老師可以問問題 ◆ 習慣文字介面,RSI 不上身 ◆ 遇到問題還可以找他們 ■ CTAN: http://www.ctan.org/ ■ Google: http://www.google.com ■ 批踢踢: telnet://ptt.cc, LATEX 板
  • 11. Debian 11 / 27 ■ 基本環境 TeXLive ◆ sudo aptitude install texlive-full ◆ TexLive DVD: ftp://ftp.ccu.edu.tw/pub/tex/systems/texlive/Images/ ■ 中文解決方案 CJK ◆ sudo aptitude install latex-cjk-all
  • 12. Windows 12 / 27 ■ MikTeX: http://miktex.org/ ■ 安裝步驟:下一步,更新,重開機 ■ 內建套件管理 (Browse Packages) ■ 新的 Packages 在初次使用時會自動安裝
  • 14. 線線線上上上 & 紙紙紙本本本教教教材材材 14 / 27 每一份都有優缺點,建議有空就讀增加經驗值 ■ 線上 ◆ 李果正的 LaTeX 123 http://edt1023.sayya.org/tex/latex123/ ◆ 吳聰敏的 cwTeX http://homepage.ntu.edu.tw/~ntut019/cwtex/cwtex.html ■ 紙本@ NKNU LIB. ◆ David F. Griffiths, Desmond J. Higham, “Learning LaTeX”. ◆ Leslie Lamport, “LATEX : a document preparation system”. ◆ 藤田真作,最新LATEX2e排版指令參考辭典,博碩 ◆ 還有. . .
  • 15. 選選選用用用合合合適適適的的的編編編輯輯輯器器器 15 / 27 依需求來說. . . ■ 最低需求:語法上色 (syntax highlight) (白底黑字看久了眼睛超累、debug 超煩 Orz) ■ 進階需求:圖形介面的符號輸入輔助 目前大家常用的. . . ■ VIM: http://www.vim.org/ (freeware) 本身就有語法上色、也有 LATEX 相關外掛可以用 ■ WinEdt: http://www.winedt.com/ (shareware) 適合想要隨手點點就按出特殊符號、不想背太多指令的人
  • 17. 基基基本本本練練練習習習 17 / 27 1 documentclass{article} 2 begin{document} 3 test % 沒有 CJK 的狀態下只能打英文 4 end{document} % 有 begin 就要有 end 文件類別: article, report, book, powerdot . . . etc. ■ 用途不同: 短文/小論文/書籍/投影片 . . . etc. ■ 有無封面: 封面頁(title page),report & book 會獨立成頁 ■ 奇偶數頁: book 會區分奇偶數頁,把裝訂邊留在不同側 ■ 標題層級: 有無 part/chapter/section 層級表可參考 cwTeX 手冊 “表7.4: 章節指令之層級與編號”
  • 18. 中中中文文文練練練習習習 18 / 27 1 documentclass{article} 2 usepackage{CJKutf8} 3 begin{CJK}{UTF8}{cwhbu} 4 begin{document} 5 中文測試 6 end{CJK} 7 end{document} 引入 CJKutf8 套件讓文件可以編中文 此例使用 CJK 套件,編碼為 utf-8,字型黑體字 (cwhbu) (還是看不到中文的原因:字型缺字,或根本沒中文字型)
  • 19. 中中中文文文字字字型型型安安安裝裝裝 19 / 27 字型下載 ■ 蔡炎龍(cwTeX 字型) http://riemann.math.nccu.edu.tw/~yenlung/file/texmf.zip ■ 李果正(標點置中) http://cle.linux.org.tw/fonts/cwttf/type1/
  • 20. 中中中文文文字字字型型型安安安裝裝裝 (cont.) 20 / 27 安裝 1. 解壓縮到你高興的地方 (e.g. C:texmf) 2. 開始→所有程式→MikTex→Settings→Root頁籤 Add→剛才的字型資料夾 3. 取代字型(選用步驟,喜歡 cwTeX 標點靠齊基線就不用做) 4. initexmf -u 5. initexmf −−edit-config-file updmap 跳出記事本後加上以下內容: Map cwmu.map Map cwku.map Map cwfsu.map Map cwhbu.map Map cwyu.map 6. initexmf −−mkmaps
  • 21. 數數數學學學公公公式式式 21 / 27 請跟著我一起翻開“大家來學 Latex”的第十章 ■ 隨文數式 (math inline mode) ◆ 在內文中打數學方程式 ◆ $數學式$ ■ 展式數式 (math display mode) ◆ 會獨立成行,分成有編號和沒編號兩種 接下來我們用謝老師的 paper 當範例 . . . (*羞*)
  • 23. SCIS 2008 23 / 27 ■ 格式下載: http://scis2008.cs.dm.u-tokai.ac.jp/format.html ■ 必備檔案: 本文 tex 檔,scis2008e.sty 樣式檔 (要記得換成 2009 新版本,頁首頁尾會不一樣)
  • 24. SCIS 2008 (cont.) 24 / 27 1 documentclass{article} 2 usepackage{scis2008e} 3 begin{document} 4 title{標題} 5 author{ 6 第一作者thanks{單位} 7 and 第二作者thanks{單位} 8 } 9 abstract{摘要} 10 keywords{關鍵字} 11 maketitle 12 section{章節名稱} 13 內文... 14 end{document}
  • 25. LNCS for JWIS 2008 25 / 27 ■ 格式下載: http://www.springer.de/comp/lncs/authors.html http://www.springer.com/computer/lncs?SGWID=0-164-7-72376 ■ 必備檔案: 本文 tex 檔 (typeinst.zip) llncs.cls 樣式檔 (llncs2e.zip)
  • 26. 所所所上上上碩碩碩論論論樣樣樣版版版 26 / 27 ■ 樣式檔內容: 讀書會的 wiki 有一份! (包含浮水印 tex 檔、本文 tex 檔、投影片 tex 檔) ■ 必備檔案: 本文 tex 檔, 浮水印 tex 檔, 浮水印圖檔(圖書館下載) ■ 吳老師的口試投影片和講義稿都是 powerdot 做的唷~