SHARE
TWEET

Untitled

a guest Sep 18th, 2019 75 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. \documentclass{article}
  2.  
  3. \usepackage{fancyhdr}
  4. \usepackage{extramarks}
  5. \usepackage{amsmath}
  6. \usepackage{amsthm}
  7. \usepackage{amsfonts}
  8. \usepackage{tikz}
  9. \usepackage[plain]{algorithm}
  10. \usepackage{algpseudocode}
  11.  
  12. \usetikzlibrary{automata,positioning}
  13.  
  14. %
  15. % Basic Document Settings
  16. %
  17.  
  18. \topmargin=-0.45in
  19. \evensidemargin=0in
  20. \oddsidemargin=0in
  21. \textwidth=6.5in
  22. \textheight=9.0in
  23. \headsep=0.25in
  24.  
  25. \linespread{1.1}
  26.  
  27. \pagestyle{fancy}
  28. \lhead{\hmwkAuthorName}
  29. \chead{\hmwkTitle}
  30. \rhead{\firstxmark}
  31. \lfoot{\lastxmark}
  32. \cfoot{\thepage}
  33.  
  34. \renewcommand\headrulewidth{0.4pt}
  35. \renewcommand\footrulewidth{0.4pt}
  36.  
  37. \setlength\parindent{0pt}
  38.  
  39. %
  40. % Create Problem Sections
  41. %
  42.  
  43. \newcommand{\enterProblemHeader}[1]{
  44.     \nobreak\extramarks{}{Problem \arabic{#1} continued on next page\ldots}\nobreak{}
  45.     \nobreak\extramarks{Problem \arabic{#1} (continued)}{Problem \arabic{#1} continued on next page\ldots}\nobreak{}
  46. }
  47.  
  48. \newcommand{\exitProblemHeader}[1]{
  49.     \nobreak\extramarks{Problem \arabic{#1} (continued)}{Problem \arabic{#1} continued on next page\ldots}\nobreak{}
  50.     \stepcounter{#1}
  51.     \nobreak\extramarks{Problem \arabic{#1}}{}\nobreak{}
  52. }
  53.  
  54. \setcounter{secnumdepth}{0}
  55. \newcounter{partCounter}
  56. \newcounter{homeworkProblemCounter}
  57. \setcounter{homeworkProblemCounter}{1}
  58. \nobreak\extramarks{Problem \arabic{homeworkProblemCounter}}{}\nobreak{}
  59.  
  60. %
  61. % Homework Problem Environment
  62. %
  63. % This environment takes an optional argument. When given, it will adjust the
  64. % problem counter. This is useful for when the problems given for your
  65. % assignment aren't sequential.
  66. %
  67. \newenvironment{homeworkProblem}[1][-1]{
  68.     \ifnum#1>0
  69.         \setcounter{homeworkProblemCounter}{#1}
  70.     \fi
  71.     \section{Problem \arabic{homeworkProblemCounter}}
  72.     \setcounter{partCounter}{1}
  73.     \enterProblemHeader{homeworkProblemCounter}
  74. }{
  75.     \exitProblemHeader{homeworkProblemCounter}
  76. }
  77.  
  78. %
  79. % Homework Details
  80. %   - Title
  81. %   - Due date
  82. %   - Class
  83. %   - Section/Time
  84. %   - Instructor
  85. %   - Author
  86. %
  87.  
  88. \newcommand{\hmwkTitle}{Homework\ }
  89. \newcommand{\hmwkDueDate}{September 20, 2019}
  90. \newcommand{\hmwkClass}{}
  91. \newcommand{\hmwkAuthorName}{\textbf{Titton Andrea}}
  92.  
  93. %
  94. % Title Page
  95. %
  96.  
  97. \title{
  98.     \vspace{2in}
  99.     \textmd{\textbf{\hmwkClass:\ \hmwkTitle}}\\
  100.     \normalsize\vspace{0.1in}\small{Due\ on\ \hmwkDueDate}\\
  101.     \vspace{3in}
  102. }
  103.  
  104. \author{\hmwkAuthorName}
  105. \date{}
  106.  
  107. \renewcommand{\part}[1]{\textbf{\large Part \Alph{partCounter}}\stepcounter{partCounter}\\}
  108.  
  109. %
  110. % Various Helper Commands
  111. %
  112.  
  113. % Useful for algorithms
  114. \newcommand{\alg}[1]{\textsc{\bfseries \footnotesize #1}}
  115.  
  116. % For derivatives
  117. \newcommand{\deriv}[1]{\frac{\mathrm{d}}{\mathrm{d}x} (#1)}
  118.  
  119. % For partial derivatives
  120. \newcommand{\pderiv}[2]{\frac{\partial}{\partial #1} (#2)}
  121.  
  122. % Integral dx
  123. \newcommand{\dx}{\mathrm{d}x}
  124.  
  125. % Alias for the Solution section header
  126. \newcommand{\solution}{\textbf{\large Solution}}
  127.  
  128. % Probability commands: Expectation, Variance, Covariance, Bias
  129. \newcommand{\E}{\mathrm{E}}
  130. \newcommand{\Var}{\mathrm{Var}}
  131. \newcommand{\Cov}{\mathrm{Cov}}
  132. \newcommand{\Bias}{\mathrm{Bias}}
  133.  
  134. \begin{document}
  135.  
  136. \maketitle
  137.  
  138. \pagebreak
  139.  
  140. \begin{homeworkProblem}
  141. Problem 1.    
  142.  
  143. \end{homeworkProblem}
  144.  
  145. \end{document}
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
Not a member of Pastebin yet?
Sign Up, it unlocks many cool features!
 
Top