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