0

Now Using MacTeX-2018 Getting this error:

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

Found this solution, on stack exchange ! LaTeX Error: Command \counterwithout already defined which recommends you do this ...

\documentclass{article}
\let\counterwithout\relax
\let\counterwithin\relax
\usepackage{chngcntr}

But that does not work.

moewe
  • 175,683
  • Welcome to TeX.SX! Can you show us a short document that reproduces the error, please? Refer to https://tex.meta.stackexchange.com/q/4407/35864 for guidance on preparing an MWE. You may also want to include \listfiles at the very top of your document and report the file versions as reported at the end of the .log file. An update (see https://tex.stackexchange.com/q/55437/35864) might just solve your problem. – moewe Jun 01 '18 at 15:12
  • Have you also run TeX Live utility on your installation to update all the packages? This document compiles without problems for me (with or without the \let commands. But the error you show is not from that document. – Alan Munn Jun 01 '18 at 15:14
  • \counterwithin and \counterwithout have been moved to the latex core, chngcntr should have been updated to accommodate, it would be useful to get a full log. And as Alan mentioned, you should always update MacTeX after installing it (MacTeX is a snapshot in time, so it does not have the updates that have come out since this MacTeX version came out) – daleif Jun 01 '18 at 15:21
  • moewe I will add a 'tex' file shortly
  • Alan Munn, No. I did not run the Tex Live utility, I downloaded the package this morning. I will do so next thing.
  • I will attach the log
  • – noStepOnSnake Jun 01 '18 at 16:00
  • You possibly have a rogue copy of chngcntr.sty somewhere in your path. Can you look in the log file for it? – egreg Jun 01 '18 at 16:17
  • OK. I do not understand. I moved the suggested fix to the VERY top, ... [answer] \documentclass[12pt,a4paper]{report} %% <- LINE 1 \let\counterwithout\relax %% <- now here \let\counterwithin\relax \usepackage{chngcntr}

    %%\usepackage{ERGTN-SAMPLE-2017/ntarep} \usepackage{ntarep} \makeglossaries \loadglsentries{ERGTN-SAMPLE-2017/GMLRS_SW_glossary} % path to GLS Acronym Definitions \glsdisablehyper [answer] and now it compiles. Not understanding this, as I do not think it should matter.

    – noStepOnSnake Jun 01 '18 at 16:24
  • egreg, I did that when the error first cropped up, prior to going to stack exchange. – noStepOnSnake Jun 01 '18 at 16:25
  • Thanks everyone for the help. I would appreciate it if someone would explain why the location of

    \let\counterwithout\relax \let\counterwithin\relax

    matters

    I also need to learn how to format. My comments are a mess.

    – noStepOnSnake Jun 01 '18 at 16:27
  • 1
    clearly you need to undefine the commands before they are redefined so the position matters, but if you have the current version of chngctr then you do not need \let\counterwithout\relax at all – David Carlisle Jun 01 '18 at 19:40
  • @noStepOnSnake on code in comments, don't do that, instead edit the question and add code there in a code block ({} button) so line endings preserved) – David Carlisle Jun 01 '18 at 19:43