Path: blob/main/docs/course-assets/latex-examples/latex-template.tex
908 views
\documentclass{article}12\usepackage{graphicx, color}3\usepackage{palatino, mathpazo}4\usepackage{enumerate, mathtools}5\usepackage{hyperref}6\usepackage[margin=2cm]{geometry}7\usepackage{minted}8\usemintedstyle{tango}9\usepackage[svgnames]{xcolor}10%11% Edit me!!12%13\newcommand{\myname}{MyName}14\newcommand{\assignment}{Homework \(n\)}15%16%17\newcounter{problem}18\newenvironment{problem}{19\refstepcounter{problem}20\noindent21{\color{NavyBlue}\textbf{Problem \theproblem.}}2223\noindent24\hspace{.02\textwidth}25\begin{minipage}[t]{.98\textwidth}}26{\end{minipage}27\vspace{5mm}}282930%% ----------------------------------------------------31%% topline is a bit like a function of 3 "variables",32%% referred to as #1, #2, and #333%% ----------------------------------------------------34\newcommand{\topline}[3]{35\noindent36{37\color{NavyBlue}38\begin{minipage}[t]{.35\textwidth}39#140\end{minipage}41\begin{minipage}[t]{.35\textwidth}42#243\end{minipage}44\begin{minipage}[t]{.30\textwidth}45#346\end{minipage}47\hrule48}49}5051%% ------------------------------------------------------52%% end of topmatter53%%-------------------------------------------------------5455\begin{document}5657\topline{Math 190 - Spring 2024}{Assignment 0}{\myname}5859\vspace{2cm}6061\begin{problem}62Here is the first homework problem solution.63\[\int_{-\infty}^\infty e^{-x^2}dx = \sqrt{\pi}.\]64\end{problem}6566\begin{problem}67Here is the second homework problem solution.68It has some parts:69\begin{enumerate}[(a)]70\item One aspect of this problem.7172Some further discussion.7374Still more...75\item Another aspect76\end{enumerate}77And it has a78\href{http://www.tufts.edu}{URL reference (Tufts)}.79%% ----------------------------------------------------80%% the command \href and the behavior of81%% \begin{enumerate}[(a)] ...82%% depend on some of the packages we loaded in the83%% topmatter.84%% ----------------------------------------------------85\end{problem}8687\begin{problem}88Here we include some computer code.8990\begin{minted}[bgcolor=Lavender]{Python}91def square(x):92return x*x9394map(square,[1,2,3])95\end{minted}96\end{problem}97\end{document}9899100