# Latex 手把手安裝教學 ###### tags: `LaTeX` 1. 到官網下載 Miktex https://miktex.org/download 2. 一路安裝完,有 check updates 記得要選 3. 在 Updates 選 Update now ![](https://i.imgur.com/kAKmzHJ.png) 4. 執行 Texworks :::success Texworks 是 Miktex 內建的 text 編輯器 內建的可以編譯過之後,再來安裝額外的編輯器 直接安裝其他編輯器,很容易因為路徑沒有設定好而不能編譯 ::: ![](https://i.imgur.com/6PVf2Ge.png) 5. 新增一個 tex 的檔案 ![](https://i.imgur.com/RUkCQr6.png) 6. 把編譯選項調成 XeLaTex ![](https://i.imgur.com/MbQQ1wJ.png) 7. 把以下測試程式碼貼到 Texworks,編譯看看,應該要成功產生pdf :::info \\documentclass{article} \\usepackage{fontspec} %加這個就可以設定字體 \\usepackage{xeCJK} %讓中英文字體分開設置 \\setCJKmainfont{標楷體} %設定中文為系統上的字型,而英文不去更動,使用原TeX字型 \\XeTeXlinebreaklocale "zh" %這兩行一定要加,中文才能自動換行 \\XeTeXlinebreakskip = 0pt plus 1pt %這兩行一定要加,中文才能自動換行 \\title{我是標題標題標題} \\author{我是作者} \\date{} %不要日期 \\begin{document} \\maketitle 中文測試中文測試中文測試中文測試中文測試中文測試,中文測試中文測試,中文 測試中文測試中文測試中文測試中文測試中文測試,中文測試中文測試。中英文可以連打 。 English Test. 插入中文字,看看如何? This is a simple template for a XeLaTeX document using the article class, with the fontspec package to asily select fonts. \\end{document} ::: ![](https://i.imgur.com/UbtQ07O.png) PDF 無法顯示中文看這裡 https://www.ptt.cc/bbs/LaTeX/M.1366782607.A.202.html 8. 安裝 Latex 編輯器 TexStudio (內建的編輯器太陽春) https://www.texstudio.org/ Latex 插入圖片 http://cthsueh.blogspot.com/2016/06/latex_17.html Latex 語法筆記 https://snaildove.github.io/2017/08/20/LaTeX_symbols/