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

Merge pull request #33 from glatavento/master

refactor: 用硬编码的 tikz 命令代替硬编码的 eps 图像
parents 99975559 8022e30d
No related branches found
No related tags found
No related merge requests found
......@@ -45,8 +45,8 @@ DocStrip格式合并了LaTeX源代码和说明文档,更有利于宏包的发
```shell
NJUThesis-master/
│ njulogo.eps
│ njuname.eps
│ njulogo.tikz
│ njuname.tikz
│ njuthesis.bib
│ njuthesis.cls
│ njuthesis-sample.tex
......
......@@ -5,14 +5,16 @@
所有图片默认存放在主目录下的\texttt{figure/}文件夹内
\begin{figure}[htbp]
\includegraphics[width=0.5\textwidth]{njuname}
% \includegraphics[width=0.5\textwidth]{njuname}
\resizebox{0.5\textwidth}{!}{\input{njuname.tikz}}
\caption{南京大学名称}
\label{fig:njuname}
\end{figure}
你可以使用\lstinline|figure|环境插入图片,如\cref{fig:njuname},代码如下:
\begin{lstlisting}[style=LaTeX]
\begin{figure}
\includegraphics[width=0.5\textwidth]{njuname}
% \includegraphics[width=0.5\textwidth]{njuname}
\resizebox{0.5\textwidth}{!}{\input{njuname.tikz}}
\caption{南京大学名称}
\end{figure}
\end{lstlisting}
......@@ -21,7 +23,8 @@
% wrapfigure后面不能有空行
\begin{wrapfigure}{r}{0cm}
% \label{fig:njulogo}
\includegraphics[width=.15\textwidth]{njulogo}
% \includegraphics[width=.15\textwidth]{njulogo}
\resizebox{.15\textwidth}{!}{\input{njulogo.tikz}}
\caption{校徽}
\end{wrapfigure}
\zhlipsum[3][name=xiangyu]
......@@ -29,17 +32,20 @@
\begin{figure}[htbp]
\begin{subfigure}{.32\textwidth}
\centering
\includegraphics[width=\textwidth]{njulogo}
% \includegraphics[width=\textwidth]{njulogo}
\resizebox{\textwidth}{!}{\input{njulogo.tikz}}
\caption{logo1}
\end{subfigure}
\begin{subfigure}{.32\textwidth}
\centering
\includegraphics[width=\textwidth]{njulogo}
% \includegraphics[width=\textwidth]{njulogo}
\resizebox{\textwidth}{!}{\input{njulogo.tikz}}
\caption{logo2}
\end{subfigure}
\begin{subfigure}{.32\textwidth}
\centering
\includegraphics[width=\textwidth]{njulogo}
% \includegraphics[width=\textwidth]{njulogo}
\resizebox{\textwidth}{!}{\input{njulogo.tikz}}
\caption{logo3}
\end{subfigure}
\caption{njulogos}
......
This diff is collapsed.
......@@ -72,8 +72,8 @@ DocStrip格式合并了LaTeX源代码和说明文档,更有利于宏包的发
```shell
NJUThesis-master/
│ njulogo.eps
│ njuname.eps
│ njulogo.tikz
│ njuname.tikz
│ njuthesis.bib
│ njuthesis.cls
│ njuthesis-sample.tex
......@@ -175,10 +175,9 @@ through XeTeX.
%<*install>
\usedir{doc/latex/njuthesis}
\nopreamble\nopostamble
\file{njulogo.eps} {\from{\jobname-logos.dtx}{njulogo}}
\file{njuname.eps} {\from{\jobname-logos.dtx}{njuname}}
\file{njuname.tikz} {\from{\jobname-logos.dtx}{njulogo}}
\file{njulogo.tikz} {\from{\jobname-logos.dtx}{njuname}}
\file{README.md} {\from{\jobname.dtx}{readme-zh}}
\file{README_EN.md} {\from{\jobname.dtx}{readme-en}}
}
\obeyspaces
......@@ -189,12 +188,11 @@ through XeTeX.
\Msg{* *}
\Msg{* The recommended directory is TDS:tex/latex/njuthesis *}
\Msg{* *}
\Msg{* njulogo.eps *}
\Msg{* njuname.eps *}
\Msg{* njulogo.tikz *}
\Msg{* njuname.tikz *}
\Msg{* njuthesis.cls *}
\Msg{* njuthesis.ins *}
\Msg{* README.md *}
\Msg{* README_EN.md *}
\Msg{* *}
\Msg{* To produce the documentation, run the file njuthesis.dtx *}
\Msg{* through XeLaTeX. *}
......@@ -1202,6 +1200,7 @@ through XeTeX.
\DeclareGraphicsExtensions{.pdf,.eps,.jpg,.png}
\RequirePackage{subcaption}
\RequirePackage{wrapfig} % Wrap text around figures
\RequirePackage{tikz}
% \end{macrocode}
%
% 必须以该顺序加载以下包
......@@ -2267,9 +2266,9 @@ through XeTeX.
\begin{spacing}{1.25}
\vskip 0mm
\hspace{-10mm}
\includegraphics[height=3cm]{njulogo}\smallskip
\resizebox{!}{3cm}{\input{njulogo.tikz}}\smallskip
\begin{center}
\includegraphics[height=3.35cm]{njuname}
\resizebox{!}{3.35cm}{\input{njuname.tikz}}
\vskip 10mm
{\zihao{1}\makebox[9em][s]{\bf{\songti\l_@@_info_type_tl_name}}}
\vfill
......@@ -2302,9 +2301,9 @@ through XeTeX.
\begin{spacing}{1.25}
\begin{center}
\hspace{0pt} \vskip 5mm
\includegraphics[height=1.9cm]{njulogo}
\resizebox{!}{1.9cm}{\input{njulogo.tikz}}
\vskip 10mm
\includegraphics[height=2cm]{njuname}
\resizebox{!}{2cm}{\input{njuname.tikz}}
\vskip 15mm
{\zihao{1}\makebox[10em][s]{\bf{\kaishu\l_@@_info_type_tl_name}}}
\vskip 5mm
......@@ -2376,7 +2375,7 @@ through XeTeX.
{\l_@@_major_en_tl}
}
\vskip\stretch{2}
\includegraphics[width=2.5cm]{njulogo} \\
\resizebox{2.5cm}{!}{\input{njulogo.tikz}} \\
\vskip 3mm
\normalfont\l_@@_info_dept_en_tl\\
{Nanjing~University}
......
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