1. 程式人生 > >介紹一款LaTeX編輯器——LyX

介紹一款LaTeX編輯器——LyX

LYX是一個“所見即所指”(what you see is what you mean)的利用LaTEX來排版的檔案編輯軟體。相對於其它標榜所見即所得的編輯器而言,LyX標榜只顯示你真正的關心的內容。

主頁

我的LaTeX導言區設定:

% !TEX encoding = UTF-8
% !TEX program = lualatex
\usepackage{luatexja-fontspec}
\setmainjfont{FandolSong}
\usepackage{bookmark}
\usepackage{indentfirst}
\usepackage
{hyperref} \usepackage{titlesec} \usepackage{indentfirst} \usepackage{listings} \usepackage{xcolor} \usepackage{graphicx} \renewcommand{\contentsname}{\hspace{1.5em}} \renewcommand{\chaptername}{~\thechapter~} \renewcommand{\bibname}{參考文獻} \renewcommand{\figurename}{} \renewcommand{\tablename}{
} \titleformat{\chapter}{\normalfont\huge\bfseries\filcenter}{\chaptertitlename }{20pt}{\huge}

文件類的設定:

這裡寫圖片描述

一些錯誤解決方法:

匯入亂碼解決方法:

在 LaTeX -> LyX 的轉換器引數中增加預設編碼為 utf8 的選項, 即改為
tex2lyx -f -e "utf8" $$i $$o
如下圖所示, 改完後按右上角的 “修改(M)” 儲存修改, 然後按右下角的”儲存”或”應用”即可生效.
這裡寫圖片描述

the user preamble of your document contains glyphs that are unknown

“Document -> setting ->Fonts ”勾選上“Use non-TeX fonts (via XeTeX/LuaTeX)”
這裡寫圖片描述

標題的設定:

在標黑哪裡設定
這裡寫圖片描述

來張圖片:

原始檔:
這裡寫圖片描述
生成的pdf:
這裡寫圖片描述

ctex

文件類指定ctex在某些問題上會更加簡單