效果图
和docx版的区别在于标题有缩进,但是个人觉得关系不大,因此没搞。
\documentclass[UTF8]{ctexart}
\usepackage{geometry}%页边距调整
\usepackage{graphicx}%图片支持
\usepackage{xcolor} %代码着色
\usepackage{listings}%代码支持
\geometry{
a4paper,
left=3.18cm,
right=3.18cm,
top=2.54cm,
bottom=2.54cm
}%页边距调整
%------------------------------------------------------------------------------------------------------------------
%代码调整
\definecolor{mygreen}{rgb}{0,0.6,0}
\definecolor{mygray}{rgb}{0.5,0.5,0.5}
\definecolor{mymauve}{rgb}{0.58,0,0.82}
\linespread{1.5}%行距调整
\lstset{
backgroundcolor=\color{white}, % choose the background color
basicstyle=\footnotesize, % size of fonts used for the code或改成\small\monaco稍大
numbers=left, % 设置行号
numberstyle=\footnotesize, % 设置行号字体大小
columns=fullflexible,
breaklines=true, % automatic line breaking only at whitespace
captionpos=b, % sets the caption-position to bottom
tabsize=4, % 把tab扩展为4个空格,默认是8个太长
commentstyle=\color{mygreen}, % 设置注释颜色
keywordstyle=\color{blue}, % 设置keyword颜色
stringstyle=\color{mymauve}, % string literal style
frame=single, % 设置有边框
rulesepcolor=\color{red!20!green!20!blue!20},
identifierstyle=\color{black},
language = python,
}
%------------------------------------------------------------------------------------------------------------------
\begin{document}
\begin{center}
{\heiti\LARGE 程序报告}\par
$ $
\parbox[H]{0.4\linewidth}{
学号: \hfill 姓名:
}
\end{center}
\textbf{一、问题重述}\\
\fbox{
\parbox{1\linewidth}{
(所采用的方法,有无对方法加以改进,该方法有哪些优化方向(参数调整,框架调整,或者指出方法的局限性和常见问题),伪代码,理论结果验证等… 思考题,非必填)
===================================================
}
}\\
\textbf{二、设计思想}\\
\fbox{
\parbox{1\linewidth}{
(所采用的方法,有无对方法加以改进,该方法有哪些优化方向(参数调整,框架调整,或者指出方法的局限性和常见问题),伪代码,理论结果验证等… 思考题,非必填)
===================================================
}
}\\
\textbf{三、代码内容}\\
\fbox{
\parbox{1\linewidth}{
(能体现解题思路的主要代码,有多个文件或模块可用多个"===="隔开,必填)
===================================================
}
}\\
\textbf{四、实验结果}\\
\fbox{
\parbox{1\linewidth}{
(实验结果,必填)
===================================================
}
}\\
\textbf{五、总结}\\
\fbox{
\parbox{1\linewidth}{
(自评分析(是否达到目标预期,可能改进的方向,实现过程中遇到的困难,从哪些方面可以提升性能,模型的超参数和框架搜索是否合理等),思考题,非必填)
===================================================
}
}\\
\end{document}