SchoolWork-LaTeX/网络安全基础/实验报告/mypreamble.tex

110 lines
3.7 KiB
TeX
Raw 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{zhnumber} % change section number to chinese
% \usepackage{enumerate}
\usepackage{enumitem}
\usepackage{titlesec}
\usepackage{fancyhdr}
\usepackage{environ} % 加了这个再\def\myitem就不报错了
% \usepackage[outputdir=./latex-output]{minted}
\usepackage{float} % https://blog.csdn.net/qq_32623363/article/details/101095168
\usepackage{fp}
\usepackage{graphicx} % 原来includegraphics要使用参数要用graphicx只是用graphics是没法带参数的
\usepackage{tabularx}
\usepackage{array}
\usepackage{ragged2e}
\usepackage{multirow}
\usepackage{url}
\usepackage{color}
\usepackage{mylatex}
\usepackage{totpages} % 不加这个会导致总页数出错
\pagestyle{fancyplain}
\fancyhead{}
\fancyhead[C]{华东师范大学计算机科学与技术学院上机实践报告}
\fancyfoot[C]{\thepage\quad\ref{TotPages}}
\renewcommand\thesection{\zhnum{section}}
\renewcommand \thesubsection {\arabic{subsection}}
\setlist[1]{label=\zhnum{enumi}}
\setlist[2]{labelindent=-1em, leftmargin=*, label=\arabic{enumii}\ }
\setlist[3]{listparindent=2em, leftmargin=*, label=\arabic{enumiii}\ }
\definecolor{shadecolor}{RGB}{204,232,207}
\newcommand{\mydate}{
2023年11月3日
}
\newcommand{\mychapternum}{
1
}
\newcommand{\mylabname}{
}
\newcommand{\myname}{
姓名
}
\newcommand{\mystudentnum}{
e.g. 12345678902
}
\input{myprivatepreamble}
\newcommand{\mytitle}{
\title{\fontsize{15}{0}华东师范大学计算机科学与技术学院上机实践报告\vspace{-2em}}
\date{}
\maketitle
\begin{center}
\begin{tabularx}{\textwidth}{XXl}
\toprule
\textbf{课程名称}:网络安全基础 & \textbf{年级}2022级 & \textbf{上机实践日期}\mydate \\
\textbf{指导教师}:黄新力 & \textbf{姓名}\myname & \textbf{学号}\mystudentnum \\
\multicolumn{3}{l}{\textbf{实验名称}:实验\zhnumber{\mychapternum}\quad\mylabname} \\
\bottomrule
\end{tabularx}
\end{center}
\addtocounter{table}{-1}
\vspace{1em}
}
\newcommand{\myitemx}[3][]{
\item \textbf{#2}
\begin{enumerate}[#1]
#3
\end{enumerate}
}
% https://blog.csdn.net/u010801696/article/details/79477226
\def\UrlBreaks{\do\A\do\B\do\C\do\D\do\E\do\F\do\G\do\H\do\I\do\J
\do\K\do\L\do\M\do\N\do\O\do\P\do\Q\do\R\do\S\do\T\do\U\do\V
\do\W\do\X\do\Y\do\Z\do\[\do\\\do\]\do\^\do\_\do\`\do\a\do\b
\do\c\do\d\do\e\do\f\do\g\do\h\do\i\do\j\do\k\do\l\do\m\do\n
\do\o\do\p\do\q\do\r\do\s\do\t\do\u\do\v\do\w\do\x\do\y\do\z
\do\.\do\@\do\\\do\/\do\!\do\_\do\|\do\;\do\>\do\]\do\)\do\,
\do\?\do\'\do+\do\=\do\#}
\renewcommand{\thefigure}{\mychapternum-\arabic{figure}}
\renewcommand{\thetable}{\mychapternum-\arabic{table}}
% https://mirrors.pku.edu.cn/ctan/info/svg-inkscape/InkscapePDFLaTeX.pdf
% 这个只有PDFLaTeX才能用filemod也是
% \newcommand{\executeiffilenewer}[3]{%
% \ifnum\pdfstrcmp{\pdffilemoddate{#1}}%
% {\pdffilemoddate{#2}}>0%
% {\immediate\write18{#3}}\fi%
% }
% 该命令用于控制 p{} 的情况
\newcolumntype{P}[1]{>{\RaggedRight\hspace{0pt}}p{#1}} % 使用过程中将p{4cm}换成P{4cm},小写改成大写即可!
% 该命令用于控制 X 的情况
\newcolumntype{Z}{>{\centering\let\newline\\\arraybackslash\hspace{0pt}}X} % 使用过程中将Z 换成 X即可
% 可利用 RaggedLeft Centering替换RaggedRight实现靠右和居中 [代码对大小写敏感!!!!!!!!!!!!!!!!!!!!!!!!!!!!]
% 原文链接https://blog.csdn.net/wanjiac/article/details/107494424