Re: [問題] 有關中文變粗體

看板LaTeX (論文排版)作者 (sppmg)時間5年前 (2018/08/29 22:57), 編輯推噓3(300)
留言3則, 2人參與, 5年前最新討論串11/11 (看更多)
※ 引述《hau (小豪)》之銘言: : 我把 \begin{document} 上面的全部貼上來。 : \documentclass[12pt,a4paper,oneside]{book} : \newenvironment{indention}[1]{\par : \addtolength{\leftskip}{#1} : \begingroup}{\endgroup\par} : \pagestyle{plain} : \usepackage[margin=2cm]{geometry} : \usepackage{fontspec} : \usepackage{xeCJK} : \setCJKmainfont{cwyen.ttf} : \setCJKmainfont[AutoFakeBold=2.5,AutoFakeSlant=.4]{cwyen.ttf} : \XeTeXlinebreaklocale "zh" : \XeTeXlinebreakskip = 0pt plus 1pt : \usepackage{amssymb} : \usepackage{graphicx} : \usepackage{titlesec} : \usepackage{titletoc} : \usepackage{CJKnumb} : \renewcommand{\contentsname}{目錄} : \renewcommand{\appendixname}{附錄} : \titlecontents{chapter}[0pt]{\vspace{.5\baselineskip}} : {第\CJKnumber{\thecontentslabel}章\quad}{} : {\hspace{.5em}\titlerule*[10pt]{$\cdot$}\contentspage} : \titleformat{\chapter}{\Huge}{第\,\CJKnumber{\thechapter}\,章}{1em}{} : \titleformat{\section}{\LARGE}{\thesection}{1em}{} : \titleformat{\subsection}{\Large}{\thesubsection}{1em}{} : \usepackage{etoolbox} : \apptocmd{\appendix} { : \titleformat{\chapter}{\Huge}{\appendixname\thechapter}{1em}{} : \titlecontents{chapter}[0pt]{\vspace{.5\baselineskip}} : {\appendixname\thecontentslabel}{} : {\hspace{.5em}\titlerule*[10pt]{$\cdot$}\contentspage} : }{}{} : \tableofcontents : _____________________________________________________________________________ : 不清楚哪裡有誤, : 目錄的地方附錄是「第A零章」不是「附錄 A」,要改成「附錄 A」 : 而附錄上面有一行「chapter0pt附錄 3.....................」這行後面還有重疊的字 : 我不要這行。 : 話說我編譯完常有: : Process started : Process exited with error(s) : 的字樣,我也不知哪有錯,但編完的結果通常都ok。 是這樣? https://imgur.com/xJbU3VB
我原本和 andrew43 大一樣,測試沒問題,後來想說你有說 : 我把 \begin{document} 上面的全部貼上來。 . . . . 兇手就是 \tableofcontents 啦! 這會在當前頁產生目錄, document 都還沒開始當然錯。 (改放裡面!) \begin{document} \frontmatter \maketitle \tableofcontents \mainmatter \chapter{main C1} foo \appendix \chapter{app C1} foo \end{document} 然後是我用的 kile (Linux 上的編輯器)會顯示 error、自動跳到 .toc,並指出 : Undefined control sequence \ttl@change@i : Undefined control sequence \ttl@change@v 雖然有產生 PDF ,但不會誤認編譯通過。 我建議你可以改用 texstudio ,看會不會好一些。 當然重要的還是注意 error。 warning 通常可以不理,但 error 一定要注意。 -- ※ 發信站: 批踢踢實業坊(ptt.cc), 來自: 175.96.115.164 ※ 文章網址: https://www.ptt.cc/bbs/LaTeX/M.1535554666.A.AE9.html

08/29 23:37, 5年前 , 1F
非常感謝sppmg、andrew43兩位大大,很有耐心的回答我的問題
08/29 23:37, 1F

08/29 23:40, 5年前 , 2F
終於成功了,感動~~
08/29 23:40, 2F

08/30 07:35, 5年前 , 3F
原PO若早一點把完整的碼附上來就沒那麼多事了
08/30 07:35, 3F
文章代碼(AID): #1RXhHghf (LaTeX)
文章代碼(AID): #1RXhHghf (LaTeX)