🚀 Initial upload of report-template is complete!

This commit is contained in:
rzmk 2022-02-26 13:21:15 -05:00
commit b6b984d8d0
10 changed files with 414 additions and 0 deletions

8
.gitignore vendored Normal file
View file

@ -0,0 +1,8 @@
venv
_minted-report
*.aux
*.fdb_latexmk
*.fls
*.log
*.out
*.synctex(busy)

5
Makefile Normal file
View file

@ -0,0 +1,5 @@
report: report.tex awe-homework.cls
xelatex -shell-escape report
clean:
rm -rf *.pdf *.log *.aux *.dvi *.out *.cpt _minted-*

Binary file not shown.

After

Width:  |  Height:  |  Size: 8.2 MiB

35
README.md Normal file
View file

@ -0,0 +1,35 @@
<!-- PROJECT LOGO -->
<br />
<div align="center">
<a href="https://github.com/rzmk/report-template">
<img src="papers.svg" alt="Papers" width="80" height="80">
</a>
<h3 align="center">report-template</h3>
<div align="center">
<a href="https://www.overleaf.com/read/nghcfhgrsztp"><strong>Build your report on Overleaf! »</strong></a>
<br />
</div>
</div>
# LaTeX Report Template
A homework/report template in LaTeX with multiple features (local environment files).
![Report](preview.png)
## Overleaf Template
[**Click here** to go to the Overleaf template](https://www.overleaf.com/read/nghcfhgrsztp) which you can make a copy of and work on it within your browser. Once registered or signed into Overleaf, you can follow the steps below to build your copy.
![Overleaf Template Tutorial](Overleaf_Template_Tutorial.gif)
## Some Features
- Code blocks
- Inline code
- Hyperlinks
## Acknowledgements
- [Initial template from this GitHub repository](https://github.com/WorcesterSociety/HomeworkTemplate).

135
awe-homework.cls Normal file
View file

@ -0,0 +1,135 @@
% ---------------------------------------------------------------------
% Identification
% ---------------------------------------------------------------------
\ProvidesClass{awe-homework}
\NeedsTeXFormat{LaTeX2e}
% ---------------------------------------------------------------------
% Class Options
% ---------------------------------------------------------------------
% Inherit options of article.
\DeclareOption*{%
\PassOptionsToClass{\CurrentOption}{article}
}
\ProcessOptions\relax
\LoadClass{article}
% ---------------------------------------------------------------------
% Package Dependencies
% ---------------------------------------------------------------------
% Math symbols.
\RequirePackage{amsmath}
% More math symbols.
\RequirePackage{amssymb}
% Colored text.
\RequirePackage{color}
% Better enumerations.
\RequirePackage{enumerate}
% More customization for enumerations.
\RequirePackage{enumitem}
% Fancy headers and footers!
\RequirePackage{fancyhdr}
% Configure page layout.
\RequirePackage{geometry}
% Automatic hyperlinks!
\RequirePackage{hyperref}
% Configure text hyphenation.
\RequirePackage{hyphenat}
% Even more math symbols.
\RequirePackage{mathabx}
% Typesetting formulas and inference rules.
\RequirePackage{mathpartir}
% Space saving efforts.
\RequirePackage{microtype}
% Syntax highlighting.
\RequirePackage{minted}
% Support for multicolumn, used for lists.
\RequirePackage{multicol}
% Used for Tikz pictures, e.g. for finite state machines.
\RequirePackage{tikz}
% ---------------------------------------------------------------------
% Color Definitions
% ---------------------------------------------------------------------
\definecolor{belize-hole}{RGB}{41, 128, 185}
\definecolor{code}{RGB}{241, 240, 236}
% ---------------------------------------------------------------------
% Configuration Commands
% ---------------------------------------------------------------------
% Setters
\newcommand*{\name}[1]{\def\@name{#1}}
\newcommand*{\doctitle}[1]{\def\@doctitle{#1}}
\newcommand*{\course}[1]{\def\@course{#1}}
% Getters
\newcommand*{\getname}{\@name}
\newcommand*{\getdoctitle}{\@doctitle}
\newcommand*{\getcourse}{\@course}
% ---------------------------------------------------------------------
% Layout Setup
% ---------------------------------------------------------------------
% Margins
\geometry{margin=1in}
% Header and footer
\pagestyle{fancy}
\lhead{\getdoctitle}
\rhead{\getname}
\cfoot{\thepage}
% Hyperlinks
\hypersetup{
colorlinks=true,
linkcolor=black,
citecolor=black,
filecolor=black,
urlcolor=belize-hole
}
% Footnote style
\renewcommand{\thefootnote}{[\arabic{footnote}]}
% Non-bold description enumerations
\setlist[description]{font=\normalfont}
% Syntax highlighting
\setminted{autogobble, bgcolor=code}
\setmintedinline{bgcolor=white}
% ---------------------------------------------------------------------
% Layout Commands
% ---------------------------------------------------------------------
\SetEnumitemKey{twocol}{%
before=\raggedcolumns\begin{multicols}{2},
after=\end{multicols}
}
\SetEnumitemKey{threecol}{%
before=\raggedcolumns\begin{multicols}{3},
after=\end{multicols}
}
\newcommand*{\makeheader}{%
\thispagestyle{plain}
\begin{center}
{\Large \getdoctitle} \\
\getcourse \\
\getname \\
\end{center}
}
\newcommand*{\question}[2]{%
\vspace{.25in}\hrule\vspace{0.5em}
\noindent{\bf#1.} #2\vspace{0.5em}
\hrule\vspace{.25in}
}

145
papers.svg Normal file
View file

@ -0,0 +1,145 @@
<?xml version="1.0" encoding="utf-8"?>
<!-- Generator: Adobe Illustrator 26.0.3, SVG Export Plug-In . SVG Version: 6.00 Build 0) -->
<svg version="1.1" id="Layer_1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" x="0px" y="0px"
viewBox="0 0 512 512" style="enable-background:new 0 0 512 512;" xml:space="preserve">
<style type="text/css">
.st0{fill:#DFDFDF;}
.st1{fill:#4A555F;}
.st2{fill:#F58E6F;}
.st3{fill:#FFD452;}
.st4{fill:#71CCE0;}
</style>
<g>
<rect x="142.7" y="93.1" class="st0" width="310.1" height="404.6"/>
<g>
<g>
<g>
<path class="st1" d="M44.9,0v433.2h48.4V46h290.4V0H44.9z M377,39.4H86.6v387.2H51.5V6.6H377L377,39.4L377,39.4z"/>
</g>
</g>
</g>
<g>
<g>
<polygon class="st0" points="59.2,14.3 59.2,418.9 78.9,418.9 78.9,31.7 369.3,31.7 369.3,14.3 "/>
</g>
</g>
<g>
<g>
<g>
<path class="st1" d="M86.6,39.4v433.2H135V85.4h290.4v-46H86.6z M418.8,78.8H128.4V466H93.2V46h325.5V78.8z"/>
</g>
</g>
</g>
<g>
<g>
<polygon class="st0" points="100.9,53.7 100.9,458.3 120.7,458.3 120.7,71.1 411.1,71.1 411.1,53.7 "/>
</g>
</g>
<g>
<g>
<g>
<path class="st1" d="M128.4,78.8V512h338.7V78.8H128.4z M460.5,505.4H135v-420h325.5L460.5,505.4L460.5,505.4z"/>
</g>
</g>
</g>
<g>
<g>
<g>
<path class="st1" d="M190.1,315.5v148.7h41.7V315.5H190.1z M225.2,457.6h-28.5V322.1h28.5V457.6z"/>
</g>
</g>
</g>
<g>
<g>
<rect x="204.3" y="329.8" class="st2" width="13.2" height="120.1"/>
</g>
</g>
<g>
<g>
<g>
<path class="st1" d="M248,375.3v88.9h41.7v-88.9H248z M283.1,457.6h-28.5v-75.8h28.5V457.6z"/>
</g>
</g>
</g>
<g>
<g>
<rect x="262.2" y="389.6" class="st3" width="13.2" height="60.4"/>
</g>
</g>
<g>
<g>
<g>
<path class="st1" d="M305.8,345.4v118.8h41.7V345.4H305.8z M341,457.6h-28.5V352H341V457.6z"/>
</g>
</g>
</g>
<g>
<g>
<rect x="320.1" y="359.7" class="st3" width="13.2" height="90.2"/>
</g>
</g>
<g>
<g>
<g>
<path class="st1" d="M363.7,331.6v132.7h41.7V331.6H363.7z M398.9,457.6h-28.5V338.1h28.5V457.6z"/>
</g>
</g>
</g>
<g>
<g>
<rect x="378" y="345.8" class="st4" width="13.2" height="104.1"/>
</g>
</g>
<g>
<g>
<g>
<path class="st1" d="M225.1,246.3l4.5,4.9l4.9-4.5l-4.5-4.9L225.1,246.3z M215.4,255.2l4.5,4.9l4.9-4.5l-4.5-4.9L215.4,255.2z
M259.1,215.1l-4.9,4.5l4.5,4.9l4.9-4.5L259.1,215.1z M244.5,228.5l4.5,4.9l4.9-4.5l-4.5-4.9L244.5,228.5z M234.8,237.4l4.5,4.9
l4.9-4.5l-4.5-4.9L234.8,237.4z"/>
</g>
</g>
</g>
<g>
<g>
<g>
<path class="st1" d="M315.2,229.9l4.5,4.8l4.8-4.5l-4.5-4.8L315.2,229.9z M305.5,238.9l4.5,4.8l4.8-4.5l-4.5-4.8L305.5,238.9z
M334.5,212.1l4.5,4.8l4.8-4.5l-4.5-4.8L334.5,212.1z M324.8,221l4.5,4.8l4.8-4.5l-4.5-4.8L324.8,221z M349.1,198.6l-4.8,4.5
l4.5,4.8l4.8-4.5L349.1,198.6z"/>
</g>
</g>
</g>
<g>
<g>
<g>
<path class="st1" d="M293,215.3l-4.8,4.5l4.5,4.8l4.8-4.5L293,215.3z M301.9,225l-4.8,4.5l4.5,4.8l4.8-4.5L301.9,225z"/>
</g>
</g>
</g>
<g>
<g>
<g>
<path class="st1" d="M276.7,184.8c-9.1,0-16.4,7.4-16.4,16.4s7.4,16.4,16.4,16.4s16.4-7.4,16.4-16.4S285.7,184.8,276.7,184.8z
M276.7,211.1c-5.4,0-9.8-4.4-9.8-9.8s4.4-9.8,9.8-9.8c5.4,0,9.8,4.4,9.8,9.8S282.1,211.1,276.7,211.1z"/>
</g>
</g>
</g>
<g>
<g>
<g>
<path class="st1" d="M368.1,169.6c-9.1,0-16.4,7.4-16.4,16.4s7.4,16.4,16.4,16.4s16.4-7.4,16.4-16.4S377.2,169.6,368.1,169.6z
M368.1,195.9c-5.4,0-9.8-4.4-9.8-9.8s4.4-9.8,9.8-9.8c5.4,0,9.8,4.4,9.8,9.8S373.6,195.9,368.1,195.9z"/>
</g>
</g>
</g>
<g>
<g>
<polygon class="st1" points="217.5,287.6 217.5,144.1 210.9,144.1 210.9,294.2 380.3,294.2 380.3,287.6 "/>
</g>
</g>
<g>
<g>
<polygon class="st0" points="142.7,93.1 142.7,497.7 162.5,497.7 162.5,110.6 452.8,110.6 452.8,93.1 "/>
</g>
</g>
</g>
</svg>

After

Width:  |  Height:  |  Size: 3.9 KiB

BIN
preview.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 52 KiB

BIN
report.pdf Normal file

Binary file not shown.

85
report.tex Normal file
View file

@ -0,0 +1,85 @@
\documentclass[11pt]{awe-homework}
% Configuration
\doctitle{My Epic Homework Assignment/Report}
\name{Your Name}
\course{CS 101 Latex Fundamentals, Spring 2022}
\begin{document}
\makeheader
% Question 1
\question{1}{
Enter your question 1 description here.
}
% Answer 1
Enter your answer 1 here.
You can make a code block/environment like this:
\begin{minted}{python}
class MyClass:
def __init__(self):
self.x = 0
def main():
my_object = MyClass()
print(my_object.x)
\end{minted}
You can add inline code using \textbackslash mintinline like this: \mintinline{js}{console.log("Hello world!")}.
Try out some links too, like \href{https://google.com}{going to Google}.
Inline math works too: $\frac{1}{2} = 0.5$.
You can display inline math more clearly with \textbackslash{displaystyle}, like shown: $\displaystyle\frac{1}{2} = 0.5$.
Maybe try a math block/environment:
$$
\begin{aligned}
\int_0^1 x^2 dx = \frac{1}{3}
\end{aligned}
$$
You can also write it using \textbackslash [ (your equation here)\textbackslash ] like this:
\[ \int_0^1 x^2 dx = \frac{1}{3} \]
Feel free to change your \textcolor{red}{text color}.
Or maybe try some \textbf{bold} or \textit{italic} text.
How about an \underline{underline}?
% Question 2
\question{2}{
Enter your question 2 description here.\footnote{This is a footnote.}
}
% Answer 2
Enter your answer 2 here.
\begin{itemize}
\item Here's a list.
\item You can add more to the list with \textbackslash item.
\begin{enumerate}
\item Feel free to start a nested list too.
\item You can use enumerate for an ordered list.
\begin{enumerate}[label=(\alph*)]
\item And check out this alphabetical list!
\item I wonder what happens after Z...
\end{enumerate}
\end{enumerate}
\end{itemize}
\section*{Acknowledgements \& Links}
\begin{itemize}
\item \href{https://github.com/WorcesterSociety/HomeworkTemplate}{WorcesterSociety on GitHub for their \textbf{awe-homework} LaTeX template} as the base template with a CC0-1.0 License.
\item \href{https://www.overleaf.com/read/nghcfhgrsztp}{View the Overleaf version of this template and create your own copy to work with!}
\item \href{https://github.com/rzmk/report-template}{This GitHub repository} is where a local version of the template is hosted. Learn more details by going here.
\item \href{https://www.overleaf.com/learn/latex/Code_Highlighting_with_minted}{This Overleaf article} lists all the supported programming languages for the minted package with syntax highlighting at the bottom of the page.
\item \href{https://www.overleaf.com/learn/latex/Inserting_Images}{Insert images in your report} by reading this article on Overleaf.
\end{itemize}
\end{document}

1
requirements.txt Normal file
View file

@ -0,0 +1 @@
Pygments==2.11.2