看板 LaTeX 關於我們 聯絡資訊
我要將code寫入目錄,因為使用的語言是比較冷門的 Latex好像沒有資料庫,我也不太會定義一個新的語言 所以我想先預設language是C 然後用morekeywords增加這個語言的關鍵字 於是我這樣寫: \usepackage{listings} \usepackage{xcolor} \lstset{ language={C}, %backgroundcolor=\color{red!50!green!50!blue!50}, rulesepcolor= \color{gray}, breaklines=true, numbers=left, numberstyle= \small, keywordstyle= \color{red}, morekeywords={projectile, element, mass, energy}, commentstyle=\color{gray}, frame=shadowbox } 但好像沒有效果,完全無法顯示 請問可能是哪裡寫錯了或是少了什麼嗎? -- ※ 發信站: 批踢踢實業坊(ptt.cc), 來自: 27.247.1.120 (臺灣) ※ 文章網址: https://www.ptt.cc/bbs/LaTeX/M.1672405823.A.F65.html
andrew43: 貼出可重覆問題的完整原始碼吧 01/19 13:04