diff --git a/.gitignore b/.gitignore index deeab83b205158c5e9d24e3e7f1458cdcbb73f78..169ad123776861c42ea621bc71a553eff0cff9fb 100644 --- a/.gitignore +++ b/.gitignore @@ -13,6 +13,7 @@ .*.lb ## Intermediate documents: +*.hd *.dvi *.xdv *-converted-to.* diff --git a/.vscode/settings.json b/.vscode/settings.json index 3ffa746498de72a732b5edd0e1c95f989df81af7..ce6c41495dc918bf3e59b7d64630285b4341edd6 100644 --- a/.vscode/settings.json +++ b/.vscode/settings.json @@ -30,6 +30,14 @@ "args": [ "%DOCFILE%" ] + }, + { + "name": "makedoc", + "command": "latexmk", + "args": [ + "-pv", + "njuthesis.dtx" + ] } ], "latex-workshop.latex.recipes": [ @@ -59,6 +67,12 @@ "xelatex", "xelatex" ] + }, + { + "name": "makedoc", + "tools": [ + "makedoc" + ] } ] } diff --git a/latexmkrc b/latexmkrc new file mode 100644 index 0000000000000000000000000000000000000000..17e9557a5e60632607059fd57821ea68b75df78f --- /dev/null +++ b/latexmkrc @@ -0,0 +1,18 @@ +# vim: set ft=perl: + +$pdf_mode = 5; + +$xelatex = "xelatex -shell-escape -file-line-error -halt-on-error -interaction=nonstopmode -no-pdf -synctex=1 %O %S"; +$xdvipdfmx = "xdvipdfmx -q -E -o %D %O %S"; + +$bibtex_use = 1.5; + +$clean_ext = "hd loe ptc run.xml synctex.gz thm xdv"; + +$makeindex = "makeindex -s gind.ist %O -o %D %S"; + +add_cus_dep('nlo', 'nls', 0, 'nlo2nls'); +sub nlo2nls { + system("makeindex -s nomencl.ist -o \"$_[0].nls\" \"$_[0].nlo\""); +} +push @generated_exts, 'nlo', 'nls'; diff --git a/njuthesis.dtx b/njuthesis.dtx new file mode 100644 index 0000000000000000000000000000000000000000..d2aa8a2856ca3fcdaaf9dc5ad99da0a99efa2f06 --- /dev/null +++ b/njuthesis.dtx @@ -0,0 +1,92 @@ +% \iffalse meta-comment +% +% Copyright (C) 2005-2021 by Nanjing University Linux User Group <my@yaoge123.com> +% ------------------------------------------------------- +% +% This file may be distributed and/or modified under the +% conditions of the LaTeX Project Public License, either version 1.3 +% of this license or (at your option) any later version. +% The latest version of this license is in: +% +% http://www.latex-project.org/lppl.txt +% +% and version 1.3 or later is part of all distributions of LaTeX +% version 2005/12/01 or later. +% +% \fi +% +% \iffalse +%<*driver> +\ProvidesFile{njuthesis.dtx}[2021/09/12 0.8.3 Nanjing University Thesis Template] +\documentclass{ltxdoc} +\usepackage{dtx-style} + +\EnableCrossrefs +\CodelineIndex + +\begin{document} + \DocInput{njuthesis.dtx} +\end{document} +%</driver> +% \fi +% +% \DoNotIndex{\newenvironment,\@bsphack,\@empty,\@esphack,\sfcode} +% \DoNotIndex{\addtocounter,\label,\let,\linewidth,\newcounter} +% \DoNotIndex{\noindent,\normalfont,\par,\parskip,\phantomsection} +% \DoNotIndex{\providecommand,\ProvidesPackage,\refstepcounter} +% \DoNotIndex{\RequirePackage,\setcounter,\setlength,\string,\strut} +% \DoNotIndex{\textbackslash,\texttt,\ttfamily,\usepackage} +% \DoNotIndex{\begin,\end,\begingroup,\endgroup,\par,\\} +% \DoNotIndex{\if,\ifx,\ifdim,\ifnum,\ifcase,\else,\or,\fi} +% \DoNotIndex{\let,\def,\xdef,\edef,\newcommand,\renewcommand} +% \DoNotIndex{\expandafter,\csname,\endcsname,\relax,\protect} +% \DoNotIndex{\Huge,\huge,\LARGE,\Large,\large,\normalsize} +% \DoNotIndex{\small,\footnotesize,\scriptsize,\tiny} +% \DoNotIndex{\normalfont,\bfseries,\slshape,\sffamily,\interlinepenalty} +% \DoNotIndex{\textbf,\textit,\textsf,\textsc} +% \DoNotIndex{\hfil,\par,\hskip,\vskip,\vspace,\quad} +% \DoNotIndex{\centering,\raggedright,\ref} +% \DoNotIndex{\c@secnumdepth,\@startsection,\@setfontsize} +% \DoNotIndex{\ ,\@plus,\@minus,\p@,\z@,\@m,\@M,\@ne,\m@ne} +% \DoNotIndex{\@@par,\DeclareOperation,\RequirePackage,\LoadClass} +% \DoNotIndex{\AtBeginDocument,\AtEndDocument} +% +% \GetFileInfo{\jobname.dtx} +% +% \def\indexname{绱㈠紩} +% \IndexPrologue{\section{\indexname}} +% +% \title{鍗椾含澶у瀛︿綅璁烘枃妯℃澘} +% \author{Nanjing University Linux User Group \\[5pt]\texttt{my@yaoge123.com}} +% \date{v\fileversion\ (\filedate)} +% \maketitle\thispagestyle{empty} +% +% \section{Introduction} +% +% Put text here. +% +% \section{Usage} +% +% Put text here. +% +% \DescribeMacro{\dummyMacro} +% This macro does nothing.\index{doing nothing|usage} It is merely an +% example. If this were a real macro, you would put a paragraph here +% describing what the macro is supposed to do, what its mandatory and +% optional arguments are, and so forth. +% \begin{macrocode} +\newcommand{\dummyMacro}{} +% \end{macrocode} +% +% \DescribeEnv{dummyEnv} +% This environment does nothing. It is merely an example. +% If this were a real environment, you would put a paragraph here +% describing what the environment is supposed to do, what its +% mandatory and optional arguments are, and so forth. +% \begin{macrocode} +\newenvironment{dummyEnv}{% +}{% +% \end{macrocode} +% +% \Finale +\endinput diff --git a/njuthesis.ins b/njuthesis.ins new file mode 100644 index 0000000000000000000000000000000000000000..862369b5db6728526b24836db9aa21ffc915a530 --- /dev/null +++ b/njuthesis.ins @@ -0,0 +1,62 @@ +%% +%% Copyright (C) 2021 by Nanjing University Linux User Group <my@yaoge123.com> +%% +%% This file is part of the NJUThesis package project. +%% +%% This file may be distributed and/or modified under the conditions of +%% the LaTeX Project Public License, either version 1.3 of this license +%% or (at your option) any later version. The latest version of this +%% license is in: +%% +%% http://www.latex-project.org/lppl.txt +%% +%% and version 1.3 or later is part of all distributions of LaTeX version +%% 2005/12/01 or later. +%% + +\input docstrip + +\askforoverwritefalse +\keepsilent + +\usedir{tex/latex/njuthesis} + +\preamble + +This is a generated file. + +Copyright (C) 2021 by Nanjing University Linux User Group <my@yaoge123.com> + +This file may be distributed and/or modified under the conditions of +the LaTeX Project Public License, either version 1.3 of this license +or (at your option) any later version. The latest version of this +license is in: + + http://www.latex-project.org/lppl.txt + +and version 1.3 or later is part of all distributions of LaTeX version +2005/12/01 or later. + +To produce the documentation run the original source files ending with `.dtx' +through LaTeX. + +\endpreamble + +\generate{\file{\jobname.cls}{\from{\jobname.dtx}{cls}}} + +\obeyspaces +\Msg{*************************************************************} +\Msg{* *} +\Msg{* To finish the installation you have to move the following *} +\Msg{* file into a directory searched by TeX: *} +\Msg{* *} +\Msg{* skeleton.sty *} +\Msg{* *} +\Msg{* To produce the documentation run the file skeleton.dtx *} +\Msg{* through LaTeX. *} +\Msg{* *} +\Msg{* Happy TeXing! *} +\Msg{* *} +\Msg{*************************************************************} + +\endbatchfile