SchoolWork-LaTeX/数字逻辑及实验/平时作业/mypreamble.tex
423A35C7 5906ac1efc 重构目录层次
0-课程笔记
1-平时作业
2-实验报告
3-期末大作业
2024-09-02 18:32:58 +08:00

102 lines
3.0 KiB
TeX
Raw Permalink Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

\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{extarrows}
\usepackage{amssymb, amsfonts, amstext, amsmath, amsopn, amsthm}
\usepackage{multirow}
\usepackage{fp}
\usepackage{multicol}
\usepackage{pdfpages}
\usepackage{hyperref}
\usepackage{mylatex}
\usepackage{subfiles}
\usepackage{totpages} % 不加这个会导致总页数出错
% \usepackage{pgfplots}
% \pgfmathsetmacro{\totalpages}{\totalpages+1}
% \setcounter{totalpages}{1}
\pagestyle{fancyplain}
\title{\heiti\zihao{2} 《数字逻辑及实验》作业}
\author{\songti 岳锦鹏}
\date{2023年9月18日}
\fancyhead{}
\fancyfoot[C]{\thepage\quad\ref{TotPages}}
\renewcommand\thesection{\zhnum{section}}
\renewcommand \thesubsection {\arabic{subsection}}
\setlist[1]{label=\arabic{enumi}.,listparindent=\parindent}
\setlist[2]{label=(\arabic{enumii}),listparindent=\parindent}
% 就为了加个\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
}
\newcommand{\mydate}{
2023/09/23
}
\newcommand{\mytitle}{
\title{\fontsize{15}{0}华东师范大学计算机科学与技术学院上机实践报告\vspace{-2em}}
\date{}
\maketitle
\begin{longtable}[]{lll}
\toprule\noalign{}
\endhead
\bottomrule\noalign{}
\endlastfoot
\textbf{课程名称}:数据结构 & \textbf{年级}2022级 &
\textbf{上机实践成绩} \\
\textbf{指导教师}:金健 & \textbf{姓名}:岳锦鹏 &
\textbf{上机实践时间}2学时 \\
\textbf{上机实践名称}:第一章作业 & \textbf{学号}10213903403 &
\textbf{上机实践日期}\mydate \\
\end{longtable}
}
\def\getenum{%
\ifnum\EnumitemId=1%
enumi%
\else
\ifnum\EnumitemId=2%
enumii%
\else
\ifnum\EnumitemId=3%
enumiii%
\else%
enumiv%
\fi
\fi
\fi%
}
\newcommand{\cnitem}[1][]{
\IfBlankF{#1}{
\setcounter{\getenum}{#1-1}
}
\item
}