Advertisement
Guest User

Untitled

a guest
Oct 8th, 2015
90
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 2.73 KB | None | 0 0
  1. %=====================================================================
  2. % jhwhw.cls
  3. % Provide jhwhw.cls class
  4. %=====================================================================
  5.  
  6. %=====================================================================
  7. % Identification
  8. %=====================================================================
  9. \NeedsTeXFormat{LaTeX2e}
  10. \ProvidesClass{homework}[2015/02/11 Homework Class]
  11.  
  12. \LoadClass[letterpaper, 12pt]{report}
  13.  
  14. \RequirePackage{fancyhdr}
  15. \RequirePackage[top=1in,bottom=1in,left=1in,right=1in]{geometry}
  16. \RequirePackage{graphicx}
  17. \RequirePackage{empheq}
  18. \RequirePackage{ifthen}
  19.  
  20.  
  21. %=====================================================================
  22. % Commands
  23. %=====================================================================
  24.  
  25. \setlength{\headheight}{15pt}
  26. \lhead{\@author}\chead{\@title}\rhead{\today}
  27. \lfoot{}\cfoot{\thepage}\rfoot{}
  28. \pagestyle{fancy}
  29.  
  30. \ifx\pdfoutput\undefined %LaTeX
  31. \RequirePackage[ps2pdf,bookmarks=true]{hyperref}
  32. \hypersetup{ %
  33. pdfauthor = {\@author},
  34. pdftitle = {\@title},
  35. pdfcreator = {LaTeX with hyperref package},
  36. pdfproducer = {dvips + ps2pdf}
  37. }
  38. \else %PDFLaTeX
  39. \RequirePackage[pdftex,bookmarks=true]{hyperref}
  40. \hypersetup{ %
  41. pdfauthor = {\@author},
  42. pdftitle = {\@title},
  43. pdfcreator = {LaTeX with hyperref package},
  44. pdfproducer = {dvips + ps2pdf}
  45. }
  46. \pdfadjustspacing=1
  47. \fi
  48.  
  49. % Set up counters for problems and subsections
  50.  
  51. \newcounter{ProblemNum}
  52. \newcounter{SubProblemNum}[ProblemNum]
  53.  
  54. \renewcommand{\theProblemNum}{\arabic{ProblemNum}}
  55. \renewcommand{\theSubProblemNum}{\alph{SubProblemNum}}
  56.  
  57.  
  58. \newcommand*{\anyproblem}[1]{\newpage\subsection*{#1}}
  59. \newcommand*{\problem}[1]{\stepcounter{ProblemNum} %
  60. \anyproblem{Problem \theProblemNum. \; #1}}
  61. \newcommand*{\soln}[1]{\subsubsection*{#1}}
  62. \newcommand*{\solution}{\soln{Solution}}
  63. \renewcommand*{\part}{\stepcounter{SubProblemNum} %
  64. \soln{Part (\theSubProblemNum)}}
  65.  
  66. \renewcommand{\theenumi}{(\alph{enumi})}
  67. \renewcommand{\labelenumi}{\theenumi}
  68. \renewcommand{\theenumii}{\roman{enumii}}
  69.  
  70. % \def\problemmark{}
  71.  
  72. % % Typesetting problems
  73.  
  74. % % \newcommand*{\prob}[1]{\newpage \noindent \textbf{\Large #1}}
  75. % % \newcommand*{\problem}[1]{\stepcounter{ProblemNum} \prob{Problem %
  76. % % \theProblemNum.}}
  77. % % \newcommand*{\soln}[1]{\\ \noindent \textbf{\Large #1}}
  78. % % \newcommand*{\solution}{\soln{Solution}}
  79. % % \renewcommand*{\part}{\\ \noindent \stepcounter{SubProblemNum} %
  80. % % \textbf{\Large Part (\theSubProblemNum)}}
  81.  
  82. % \newcommand\problem{\@startsection{problem}{1}{\z@}%
  83. % {-3.25ex \@plus -1ex \@minus -.2ex}%
  84. % {1.5ex \@plus .2ex}%
  85. % {\normalfont\large\bfseries}}
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement