3

I recently bought a new laptop and installed latest complete MiKTeX and Texmaker, which is the editor I use on my other laptop. Compiling the same document on my new laptop doesn't give the same output than with my other one.

More specifically, in most of my documents, I call a .cls file with all the stuff that I don't want to copy-paste every time. On my new laptop, it seems that the options I declare are not processed. Here is a minimal (not) working example: first a .cls file, then another file calling my class.

\ProvidesClass{TEST}
\LoadClass[a4paper]{article}

\newcommand{\pouet}{0} \DeclareOption{OPT}{\renewcommand{\pouet}{1}}

\ProcessOptions

\documentclass[10pt,OPT]
{C:/path/TEST}

\begin{document}

\pouet

\end{document}

Here, I don't get any error, but it prints 0 instead of 1.

NoZ
  • 31
  • 2
    Don't call your class with an explicit path. Instead, put it in a path where MikTeX finds it (e.g., the local directory) and load it without the path, that way the options should work. – Skillmon Dec 07 '20 at 19:43
  • 1
    Loading a class or package with an explicit path is not really something encouraged. As Skillmon said you should move it to a path where MiKTeX can find, or to the same folder as your document. That said, this was already reported here and it's already fixed in the development repository. A patch release should be out in a couple of weeks. – Phelype Oleinik Dec 07 '20 at 20:34
  • 4
    I’m voting to close this question because the issue was fixed in the kernel – Phelype Oleinik Feb 03 '21 at 21:29

0 Answers0