Skip to content
Snippets Groups Projects
Unverified Commit fc36ce1a authored by atxy-blip's avatar atxy-blip Committed by GitHub
Browse files

Merge pull request #20 from myandeg/master

更新文中代码样式
parents e5d103d9 706ba863
No related branches found
No related tags found
No related merge requests found
......@@ -2,13 +2,6 @@
\section{图片示例}
图片存放目录的定义为
\begin{lstlisting}[language=TeX]
\RequirePackage{graphicx}
\DeclareGraphicsExtensions{.pdf,.eps,.jpg,.png}
\graphicspath{{figure/}} % 图片路径
\end{lstlisting}
所有图片默认存放在主目录下的\texttt{figure/}文件夹内
\begin{figure}[htbp]
......@@ -17,7 +10,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 +44,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}
......
......@@ -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, caption, label, mathrm, frac, toprule, midrule, bottomrule, includegraphics}
}
njuthesis.tex 100644 → 100755
......@@ -25,6 +25,9 @@
% customchinesefont=windows,% 设置中文字符集
]{njuthesis}
% 添加自定义配置
\input{custom.tex}
% 输入封面信息
\input{coverinfo.tex}
......@@ -37,7 +40,7 @@
% 封面、摘要和目录
%----------------------------------------
\maketitle % 请在coverpage.sty输入封面信息
\maketitle
\input{chapters/Abstract.tex}
\tableofcontents
......
......@@ -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