Skip to content

Commit

Permalink
Update
Browse files Browse the repository at this point in the history
remove equation linebreaks
remove eqnarray, add aligned example
add multiple cites example
  • Loading branch information
imfing committed Apr 30, 2019
1 parent 7b7fed4 commit 0ee6eb4
Show file tree
Hide file tree
Showing 3 changed files with 18 additions and 12 deletions.
18 changes: 9 additions & 9 deletions pages/chapter2.tex
Original file line number Diff line number Diff line change
Expand Up @@ -3,16 +3,14 @@
\chapter{公式插图表格}

\section{公式的使用}
在文中引用公式可以这么写:$a^2+b^2=c^2$这是勾股定理,他还可以表示为$c=\sqrt{a^2+b^2}$,还可以让公式单独一段并且加上编号

在文中引用公式可以这么写:$a^2+b^2=c^2$这是勾股定理,他还可以表示为$c=\sqrt{a^2+b^2}$,还可以让公式单独一段并且加上编号。注意,公式前请不要空行。
\begin{equation}
\sin^2{\theta}+\cos^2{\theta}=1 \label{eq:pingfanghe}
\end{equation}

还可以通过添加标签在正文中引用公式,如式\eqref{eq:pingfanghe}。

我们还可以轻松打出一个漂亮的矩阵

\begin{equation}
\mathbf{A}=
\left[\begin{matrix}
Expand All @@ -27,12 +25,14 @@ \section{公式的使用}
\end{matrix}\right]
\end{equation}

或者多个带编号的公式
或者多行对齐的的公式
\begin{equation}
\begin{aligned}
f_1(x)&=(x+y)^2\\
&=x^2+2xy+y^2
\end{aligned}
\end{equation}

\begin{eqnarray}
f_1(x)=12x^2+36x+\sin x\\
f_2(x)=\sqrt{3}{x^3+3x}
\end{eqnarray}

\section{插图的使用}

Expand All @@ -42,7 +42,7 @@ \section{插图的使用}

\begin{figure}[!htb]
\centering
\includegraphics[width=0.2\textwidth]
\includegraphics[width=0.3\textwidth]
{figures/whulogo.png}\\
\caption{插图示例}
\label{fig:whu}
Expand Down
4 changes: 3 additions & 1 deletion pages/chapter3.tex
Original file line number Diff line number Diff line change
Expand Up @@ -11,4 +11,6 @@ \section{引用文中小节}\label{sec:ref}
\section{引用参考文献}
这是一个参考文献引用的范例\cite{kuhn2004man}

还可以采用上标的引用方式\upcite{江泽民1989能源发展趋势及主要节能措施}
还可以采用上标的引用方式\upcite{江泽民1989能源发展趋势及主要节能措施}

引用多个文献\cite{kuhn2004man,江泽民2008新时期我国信息技术产业的发展,江泽民1989能源发展趋势及主要节能措施}
8 changes: 6 additions & 2 deletions pages/chapter4.tex
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,9 @@ \subsection{原始代码}
\end{lstlisting}

\subsection{代码高亮}
还可以对代码进行高亮,请参考 \href{https://www.overleaf.com/learn/latex/Code_Highlighting_with_minted}{Code Highlighting with minted}。注意使用Minted库时,需要系统默认Python有Pygments库,可以通过\verb|$ pip install Pygments| 来进行安装。
还可以对代码进行高亮,请参考 \href{https://www.overleaf.com/learn/latex/Code_Highlighting_with_minted}{Code Highlighting with minted}。
请先到cls文件中启用minted库。
注意使用Minted库时,需要系统默认Python有Pygments库,可以通过\verb|$ pip install Pygments| 来进行安装。

% \usemintedstyle{vs}
% \begin{minted}[linenos,baselinestretch=1.0,frame=lines]{cpp}
Expand Down Expand Up @@ -79,4 +81,6 @@ \subsection{算法描述/伪代码}


\section{绘图}
关于使用 \LaTeX{} 绘图的更多例子,请参考 \href{https://www.overleaf.com/learn/latex/Pgfplots_package}{Pgfplots package}

关于使用 \LaTeX{} 绘图的更多例子,请参考 \href{https://www.overleaf.com/learn/latex/Pgfplots_package}{Pgfplots package} 中的例子。
一般建议使用如Photoshop、PowerPoint等制图,再转换成PDF等格式插入。

0 comments on commit 0ee6eb4

Please sign in to comment.