From: Ira W. Snyder Date: Sun, 13 Jan 2008 01:43:37 +0000 (-0800) Subject: Add PDF target to Makefile X-Git-Tag: turned-in X-Git-Url: https://www.irasnyder.com/gitweb/?p=aes.git;a=commitdiff_plain;h=32b64c22ce1b63a4e80ef12097b7ff0c413f3b73 Add PDF target to Makefile Add the ability to generate the homework output pdf to the Makefile, along with all other needed files. Signed-off-by: Ira W. Snyder --- diff --git a/Makefile b/Makefile index 7e77240..61aff61 100644 --- a/Makefile +++ b/Makefile @@ -14,6 +14,8 @@ problem3: aes.o problem3.o clean: rm -f *.o aes_test problem2 problem3 + latexmk -C + rm -f homework.out p2_output.txt p3_output.txt .cpp.o: $(CC) $(CFLAGS) -c -o $@ $< @@ -26,4 +28,10 @@ run_p2: problem2 run_p3: problem3 @./$< -.PHONY: run all clean +pdf: homework.tex problem2 problem3 + ./problem2 < Problem2.in > p2_output.txt + ./problem3 > p3_output.txt + @rm -f homework.pdf + latexmk -pdf homework.tex + +.PHONY: run all clean pdf diff --git a/homework.tex b/homework.tex new file mode 100644 index 0000000..71680be --- /dev/null +++ b/homework.tex @@ -0,0 +1,108 @@ +\documentclass[letterpaper,12pt,oneside,pdftex]{article} + +%% My Commands +\newcommand{\myname}{Ira W. Snyder} +\newcommand{\myemail}{iwsnyder@csupomona.edu} +\newcommand{\mytitle}{CS460 - Homework \#03} + +\newcommand{\emaillink}[1]{\href{mailto:#1}{$<$#1$>$}} +\newcommand{\sourcecode}[1]{ + \begin{scriptsize} + % Automatically line-numbered input + \listinginput{1}{#1} + \end{scriptsize} +} +\newcommand{\plaintext}[1]{ + \begin{scriptsize} + % Verbatim input, preserving tabs to 8 spaces. To use + % 4-space tabs, switch the 8 to a 4. + \verbatimtabinput[4]{#1} + \end{scriptsize} +} +\newcommand{\fullbox}[1]{\fbox{\begin{minipage}{\textwidth}#1\end{minipage}}} +\newcommand{\mysourcecode}[1]{\section*{Source Code: \texttt{#1}}\hrulefill\plaintext{#1}\clearpage} + +%% Packages to include + +%% Font to use +%\usepackage{pslatex} +%\usepackage{cmbright} +%\usepackage{concrete} +%\usepackage{palatino} +%\usepackage{ae} +%\usepackage{pxfonts} +%\usepackage{txfonts} + +% Fix spacing with 12pt docs +\usepackage{exscale} + +% Extra spacing options +%\usepackage{setspace} +%\singlespacing +%\onehalfspacing +%\doublespacing + +% Remove space at the beginning of paragraphs +\usepackage{parskip} + +% Set Margins +\usepackage[left=3cm,top=2cm,right=3cm,nohead,nofoot]{geometry} + +% Support for nicer tables +%\usepackage{booktabs} + +% Support for source code listings +\usepackage{moreverb} + +% Support for removing all page numbers +\usepackage{nopageno} + +% Support for URLs (unneeded with hyperref) +%\usepackage{url} +\usepackage{lscape} + +% Support PDF HyperText References +\usepackage[pdftex,bookmarks,breaklinks=true,% + pdftitle={\mytitle},pdfauthor={\myname},% + colorlinks]{hyperref} + + +%% Generate Title Page +\title{\mytitle} +\author{\myname\\\emaillink{\myemail}} +\date{\today} + +\begin{document} + +% Switch font families +\sffamily + +% Title Page +\maketitle +\clearpage + +\mysourcecode{aes.hpp} + +\mysourcecode{aes.cpp} + +\mysourcecode{problem2.cpp} + +\mysourcecode{problem3.cpp} + +\mysourcecode{Makefile} + +\section*{Problem 2 Output} +\hrulefill +\plaintext{p2_output.txt} +\clearpage + +\begin{landscape} +\section*{Problem 3 Output} +\hrulefill +\plaintext{p3_output.txt} +\clearpage +\end{landscape} + +\end{document} + +% vim: set ts=4 sts=4 sw=4 expandtab nocindent noautoindent textwidth=80: