% % Copyright (c) 2007, 2008, 2009 by Theodore P. Pavlic % % This quiz template source code is licensed under the Creative Commons % Attribution-Noncommercial 3.0 United States License. To view a copy of % this license, visit http://creativecommons.org/licenses/by-nc/3.0/us/ % or send a letter to Creative Commons, 171 Second Street, Suite 300, % San Francisco, California, 94105, USA. % % Note that the products of this source code (e.g, a quiz) may or may % not be CC licensed. In particular, the attribution clause of the % Creative Commons license does not apply to quizzes or solution sets % generated from derived work. A course instructor need not give % Theodore P. Pavlic credit on printed quizzes or solution sets % distributed to students. % % Upper-case A B C D E F G H I J K L M N O P Q R S T U V W X Y Z % Lower-case a b c d e f g h i j k l m n o p q r s t u v w x y z % Digits 0 1 2 3 4 5 6 7 8 9 % Exclamation ! Double quote " Hash (number) # % Dollar $ Percent % Ampersand & % Acute accent ' Left paren ( Right paren ) % Asterisk * Plus + Comma , % Minus - Point . Solidus / % Colon : Semicolon ; Less than < % Equals = Greater than > Question mark ? % At @ Left bracket [ Backslash \ % Right bracket ] Circumflex ^ Underscore _ % Grave accent ` Left brace { Vertical bar | % Right brace } Tilde ~ % % ECE 209: Weekly Quiz % %%faketop{Preamble} %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% \documentclass[10pt]{article} \usepackage[margin=1in]{geometry} %%%%%%%%%%%%%%%%%%%%%%%%%%%%%% Quiz Setup %%%%%%%%%%%%%%%%%%%%%%%%%%%%%% \newcommand{\classname}{ECE~209} \newcommand{\weeknum}{0} \newcommand{\labtitle}{Laboratory Title} \newcommand{\classdesc}{Circuits and Electronics Laboratory} %\newcommand{\quizname}{Week 1 (4:30): Quiz (100 points)} \newcommand{\quizname}{Lab \weeknum: \labtitle{} Quiz (100 points)} %\date{October 14, 2008} \date{} % * Define \solutionset for answer key view (i.e., uncomment line below) % * Undefine \solutionset for problem set view (i.e., comment line) %\newcommand{\solutionset}{} %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% %%fakesection{Header and Footer Setup} %%....................................................................%% \usepackage{lastpage} \newcommand{\pageoflastpage}{Page {\thepage} of \pageref*{LastPage}} % Redefine the plain pagestyle for the title page \makeatletter \let\oldps@plain\ps@plain \renewcommand{\ps@plain}{\oldps@plain% \renewcommand{\@evenfoot}{% \makebox[0pt][l]{\parbox{3in}{\tiny Copyright \copyright{} 2007--2009 by Theodore P.~Pavlic\\ All rights reserved.}}\hss\pageoflastpage\hss}% \renewcommand{\@oddfoot}{\@evenfoot}} \makeatother % Use fancy for non-title pages \usepackage{fancyhdr,extramarks} \fancyhead{}\fancyfoot{} % \lhead{\classname{} [\quizname]} \chead{} \rhead{\firstleftxmark} % \lfoot{\makebox[0pt][l]{\parbox{3in}{\tiny Copyright \copyright{} 2007--2009 by Theodore P.~Pavlic\\ All rights reserved.}}} \cfoot{\pageoflastpage} \rfoot{\large Name: \nameline{}} % \pagestyle{fancy} %%....................................................................%% %%fakesection{Sections and Conditional Inclusion Setup} %%....................................................................%% \usepackage{ifthen} \usepackage{comment} % New problems are sections. \let\oldsection\section \makeatletter \renewcommand{\section}[1]{% \extramarks{}{} % Check to see if subtitle provided \ifthenelse{\equal{#1}{}} { % When subtitle is empty, display no problem subtitle \renewcommand{\@seccntformat}[1]{Problem \csname the##1\endcsname} \oldsection[\thesection. Problem \thesection]{#1} } { % Display problem subtitle if given \renewcommand{\@seccntformat}[1]{Problem \csname the##1\endcsname: } \oldsection[\thesection. #1]{#1} } \extramarks{Problem \thesection{} (continued)}{} } \makeatother % Automatic references should use ``Problem'' \newcommand{\sectionautorefname}{Problem} % Removes numbers from subsections and below \setcounter{secnumdepth}{1} %%fakeparagraph{Solution hiding implementation} \ifthenelse{\isundefined{\solutionset}}{ \excludecomment{solution} % Exclude solution \excludecomment{solutionquiet} % Exclude solution \includecomment{problemspace} % Include blank problem space }{ \includecomment{solution} % Include solution \includecomment{solutionquiet} % Include solution \excludecomment{problemspace} % Exclude blank problem space % Start each solution environment as a subsection %\specialcomment{solution}{\subsection{Solution}}{} % Make a special hruled area for solutions %\specialcomment{solution} % {\hrulefill{\tiny ~\textsc{Solution}~}\hrulefill\\} % {\par\vspace{-0.5\baselineskip}\hrulefill\\} % Make a special hruled area for solutions \specialcomment{solution} {\par\vspace{-0.5\baselineskip}\noindent\hrulefill\\% \par\vspace{-1.75\baselineskip}\noindent\hrulefill% \psframebox[fillstyle=solid,fillcolor=black!20,framesep=2pt]% {\centering\tiny~\textsc{Solution}~}% \hrulefill\\} {\par\vspace{-0.5\baselineskip}\noindent\hrulefill\\% \par\vspace{-1.75\baselineskip}\noindent\hrulefill\\} % Get rid of lines for name/table number \newcommand{\nameline}[1][]{Instructor} \newcommand{\tablenumline}[1][]{Solution} } %%....................................................................%% %%fakesection{Other useful packages} %%....................................................................%% % Math support \usepackage{amsmath,amssymb,amsfonts,amsthm} % Drawing support \usepackage{pstricks, pstricks-add, pst-node, pst-circ, pst-plot} % Use subfig for subfigures \usepackage[nearskip=-3pt,captionskip=4pt, listofformat=subsimple,labelformat=simple]{subfig} \captionsetup[subfloat]{listofindent=4em} % Make sure subfigures have parentheses around them everywhere \renewcommand\thesubfigure{(\alph{subfigure})} \newcommand\subfigureautorefname{\figureautorefname} % Prefix the figures/sections/equations with something to make it % obvious they're from the quiz \renewcommand\thetable{Q\weeknum-\arabic{table}} \renewcommand\thefigure{Q\weeknum-\arabic{figure}} \renewcommand\thesection{Q\weeknum-\arabic{section}} \renewcommand\theequation{Q\weeknum-\arabic{equation}} % Reset figure (and tables) and equations every section \numberwithin{figure}{section} \numberwithin{table}{section} \numberwithin{equation}{section} % Graphics, picture, and color support \usepackage{graphicx} \usepackage{caption} \usepackage{xcolor} % Gives more powerful enumeration environments \usepackage{enumitem} \usepackage[% bookmarks=true,bookmarksopen=true, breaklinks=true, colorlinks=true, urlcolor=blue,linkcolor=blue,filecolor=blue, menucolor=blue, pdfpagelabels=true,hypertexnames=true, plainpages=false,naturalnames=false, ]{hyperref} %%....................................................................%% %%fakesection{Useful Macros} %%....................................................................%% % Line for writing name \providecommand{\nameline}[1][2in]{\underline{\hspace{#1}}} % Line for writing table number \providecommand{\tablenumline}[1][0.5in]{\underline{\hspace{#1}}} % Provided unnumbered environment for giving quiz instructions \newtheorem*{quizdesc}{Description} % For additional notes about a solution \newtheorem*{ext}{Extension} % id est \newcommand{\ie}{i.e.} %%....................................................................%% \begin{document} %%fakesection{Title Page Setup} %%....................................................................%% % These macros are defined at the very top of the preamble \title{\vspace{-60pt} % {\large Name: \nameline{} \hfill Table number: \tablenumline{}}\\ ~\\ % \classname: \emph{\classdesc} % } \author{\textbf{\quizname}} \hypersetup{% pdfsubject={\classname: \classdesc}, pdfauthor={Ted Pavlic}, pdftitle={\quizname}, pdfkeywords={quiz, analog, electronics, circuits, class}, } %%....................................................................%% %%faketop{Quiz Content} %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% %%fakesection{Quiz Title Page} %%....................................................................%% \maketitle \hrule % Description of the quiz \begin{quizdesc} Complete this quiz with \textbf{closed book} and \textbf{closed notes}. \end{quizdesc} \hrule %%....................................................................%% \section{} \label{sec:} %%....................................................................%% %%....................................................................%% %%fakepart{Section template} % \section{} % \label{sec:} % %%....................................................................%% % %%....................................................................%% \end{document}