0

I would like to have the Name:_______ part on the first page only, but not on the following pages.

In the following MWE I would like to not have the Name:_____ on the second page and following. Does anyone know a solution?

\documentclass[a4paper,12pt]{scrartcl}
\usepackage[myconfig,nosolutions,pointsonright,totalsonright,noparttotals]{eqexam}

\title[T1]{Semestertest}
\author{John Doe}
\subject[FDPH]{FD Physics I}
\date{Spring 2015}

\begin{document}
\maketitle
\begin{exam}[Teil 1]{Part1}

\begin{instructions}[Teil 1]
Instructions\dots
\end{instructions}

\newpage

\begin{problem}[5]
Problem

\begin{solution}[.5in]
Solution
\end{solution}
\end{problem}

\end{exam}

\end{document}
Floyd
  • 103
  • 3

1 Answers1

1

This is described in the source at http://ftp.snt.utwente.nl/pub/software/tex/macros/latex/contrib/eqexam/eqexam.dtx.

\DescribeMacro{\examNameLabel} provides a line for the student to enter his/her name into the exam. The command \cs{examNameLabel} can be used to define the name label, the default is \texttt{Name:}

Since "Name:" is typeset while \output is active, macro \c@page (which outputs the current page number) gives the correct value in all instances. I suspect adding the line

 \makeatletter\examNameLabel{\ifnum\c@page=\@ne Name:\fi}\makeatother

to your document, will suffice. This does not get rid of the \hline underneath, though, but you have not specified whether you want to keep that.

If you also want to get rid of the line on all subsequent pages, you will need to add the lines

\makeatletter
\examNameLabel{\ifnum\c@page=\@ne Name:\fi}
\eqExamName[\Ff\FfRequired]{\ifnum\c@page=\@ne2.25in\else\z@\fi}
\rheadeqe{\ifnum\c@page>\@ne\vrule\@width2.25in\@height\z@\@depth\z@\fi}
\makeatother

which also retains original spacing. A full MWE:

\documentclass[a4paper,12pt]{scrartcl}
\usepackage[myconfig,nosolutions,pointsonright,totalsonright,noparttotals]{eqexam}

\makeatletter
\examNameLabel{\ifnum\c@page=\@ne Name:\fi}
\eqExamName[\Ff\FfRequired]{\ifnum\c@page=\@ne2.25in\else\z@\fi}
\rheadeqe{\ifnum\c@page>\@ne\vrule\@width2.25in\@height\z@\@depth\z@\fi}
\makeatother

\title[T1]{Semestertest}
\author{John Doe}
\subject[FDPH]{FD Physics I}
\date{Spring 2015}

\begin{document}
\maketitle
\begin{exam}[Teil 1]{Part1}

\begin{instructions}[Teil 1]
Instructions\dots
\end{instructions}

\newpage

\begin{problem}[5]
Problem

\begin{solution}[.5in]
Solution
\end{solution}
\end{problem}

\end{exam}

\end{document}

You can check the spacing by commenting and uncommenting the added code.

1010011010
  • 6,357
  • Thank you so much! It works very well, and what's more I learned about variables like @ne == 1 ! I have to admit that I don't understand all the finesses of you code, only that it checks if the header of page one is rendered or not. – Floyd Aug 20 '15 at 13:08