Skip to content
Snippets Groups Projects
Commit c1bf89ac authored by Koishi Jinguji's avatar Koishi Jinguji
Browse files

docs:更新文中代码样式

parent a6cf68ae
No related branches found
No related tags found
No related merge requests found
......@@ -17,7 +17,7 @@
\label{fig:njuname}
\end{figure}
你可以使用\lstinline|figure|环境插入图片,如\cref{fig:njuname},代码如下:
\begin{lstlisting}[language=TeX]
\begin{lstlisting}[style=LaTeX]
\begin{figure}
\includegraphics[width=0.5\textwidth]{njuname}
\caption{南京大学名称}
......@@ -51,7 +51,7 @@
\end{tabular}
\end{table}
你可以使用\lstinline|table|环境插入标准三线表,如\cref{tab:testtab}所示,代码如下:
\begin{lstlisting}[language=TeX]
\begin{lstlisting}[style=LaTeX]
\begin{table}[htbp]
\caption{经过测试的环境}
\begin{tabular}{ccc}
......
......@@ -50,7 +50,8 @@ njuthesis类提供了5个可以自定义的选项,如下所示。
\begin{description}
\item[\texttt{TitleLength}] 标题长度,用于控制封面标题的行数。可选值为1、2、3,缺省值为1。
\item[\texttt{Degree}] 学位类型,本科生为UG,即Undergraduate的缩写。
\item[\texttt{Type}] 用于选择文档类型并将相关字段输出在封面和摘要页。可选值包括thesis(表示毕业论文)和design(表示毕业设计),缺省值为thesis。 \item[\texttt{UseSysFont}] Bool类型,用于选择是否使用系统预装字体,缺省值为true。
\item[\texttt{Type}] 用于选择文档类型并将相关字段输出在封面和摘要页。可选值包括thesis(表示毕业论文)和design(表示毕业设计),缺省值为thesis。
\item[\texttt{UseSysFont}] Bool类型,用于选择是否使用系统预装字体,缺省值为true。
\item[\texttt{CustomEnFont}] 用于选择自定义英文字符集。可选值包括windows, macos, gyre, null,缺省值为windows。
\item[\texttt{CustomZhFont}] 用于选择自定义中文字符集。可选值包括windows, macos, fandol, founder, noto, null,缺省值为windows。
\end{description}
......
......@@ -15,7 +15,7 @@
\end{equation}
你可以使用\lstinline|equation|环境插入公式,如\cref{eq:dewitt},代码如下:
\begin{lstlisting}[language=TeX]
\begin{lstlisting}[style=LaTeX]
\begin{equation}\label{eq:dewitt}
\int \mathrm{e}^{ax} \tanh {bx} \, \mathrm{d}x =
\begin{dcases}
......
\lstdefinestyle{LaTeX}{
language=TeX,
morekeywords={begin, label, mathrm, frac}
morekeywords={begin, caption, label, mathrm, frac, toprule, midrule, bottomrule, includegraphics}
}
njuthesis.tex 100644 → 100755
......@@ -24,6 +24,9 @@
% CustomZhFont=windows,% 设置中文字符集
]{njuthesis}
% 添加自定义配置
\input{custom.tex}
% 输入个人信息
\input{coverinfo.tex}
......
......@@ -19,7 +19,7 @@
% 代码样式
\lstset{
basicstyle=\ttfamily\linespread{1}\selectfont,
basicstyle=\ttfamily\linespread{1}\small\selectfont,
keywordstyle=\bfseries,% use bold style for keywords
commentstyle=\rmfamily\itshape,% use italic style for comments
stringstyle=\ttfamily,% 字符串风格
......@@ -29,7 +29,7 @@
showstringspaces=false,
captionpos=t,% place the caption at the top
% frame=lrtb,% show all four sides of the frame
%linewidth=.8\textwidth,
% linewidth=.8\textwidth,
% breakatwhitespace=true,
breaklines=true,
xleftmargin=2em,xrightmargin=2em,% set the width of the code environment
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment