0

I asked this question before but due to time issues had not yet posted any code. I will post that now.

Problem: Often when using Jump to pdf or Quick Build in a document with the mcexam package, it takes me to the wrong (a previous) page on the pdf. This behaviour is only when using the mcexam package. Any ideas why?

In the example below, if I place my cursor or make an edit to Question 5, the pdf will display at Question 1.

%%% Copyright (c) 2017 Jorre Vannieuwenhuyze.
%%%
%%% Permission is granted to copy, distribute and/or modify this
%%% software under the terms of the LaTeX Project Public License
%%% (LPPL), version 1.3c or any later version.
%%%
%%% This software is provided 'as is', without warranty of any kind,
%%% either expressed or implied, including, but not limited to, the
%%% implied warranties of merchantability and fitness for a
%%% particular purpose.

\documentclass[a4paper]{article}

\usepackage[output=concept ,numberofversions=2 ,version=1 ,seed=1 ,randomizequestions=false ,randomizeanswers=true ,writeRfile=true ]{mcexam} %exam %concept % Packages used for special things \usepackage{tikz,framed}

% Set headers and footers \usepackage{fancyhdr,lastpage} \usepackage{tcolorbox} \tcbuselibrary{skins} \usepackage{chemformula} \usepackage{chemmacros} \usepackage{graphicx} \usepackage{enumitem} \usepackage{array} \graphicspath{ {./images/} } \hyphenpenalty=2000

\pagestyle{fancy} \fancyhf{} \renewcommand{\headrulewidth}{0pt} \renewcommand{\footrulewidth}{1pt} \lfoot{\mctheversion} \rfoot{Page \thepage\ of \pageref{LastPage}}

% Ensure each question+answers is printed entirely on the same page. \usepackage{calc} \renewenvironment{setmcquestion}{\begin{minipage}[t]{\linewidth-\labelwidth}}{\end{minipage}\par}

% solution counter starting at 3 %\newcounter{temp} %\setlist[setmcquestions]{ %label=\protect\setcounter{temp}{\arabic{}} % \protect\addtocounter{temp}{2} % \arabic{temp}. %,ref=\protect\setcounter{temp}{\arabic{}} % \protect\addtocounter{temp}{2} % \arabic{temp}. %,itemsep=2\baselineskip %,topsep=2\baselineskip }

\begin{document} \section*{} \begin{center} \bfseries\LARGE Test Name: \texttt{Multiple Choice} \end{center} \begin{framed} \centering\bfseries\Large\MakeUppercase{\mctheversion} \end{framed} \mcifoutput{concept,exam} { \bigskip \noindent Name: \dotfill\[.5\baselineskip] \vspace{2\baselineskip} \noindent\textbf{Instructions:} \begin{itemize}[nosep] \item Answer all questions. \item You may write on this test paper \end{itemize}
}

\newpage \section*{}

\begin{mcquestions}

%Question 1% %%%%%%%%%%%%

\question Question 1
    \begin{mcanswerslist}[fixlast]
    \answer Answera
    \answer Answerb
    \answer [correct] Answerc
    \answer Answerd
    \end{mcanswerslist}


%Question 2% %%%%%%%%%%%%

\question Question 2
    \begin{mcanswerslist}%[fixlast]
    \answer Answer1
    \answer Answer2
    \answer [correct] Answer3
    \answer Answer4
    \end{mcanswerslist}


%Question 3% %%%%%%%%%%%%

\question Question3
    \begin{mcanswerslist}%[fixlast]
    \answer Answer1
    \answer Answer2
    \answer [correct] Answer3
    \answer Answer4
    \end{mcanswerslist}


%Question 4% %%%%%%%%%%%%

\question Question4
    \begin{mcanswerslist}%[fixlast]
    \answer Answer1
    \answer Answer2
    \answer [correct] Answer3
    \answer Answer4
    \end{mcanswerslist}


%Question 5% %%%%%%%%%%%%

\question Question5
    \begin{mcanswerslist}%[fixlast]
    \answer Answer1
    \answer Answer2
    \answer [correct] Answer3
    \answer Answer4
    \end{mcanswerslist}


\end{mcquestions}

\end{document}

larryjb
  • 45
  • 5

0 Answers0