96 lines
3.2 KiB
TeX
96 lines
3.2 KiB
TeX
|
\usepackage[margin=1in]{geometry}
|
|||
|
\usepackage{longtable}
|
|||
|
\usepackage{booktabs}
|
|||
|
\usepackage{array}
|
|||
|
\usepackage{zhnumber} % change section number to chinese
|
|||
|
% \usepackage{enumerate}
|
|||
|
\usepackage{enumitem}
|
|||
|
\usepackage{titlesec}
|
|||
|
\usepackage{fancyhdr}
|
|||
|
\usepackage{environ} % 加了这个再\def\myitem就不报错了
|
|||
|
\usepackage[outputdir=./latex-output]{minted}
|
|||
|
\usepackage{subfiles}
|
|||
|
\usepackage{xcolor}
|
|||
|
\usepackage{booktabs}
|
|||
|
% \usepackage{tabularx}
|
|||
|
\usepackage{multirow}
|
|||
|
\usepackage{amsmath}
|
|||
|
\usepackage{caption}
|
|||
|
\usepackage{subcaption}
|
|||
|
\usepackage{graphics}
|
|||
|
\usepackage{mylatex}
|
|||
|
\usepackage{fp}
|
|||
|
% \usepackage{floatrow} % TODO: 出现未解决的报错,可能和别的包冲突
|
|||
|
\usepackage{totpages} % 不加这个会导致总页数出错
|
|||
|
\usepackage{flowchart}
|
|||
|
\usetikzlibrary{arrows}
|
|||
|
% \usepackage{pgfplots}
|
|||
|
% \pgfmathsetmacro{\totalpages}{\totalpages+1}
|
|||
|
% \setcounter{totalpages}{1}
|
|||
|
\pagestyle{fancyplain}
|
|||
|
\fancyhead{}
|
|||
|
\fancyhead[C]{华东师范大学计算机科学与技术学院上机实践报告}
|
|||
|
\fancyfoot[C]{第 \thepage 页\quad 共 \ref{TotPages} 页}
|
|||
|
\renewcommand\thesection{\zhnum{section}}
|
|||
|
\renewcommand \thesubsection {\arabic{subsection}}
|
|||
|
\setlist[1]{label=\zhnum{enumi}、, listparindent=\parindent}
|
|||
|
\setlist[2]{labelindent=-1em, leftmargin=*, label=\arabic{enumii}.\quad, listparindent=\parindent}
|
|||
|
|
|||
|
\newcommand{\mydate}{
|
|||
|
2023/09/23
|
|||
|
}
|
|||
|
|
|||
|
\newcommand{\mychapternum}{
|
|||
|
1
|
|||
|
}
|
|||
|
|
|||
|
\newcommand{\mytitle}{
|
|||
|
\title{\fontsize{15}{0}华东师范大学计算机科学与技术学院上机实践报告\vspace{-2em}}
|
|||
|
\date{}
|
|||
|
\maketitle
|
|||
|
\setlength{\tabcolsep}{2em}
|
|||
|
|
|||
|
\begin{longtable}[]{lll}
|
|||
|
\toprule\noalign{}
|
|||
|
\endhead
|
|||
|
\bottomrule\noalign{}
|
|||
|
\endlastfoot
|
|||
|
\textbf{课程名称}:数字逻辑及实验 & \textbf{年级}:2022级 &
|
|||
|
\textbf{上机实践成绩}: \\
|
|||
|
\textbf{指导教师}:施维良 & \textbf{姓名}:岳锦鹏 &
|
|||
|
\textbf{上机实践日期}:\mydate \\
|
|||
|
\textbf{实践编号}:实验\zhnumber{\mychapternum} & \textbf{学号}:10213903403 &
|
|||
|
\textbf{上机实践时间}:2学时 \\
|
|||
|
\end{longtable}
|
|||
|
\setcounter{table}{0} % 这个表格不应算,最好改成当前序号减一(TODO)
|
|||
|
}
|
|||
|
|
|||
|
% \def\myitem#1#2{
|
|||
|
% \item \textbf{#1}
|
|||
|
% \begin{enumerate}
|
|||
|
% #2
|
|||
|
% \end{enumerate}
|
|||
|
% }
|
|||
|
|
|||
|
\renewcommand{\thefigure}{\mychapternum.\arabic{figure}}
|
|||
|
\renewcommand{\thetable}{\mychapternum.\arabic{table}}
|
|||
|
|
|||
|
% 就为了加个\noindent,但是没有装饰器,也没有继承,只能把原来的函数复制一份
|
|||
|
% TODO: 试试expl3中有没有类似装饰器和继承的写法
|
|||
|
\renewcommand{\includexopp}[2][1]{
|
|||
|
\executeiffilenewer{./xournalpp/#2.xopp}{./latex-output/xournalpp-output/#2.pdf}%
|
|||
|
{xournalpp -p ./latex-output/xournalpp-output/#2.pdf ./xournalpp/#2.xopp && pdfcrop ./latex-output/xournalpp-output/#2.pdf ./latex-output/xournalpp-output/#2.pdf}
|
|||
|
|
|||
|
\FPset\originwidth{#1}
|
|||
|
\FPset\one{1}
|
|||
|
|
|||
|
\FPifgt\originwidth\one
|
|||
|
\FPdiv\targetwidth\one\originwidth
|
|||
|
\begin{center}
|
|||
|
\noindent\includegraphics[width=\FPprint\targetwidth\linewidth]{./latex-output/xournalpp-output/#2.pdf}
|
|||
|
\end{center}
|
|||
|
\else
|
|||
|
\noindent\includegraphics[width=#1\linewidth]{./latex-output/xournalpp-output/#2.pdf}
|
|||
|
\fi
|
|||
|
}
|