Latex mcexam 没有跳转到 pdf 中的正确位置

Latex mcexam 没有跳转到 pdf 中的正确位置

我之前问过这个问题,但由于时间问题,还没有发布任何代码。我现在就发布。

问题:在使用软件包的文档中使用“跳转到 PDF”或“快速构建”时mcexam,我经常会转到 PDF 上的错误页面(上一页)。只有在使用软件包时才会出现这种情况mcexam。知道为什么吗?

在下面的例子中,如果我将光标放在问题 5 上或对其进行编辑,则 pdf 将显示在问题 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}

相关内容