3

I am attempting to use the examdesign class in my linux install of texlive on my chromebook. I have followed the instructions in the README file 1) Copy folder into /usr/local/share/texmf/examdesign. 2) Run latex examdesign.ins 3) Run sudo texhash while in the folder

But when I attempt to compile my test document, I get the error "There's no line here to end."

When I change back to an article documentclass, I have no problems. Here is the document I'm attempting to compile, it's literally the simplest document I can imagine.

%This LATEX document will be the template for tests.

\documentclass{examdesign}

\begin{document}

Test

\end{document}

That's it. It runs if the documentclass is article, but not if it's exam design. What have I missed?

2
  • Welcome to TeX.SE! Thanks for providing a minimal working example (MWE)!
    – Troy
    Jun 3, 2017 at 6:28
  • Can you see if this works for you \documentclass{examdesign} \class{Test} \begin{document} test \end{document}
    – Troy
    Jun 3, 2017 at 6:32

1 Answer 1

3

From a quick look around the documentation, it seems like a bug..(?) If you refer to the manual section 3.1, if no settings are passed, a default examtop environment is used, which typesets the class name and student name area automatically:

% Taken from manual: http://texdoc.net/texmf-dist/doc/latex/examdesign/examdesign.pdf
\begin{examtop}
\@@line{\parbox{3in}{\classdata \\
\examtype, Form: \fbox{\textsf{\Alph{version}}}}
\hfill
\parbox{3in}{\normalsize \namedata}}
\bigskip
\end{examtop}

In particular, I think the \@@line{\parbox{3in}{\classdata \\ line is causing problem.

\classdata is a macro that uses current value of \class. The problem here is that \class does not have a default value, and hence \classdata is empty if you do not specify \class yourself first. And as we all know, TeX does not understand a line break \\ after nothing, thus giving rise to the error.

The fix?

Define your own \class{...}, which will assign a value/string to \classdata, and all will be well. Otherwise, just design your own examtop environment.


The following MWE should work:

\documentclass{examdesign}
\usepackage[showframe]{geometry}% To show page borders etc.
%\Fullpages
\class{TX0001 \TeX.SX basics}% <------------------

\begin{document}
    \begin{exampreface}
    \noindent Note that if you do not provide a minimal working example (MWE), you will get no marks. \\
    \end{exampreface}
    \begin{truefalse}[title={True/False (5 pts each)},
        resetcounter=yes,suppressprefix]
    \begin{question}
        \answer{True} \TeX.SX is awesome.
    \end{question}
    \end{truefalse}
\end{document}

exam

3
  • That fixed it! One more follow-on question, I noticed the following error during the output, I'm assuming it's from the Name, Student #, TA, Date box overflowing. To fix that, I need to define my own examtop environment? Overfull \hbox (5.83759pt too wide) detected at line 18
    – Jonathanb
    Jun 3, 2017 at 23:32
  • After a coffee, I realized I could answer that question myself! The answer is... yes, that's the problem. I need to design my own environment there anyway because this is high school, we have no TAs. So that won't be a problem. Thans fro the help!
    – Jonathanb
    Jun 3, 2017 at 23:52
  • This was useful: it got rid of the error I introduced trying to get rid of the other error ;).
    – cfr
    Dec 2, 2020 at 3:49

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .