folks---
I'm a new user on the Exchange, but not as new to LaTeX, so I hope I'm able to give some context to this problem.
I have two machines. I'm working on Debian 9.11 (stretch) on both machines; both machines are 64-bit, and have TeXLive 2019 and TeXStudio installed on both. When installing on both machines, I used the install-tl script provided by tug.org, and had symbolic links/etc use the default settings on both machines. In principle (in my mind), the setup on both machines should be virtually identical, though they must not be, because of the error I'm getting.
I am reworking some of my exams to be more randomized to make some of the questions more reusable, so I'm using both pythontex and mcexam. The Python stuff works fine; it's the mcexam stuff that is presenting the issue.
On my desktop, I can compile and randomize with no issue at all, provided I remember to close out environments and lists like I'm supposed to. I can randomize questions and answers, set seeds, change display type, write the R file, the whole nine yards.
On my laptop, however, with the same exact options set, I get an error when I set "randomizeanswers=true". The error is an "Incomplete \ifx" error, and ignores all text after the end of the mcquestions environment; the pdf doesn't compile, and I don't have a test to use. Based on what I found in this similar question: LaTeX file using mcexam package compiles on OSX but not on Windows , I had the inspiration to turn "randomizeanswers=false", and now it will compile on both machines the way I expect. I've tried messing with the other package options, too, and they don't seem to have any problem; it's something to do with how the package is trying to randomize the answer choices on my laptop that is different than on my desktop.
The trouble is... I'm at quite a loss as to how to figure out what that problem is, and fix it. The package documentation doesn't give guidance about the core mechanics about how this option does what it's doing, and while I can open the mcexam.sty file and have tried to figure out the issue, I'm not yet at a level that I can read the fundamental TeX language and diagnose the problem, myself.
Anyone willing to lend a hand?
For a MWE, I'll use a pair of the questions in the mcexam_example.tex file, since they give this error on the laptop if randomizeanswers=true, and compile properly if =false:
\documentclass[a4paper]{article}
\usepackage[output=concept
,numberofversions=4
,version=1
,seed=1
,randomizequestions=true
,randomizeanswers=false
,writeRfile=true
]{mcexam}
% Packages used for special things
\usepackage{tikz,framed}
% Set headers and footers
\usepackage{fancyhdr,lastpage}
\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}
\begin{document}
\begin{mcquestions}
\question What is the color of the sky?
\begin{mcanswerslist}[fixlast]
\answer[correct] blue
\answer green
\answer red
\answer yellow
\answer none of the above
\end{mcanswerslist}
\question Which figure is a square?
\begin{mcanswers}
\begin{tabular}{@{}cccc}
\answer{1}{\tikz{\draw (-0.66,0)--(0.66,0)--(0,1)--cycle;}}&
\answer{2}{\tikz{\draw (0,0)--(2,0)--(2,1)--(0,1)--cycle;}}&
\answer[correct]{3}{\tikz{\draw (0,0)--(1,0)--(1,1)--(0,1)--cycle;}}&
\answer{4}{\tikz{\draw (0,0) circle[radius=0.5];}}\\
\answernum{1}&\answernum{2}&\answernum{3}&\answernum{4}\\
\end{tabular}
\end{mcanswers}
\end{mcquestions}
\end{document}
Thanks for any help you can offer!
install-tl. – egreg Oct 03 '19 at 13:28pdflatexresides in/usr/bin, because you enabled creating symlinks, then it will use the Debian files, instead of the TUG ones. – egreg Oct 03 '19 at 13:33\listfilesat the beginning and compare the file list you get at the end of the log file (userandomizeanswers=falseso as it compiles on both machines). – egreg Oct 03 '19 at 13:45Having done all that, I am still getting an error. When I check the logs, it's still calling files installed in /usr/local on the laptop as it's failing, and calling /usr/share on the desktop, and working properly. I don't know what I should be doing to get it working!
– Wayne Oct 10 '19 at 03:07