QB/e test1
< QB
If you have LaTex using MikTex, you can copy this code directly into an empty LaTex file and edit it. When you copy, do not go into Wikiversity edit mode. Instead, copy directly from this page, beginning with %%% #1 EDIT QUIZ INFO HERE %%%...
, all the way down to \end{document}
.
If you run MikTex, you should obtain this: File:Quizbankqb e test1.pdf.
LaTexMarkup begin
edit{{REVISIONID}}<!--Add/remove % as needed-->[[File:Quizbankqb_{{SUBPAGENAME}}.pdf|thumb|See '''[[:File:Quizbankqb_{{SUBPAGENAME}}.pdf]]''']]
%%% #1 EDIT QUIZ INFO HERE %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%
\newcommand{\permalink}{1927672}
\newcommand{\quizname}{QB/e test1}
\newcommand{\quiztype}{conceptual}%[[Category:QB/Conceptual]]
%Begin coverpage text
\newcommand{\beforetoc}{
Latex markup at \url{https://en.wikiversity.org/wiki/special:permalink/\permalink}.
}%end coverpage text
%%%% NO NEED TO EDIT THIS PART%
\newif\ifkey
\documentclass[11pt]{exam}
\RequirePackage{amssymb, amsfonts, amsmath, latexsym, verbatim, xspace, setspace}
\RequirePackage{tikz, pgflibraryplotmarks,hyperref}
\usepackage[left=.5in, right=.5in, bottom=.5in, top=.75in]{geometry}
\usepackage{endnotes}
\usepackage{graphicx} % attempt to include image from internet\def\ifkey\endnote{{I want this to go away }% I will later try and make the quiz and key different in this respect
\newcommand{\mytest}[1]
{\begin{questions}
#1
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%%% #2 EDIT QUIZ HERE %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\question One of these things is not like the others; one of these
things is not the same. Which one is different?
\ifkey\endnote{ % This command begins the endnote, which is required for attribution, which appears as an endnote
% the \ifkey statement suppresses the attribution for the students' version of the test.
Copyright (c) 2017 Philip S. Hirschhorn. This work may be distributed and/or modified under the conditions of the LaTeX Project Public License
}\fi % This command ends the endnote. \fi is and "end-if" LaTex statement.
\begin{oneparchoices} %This begins the answers
\choice John
\choice Paul
\choice George
\choice Ringo
\CorrectChoice Socrates %denotes the correct answer
\end{oneparchoices} %ends the first question
\question What is 2? %this is a long question because I added a lengthy "attribution" statement:
\ifkey\endnote{ %Just for fun, I made a long and complicated attribution statement:
CC0 Guy vandegrift. LaTex allows us to embellish the attribution with comments. % long "attribution"
Here Humpty Dumpty uses the \(\equiv\) symbol to establish that the letter \(v\) denotes % long "attribution"
the magnitude of a vector, even if the absolute value sign is omitted: % long "attribution"
\begin{center} % centered an equation and an image from commons % long "attribution"
\[ v^2 \equiv |\vec v\,|^2=v_x^2 + v_y^2 \] % long "attribution"
\includegraphics[width=0.2\textwidth]{Humpty_Dumpty_Tenniel-When_I_use_a_word.png}% long "attribution"
\end{center} }\fi % and finally the answers:
\begin{oneparchoices} \choice One\CorrectChoice Two\choice Five \end{oneparchoices}
%note how we have the option of running the code lines together
\question This is the third question.
\ifkey\endnote{CC-BY-SA Wikiversity [[:user:Guy vandegrift]]}\fi
\begin{oneparchoices}
\CorrectChoice True
\choice False
\end{oneparchoices}
\question Do galaxies collide?
\ifkey\endnote{CC0 Anonymous based PBS NOVA Hunting the edge of space part1: 0-13:25 minutes}\fi
\begin{oneparchoices}
\choice No, only stars collide.
\choice No they are too small
\choice No, they are too far apart
\choice Theoretically yes, but we have not yet observed it
\CorrectChoice Yes, and it can be observed
\end{oneparchoices}
\question Stars were born
\ifkey\endnote{CC0 Anonymous based PBS NOVA Hunting the edge of space part1: 0-13:25 minutes}\fi
\begin{oneparchoices}
\choice inside black holes.
\choice after two stars collided
\CorrectChoice in giant clouds.
\choice after two or more stars collide
\choice at the beginning of the universe
\end{oneparchoices}
\question It is actually possible to look back in time with a powerful telescope.
\ifkey\endnote{CC0 Anonymous based PBS NOVA Hunting the edge of space part1: 0-13:25 minutes}\fi
\begin{oneparchoices}
\CorrectChoice True
\choice False
\end{oneparchoices}
\question It is actually possible to look into the future with a powerful telescope.
\ifkey\endnote{CC0 Anonymous based PBS NOVA Hunting the edge of space part1: 0-13:25 minutes}\fi
\begin{oneparchoices}
\choice True
\CorrectChoice False
\end{oneparchoices}
\question xx
\ifkey\endnote{CC0 xx}\fi
\begin{oneparchoices}
\choice xx
\choice xx
\CorrectChoice xx
\choice xx
\choice xx
\end{oneparchoices}
%the previous "boilerplate" can be kept in condensed form until the user is ready to expand and modify:
\question xx \ifkey\endnote{CC0 xx}\fi \begin{oneparchoices}\choice xx\choice xx\choice xx\choice xx\CorrectChoice xx\end{oneparchoices}
\question xx \ifkey\endnote{CC0 xx}\fi \begin{oneparchoices}\CorrectChoice xx\choice xx\choice xx\choice xx\choice xx\end{oneparchoices}
\question xx \ifkey\endnote{CC0 xx}\fi \begin{oneparchoices}\choice xx\choice xx\choice xx\CorrectChoice xx\choice xx\end{oneparchoices}
\question xx \ifkey\endnote{CC0 xx}\fi \begin{oneparchoices}\choice xx\choice xx\choice xx\choice xx\CorrectChoice xx\end{oneparchoices}
%For more "boilerplate" uncomment the following
%\question xx \ifkey\endnote{CC0 xx}\fi \begin{oneparchoices}\CorrectChoice xx\choice xx\choice xx\choice xx\choice xx\end{oneparchoices}
%\question xx \ifkey\endnote{CC0 xx}\fi \begin{oneparchoices}\choice xx\choice xx\choice xx\choice xx\CorrectChoice xx\end{oneparchoices}
%\question xx \ifkey\endnote{CC0 xx}\fi \begin{oneparchoices}\choice xx\choice xx\choice xx\CorrectChoice xx\choice xx\end{oneparchoices}
%\question xx \ifkey\endnote{CC0 xx}\fi \begin{oneparchoices}\choice xx\choice xx\CorrectChoice xx\choice xx\choice xx\end{oneparchoices}
%\question xx \ifkey\endnote{CC0 xx}\fi \begin{oneparchoices}\choice xx\choice xx\choice xx\CorrectChoice xx\choice xx\end{oneparchoices}
%\question xx \ifkey\endnote{CC0 xx}\fi \begin{oneparchoices}\choice xx\CorrectChoice xx\choice xx\choice xx\choice xx\end{oneparchoices}
%\question xx \ifkey\endnote{CC0 xx}\fi \begin{oneparchoices}\choice xx\CorrectChoice xx\choice xx\choice xx\choice xx\end{oneparchoices}
%\question xx \ifkey\endnote{CC0 xx}\fi \begin{oneparchoices}\choice xx\choice xx\CorrectChoice xx\choice xx\choice xx\end{oneparchoices}
%\question xx \ifkey\endnote{CC0 xx}\fi \begin{oneparchoices}\CorrectChoice xx\choice xx\choice xx\choice xx\choice xx\end{oneparchoices}
%\question xx \ifkey\endnote{CC0 xx}\fi \begin{oneparchoices}\choice xx\CorrectChoice xx\choice xx\choice xx\choice xx\end{oneparchoices}
%\question xx \ifkey\endnote{CC0 xx}\fi \begin{oneparchoices}\CorrectChoice xx\choice xx\choice xx\choice xx\choice xx\end{oneparchoices}
%\question xx \ifkey\endnote{CC0 xx}\fi \begin{oneparchoices}\choice xx\CorrectChoice xx\choice xx\choice xx\choice xx\end{oneparchoices}
%\question xx \ifkey\endnote{CC0 xx}\fi \begin{oneparchoices}\choice xx\choice xx\CorrectChoice xx\choice xx\choice xx\end{oneparchoices}
%\question xx \ifkey\endnote{CC0 xx}\fi \begin{oneparchoices}\choice xx\choice xx\choice xx\CorrectChoice xx\choice xx\end{oneparchoices}
%\question xx \ifkey\endnote{CC0 xx}\fi \begin{oneparchoices}\choice xx\choice xx\choice xx\choice xx\CorrectChoice xx\end{oneparchoices}
%Randomly select 2 out of 3 for a TF matched pair:
\question xx\ifkey\endnote{CC0 xx}\fi\begin{oneparchoices}
\choice True\CorrectChoice False\end{oneparchoices}
\question xx\ifkey\endnote{CC0 xx}\fi\begin{oneparchoices}
\choice True\CorrectChoice False\end{oneparchoices}
\question xx\ifkey\endnote{CC0 xx}\fi\begin{oneparchoices}
\choice True\CorrectChoice False\end{oneparchoices}
%%% NO NEED TO EDIT BEYOND THIS POINT %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\end{questions}
}
\singlespacing %OR \onehalfspacing OR \doublespacing
\parindent 0ex % Turns off paragraph indentation
%
%% BEGIN DOCUMENT %%
\begin{document}
\title{\quizname}
\author{The LaTex code that creates this quiz is released to the Public Domain\\
Attribution for each question is documented in the Appendix}
\maketitle
\beforetoc
\tableofcontents
\newpage %%%%%%%%%%%%%%%%% \newpage: BEGIN Questions %%%%%%%%%%%%%%%%
\keyfalse
\section{\quizname}
\quizname\ questions
\mytest{}
\begin{center}end of \quizname\end{center}
\newpage %%%%%%%%%%%%%%%%% \newpage: BEGIN Key %%%%%%%%%%%%%%%%
\keytrue
\section{\quizname\ key}
\mytest{\printanswers}
\begin{center}end of key to \quizname\end{center}
\newpage %%%%%%%%%%%%%%%%% \newpage: BEGIN Endnotes %%%%%%%%%%%%%%%%
\section{Appendix}
Required attribution (with optional discussion) for each question follows:
\theendnotes
\end{document}