Book a Demo!
CoCalc Logo Icon
StoreFeaturesDocsShareSupportNewsAboutPoliciesSign UpSign In
gmcninch-tufts
GitHub Repository: gmcninch-tufts/2024-Sp-Math190
Path: blob/main/docs/course-assets/latex-examples/latex-template.tex
908 views
1
\documentclass{article}
2
3
\usepackage{graphicx, color}
4
\usepackage{palatino, mathpazo}
5
\usepackage{enumerate, mathtools}
6
\usepackage{hyperref}
7
\usepackage[margin=2cm]{geometry}
8
\usepackage{minted}
9
\usemintedstyle{tango}
10
\usepackage[svgnames]{xcolor}
11
%
12
% Edit me!!
13
%
14
\newcommand{\myname}{MyName}
15
\newcommand{\assignment}{Homework \(n\)}
16
%
17
%
18
\newcounter{problem}
19
\newenvironment{problem}{
20
\refstepcounter{problem}
21
\noindent
22
{\color{NavyBlue}\textbf{Problem \theproblem.}}
23
24
\noindent
25
\hspace{.02\textwidth}
26
\begin{minipage}[t]{.98\textwidth}}
27
{\end{minipage}
28
\vspace{5mm}}
29
30
31
%% ----------------------------------------------------
32
%% topline is a bit like a function of 3 "variables",
33
%% referred to as #1, #2, and #3
34
%% ----------------------------------------------------
35
\newcommand{\topline}[3]{
36
\noindent
37
{
38
\color{NavyBlue}
39
\begin{minipage}[t]{.35\textwidth}
40
#1
41
\end{minipage}
42
\begin{minipage}[t]{.35\textwidth}
43
#2
44
\end{minipage}
45
\begin{minipage}[t]{.30\textwidth}
46
#3
47
\end{minipage}
48
\hrule
49
}
50
}
51
52
%% ------------------------------------------------------
53
%% end of topmatter
54
%%-------------------------------------------------------
55
56
\begin{document}
57
58
\topline{Math 190 - Spring 2024}{Assignment 0}{\myname}
59
60
\vspace{2cm}
61
62
\begin{problem}
63
Here is the first homework problem solution.
64
\[\int_{-\infty}^\infty e^{-x^2}dx = \sqrt{\pi}.\]
65
\end{problem}
66
67
\begin{problem}
68
Here is the second homework problem solution.
69
It has some parts:
70
\begin{enumerate}[(a)]
71
\item One aspect of this problem.
72
73
Some further discussion.
74
75
Still more...
76
\item Another aspect
77
\end{enumerate}
78
And it has a
79
\href{http://www.tufts.edu}{URL reference (Tufts)}.
80
%% ----------------------------------------------------
81
%% the command \href and the behavior of
82
%% \begin{enumerate}[(a)] ...
83
%% depend on some of the packages we loaded in the
84
%% topmatter.
85
%% ----------------------------------------------------
86
\end{problem}
87
88
\begin{problem}
89
Here we include some computer code.
90
91
\begin{minted}[bgcolor=Lavender]{Python}
92
def square(x):
93
return x*x
94
95
map(square,[1,2,3])
96
\end{minted}
97
\end{problem}
98
\end{document}
99
100