1

I just reinstalled my MikTeX 2.9, and am getting this following error message:

! LaTeX Error: Command \counterwithin already defined.
               Or name \end... illegal, see p.192 of the manual.

I saw the following line of questions in this link: ! LaTeX Error: Command \counterwithout already defined but it doesn't seem to be my problem, as I checked and the chngctr version is 1.1a. Is there something else I'm missing?

Here is my MWE:

\documentclass[oneside]{memoir}
\let\counterwithout\relax
\let\counterwithin\relax
\usepackage{chngcntr}

\begin{document}

\frontmatter

This information is duplicated directly from the Blahblah.  

%The above is necessary in order to display the subsections in the TOC.
\tableofcontents
\mainmatter
    lalalal

\end{document}
moewe
  • 175,683
sml
  • 77
  • Mine MikTeX 2.9 compiles it without errors, even with \let lines commented. – Przemysław Scherwentke Sep 07 '18 at 01:59
  • 1
    Maybe you have a local version of chngcntr.sty that takes precedence over the version you checked. Have a look at the .log file to find out where the chngcntr.sty is found and what its version is. – moewe Sep 07 '18 at 04:50
  • @moewe, thank you, I looked at my .log file and this is the only line that references chngcntr: "Package chngcntr [2008/07/23] emulated by memoir. " Is this my problem? – sml Sep 07 '18 at 05:46
  • That probably means you need to update memoir as well. What version do you have? I have no problems with v3.7g, 2018/04/04. At least my version of memoir uses \providecommand{\counterwithin} and \providecommand{\counterwithout} which should not be a problem. But I'm not sure about older versions. – moewe Sep 07 '18 at 05:53
  • 2
    Check logs for local copies of memoir, check the path for memoir. It probably says app data, and thus was not deleted when you reinstalled miktex. Remember miktex (confusingly) installs in two places, system and user. The latter takes precedence, this is why every time you update miktex you have to update as user and admin, or you end up with old user versions overwriting new system versions. – daleif Sep 07 '18 at 06:14
  • Thank you. I am using memoir 2016/05/16 v3.7f . I'll update it. Also thanks for clarifying that miktex installs in two places, I was confused. I'll check this too. – sml Sep 07 '18 at 19:03
  • It's working now, thank you everyone! I deleted the memoir in my user location and reinstalled the memoir package. Now everything is working as it should. :) – sml Sep 07 '18 at 19:23
  • 4
    I'm voting to close this question as off-topic because after a reinstallation mentioned in comments the issue vanished. – Mensch Mar 31 '19 at 18:58

0 Answers0