Latex课程作业模板

%=======================02-713 LaTeX template, following the 15-210 template==================
%
% You don't need to use LaTeX or this template, but you must turn your homework in as
% a typeset PDF somehow.
%
% How to use:
%    1. Update your information in section "A" below
%    2. Write your answers in section "B" below. Precede answers for all 
%       parts of a question with the command "\question{n}{desc}" where n is
%       the question number and "desc" is a short, one-line description of 
%       the problem. There is no need to restate the problem.
%    3. If a question has multiple parts, precede the answer to part x with the
%       command "\part{x}".
%    4. If a problem asks you to design an algorithm, use the commands
%       \algorithm, \correctness, \runtime to precede your discussion of the 
%       description of the algorithm, its correctness, and its running time, respectively.
%    5. You can include graphics by using the command \includegraphics{FILENAME}
%
\documentclass[11pt]{article}
\usepackage{amsmath,amssymb,amsthm}
\usepackage{graphicx}
\usepackage[margin=1in]{geometry}
\usepackage{fancyhdr}
\setlength{\parindent}{0pt}
\setlength{\parskip}{5pt plus 1pt}
\setlength{\headheight}{13.6pt}
\newcommand\question[2]{\vspace{.25in}\hrule\textbf{#1: #2}\vspace{.5em}\hrule\vspace{.10in}}
\renewcommand\part[1]{\vspace{.10in}\textbf{(#1)}}
\newcommand\algorithm{\vspace{.10in}\textbf{Algorithm: }}
\newcommand\correctness{\vspace{.10in}\textbf{Correctness: }}
\newcommand\runtime{\vspace{.10in}\textbf{Running time: }}
\pagestyle{fancyplain}
\lhead{\textbf{\NAME\ (\ANDREWID)}}
\chead{\textbf{Contract Theory HW\HWNUM}}
\rhead{\today}
\begin{document}\raggedright
%Section A==============Change the values below to match your information==================
\newcommand\NAME{Junhao Kong}  % your name
\newcommand\ANDREWID{12101011}     % your student id
\newcommand\HWNUM{1}              % the homework number
%Section B==============Put your answers to the questions below here=======================

% no need to restate the problem --- the graders know which problem is which,
% but replacing "The First Problem" with a short phrase will help you remember
% which problem this is when you read over your homeworks to study.

\question{1}{The First Problem} 

\part{1}


\part{2}


\part{3}


\question{2}{The second problem}
\part{1}

\part{2}

\question{3}{The third problem}
\part{1}

\part{2}

\part{3}

\question{4}{The last problem}
\part{1}

\part{2}


\end{document}

最近用latex写论文,顺便找了一下课程作业的模板,在这里分享给大家,有什么问题可以私信我。如果,觉得有用可以帮忙点赞收藏哦。

LaTeX是一种基于TeX的排版系统,它广泛用于生成科技和数学文档。LaTeX通过使用模板来格式化文档,从而使得用户可以专注于内容的创作而不是格式的排版。一个基本的LaTeX作业模板代码通常包含以下部分: 1. 文档类声明(documentclass):指定文档类型,例如article、report或book等。 2. 包含的宏包(usepackage):引入额外的宏包来扩展LaTeX的功能,如数学公式、图形、表格等。 3. 文档信息(title、author、date):定义文档标题、作者和日期。 4. 前置内容(abstract、tableofcontents):可能包括摘要、目录等。 5. 正文(begin{document}到end{document}之间):文档的主要内容部分,包含章节、段落、列表、图形、表格和数学公式等。 6. 参考文献(thebibliography环境):如果需要,可以列出参考文献。 以下是一个简单的LaTeX作业模板代码示例: ```latex \documentclass[12pt]{article} % 文档类声明,此处为article类,正文大小12磅 \usepackage{graphicx} % 引入图形宏包 \usepackage{amsmath} % 引入数学公式宏包 \usepackage{geometry} % 引入页面布局宏包 \title{作业标题} % 文档标题 \author{作者姓名} % 作者信息 \date{\today} % 日期 \begin{document} % 开始正文部分 \maketitle % 生成文档标题 \begin{abstract} % 摘要部分 本文是一篇作业示例,用于展示LaTeX文档的基本结构。 \end{abstract} \section{引言} % 第一章节 这里是一些引言内容... \section{问题描述} % 第二章节 详细描述你所要解决的问题... \section{方法介绍} % 第三章节 介绍解决问题的方法和理论... \section{实验结果} % 第四章节 展示实验或计算结果... \begin{figure}[h] % 插入图形 \centering \includegraphics[width=0.5\textwidth]{example-image} % 图片宽度设置为文本宽度的一半 \caption{示例图形} \label{fig:example} \end{figure} \begin{table}[h] % 插入表格 \centering \begin{tabular}{|c|c|} \hline 列1 & 列2 \\ \hline 项1 & 项2 \\ \hline \end{tabular} \caption{示例表格} \label{tab:example} \end{table} % 如果有参考文献,可以在这里引用 \bibliographystyle{plain} % 定义参考文献样式 \bibliography{references} % 指定参考文献数据库文件 \end{document} ``` 请注意,上述代码仅为模板示例,实际应用时需要根据具体需求进行修改和扩展。如果你需要创建特定的LaTeX作业模板,可能需要包含特定的格式要求、封面、页眉页脚、自定义命令等。
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值