Advertisement
Guest User

Untitled

a guest
Nov 15th, 2019
103
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Latex 3.25 KB | None | 0 0
  1. \documentclass[a4paper]{article}
  2. \usepackage[pdftex]{hyperref}
  3. \usepackage[latin1]{inputenc}
  4. \usepackage[english]{babel}
  5. \usepackage{a4wide}
  6. \usepackage{amsmath}
  7. \usepackage{amssymb}
  8. \usepackage{algorithmic}
  9. \usepackage{algorithm}
  10. \usepackage{graphicx}
  11. \usepackage{ifthen}
  12. \usepackage{listings}
  13. % move the asterisk at the right position
  14. \lstset{basicstyle=\ttfamily,tabsize=4,literate={*}{${}^*{}$}1}
  15. %\lstset{language=C,basicstyle=\ttfamily}
  16. \usepackage{moreverb}
  17. \usepackage{palatino}
  18. \usepackage{multicol}
  19. \usepackage{tabularx}
  20. \usepackage{comment}
  21. \usepackage{verbatim}
  22. \usepackage{color}
  23. \usepackage{enumitem}
  24. \usepackage{listings}
  25.  
  26. %% pdflatex?
  27. \newif\ifpdf
  28. \ifx\pdfoutput\undefined
  29. \pdffalse % we are not running PDFLaTeX
  30. \else
  31. \pdfoutput=1 % we are running PDFLaTeX
  32. \pdftrue
  33. \fi
  34. \ifpdf
  35. \usepackage[pdftex]{graphicx}
  36. \else
  37. \usepackage{graphicx}
  38. \fi
  39. \ifpdf
  40. \DeclareGraphicsExtensions{.pdf, .jpg}
  41. \else
  42. \DeclareGraphicsExtensions{.eps, .jpg}
  43. \fi
  44.  
  45. \parindent=0cm
  46. \parskip=0cm
  47.  
  48. \setlength{\columnseprule}{0.4pt}
  49. \addtolength{\columnsep}{2pt}
  50.  
  51. \addtolength{\textheight}{5.5cm}
  52. \addtolength{\topmargin}{-26mm}
  53. \pagestyle{empty}
  54.  
  55. %%
  56. %% Sheet setup
  57. %%
  58. \newcommand{\coursename}{Computer Architecture and Programming Languages}
  59. \newcommand{\courseno}{CO20-320241}
  60.  
  61. \newcommand{\sheettitle}{Assignment}
  62. \newcommand{\mytitle}{}
  63. \newcommand{\mytoday}{\textcolor{}{November 15}, 2019}
  64.  
  65. % Current Assignment number
  66. \newcounter{assignmentno}
  67. \setcounter{assignmentno}{9}
  68.  
  69. % Current Problem number, should always start at 1
  70. \newcounter{problemno}
  71. \setcounter{problemno}{1}
  72.  
  73. %%
  74. %% problem and bonus environment
  75. %%
  76. \newcounter{probcalc}
  77. \newcommand{\problem}[2]{
  78.  \pagebreak[2]
  79.  \setcounter{probcalc}{#2}
  80.  ~\\
  81.  {\large \textbf{Problem \textcolor{}{\arabic{assignmentno}}.\textcolor{}{\arabic{problemno}}} \hspace{0.2cm}\textit{#1}} \refstepcounter{problemno}\vspace{2pt}\\}
  82.  
  83. \newcommand{\bonus}[2]{
  84.  \pagebreak[2]
  85.  \setcounter{probcalc}{#2}
  86.  ~\\
  87.  {\large \textbf{Bonus Problem \textcolor{blue}{\arabic{assignmentno}}.\textcolor{blue}{\arabic{problemno}}} \hspace{0.2cm}\textit{#1}} \refstepcounter{problemno}\vspace{2pt}\\}
  88.  
  89. %% some counters
  90. \newcommand{\assignment}{\arabic{assignmentno}}
  91.  
  92. %% solution
  93. \newcommand{\solution}{\pagebreak[2]{\bf Solution:}\\}
  94.  
  95. %% Hyperref Setup
  96. \hypersetup{pdftitle={Homework \assignment},
  97.  pdfsubject={\coursename},
  98.  pdfauthor={},
  99.  pdfcreator={},
  100.  pdfkeywords={Computer Architecture and Programming Languages},
  101.   %  pdfpagemode={FullScreen},
  102.   %colorlinks=true,
  103.   %bookmarks=true,
  104.   %hyperindex=true,
  105.   bookmarksopen=false,
  106.   bookmarksnumbered=true,
  107.   breaklinks=true,
  108.   %urlcolor=darkblue
  109.   urlbordercolor={0 0 0.7}
  110. }
  111.  
  112. \begin{document}
  113. \coursename \hfill Course: \courseno\\
  114. Jacobs University Bremen \hfill \mytoday\\
  115. \textcolor{}{Taiyr Begeyev}\hfill
  116. \vspace*{0.3cm}\\
  117. \begin{center}
  118. {\Large \sheettitle{} \textcolor{}{\assignment}\\}
  119. \end{center}
  120.  
  121. \setlist{leftmargin=6mm}
  122. \problem{}{0}
  123. \solution
  124. \begin{enumerate}[label=\alph*)]
  125. \item Program Counter is updated every cycle, so it doesn't need any explicit write control signal. It is updated every cycle, because we need to get the address of the next instruction.
  126. \item hey
  127. \end{enumerate}
  128.  
  129. \end{document}
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement