1

When using ArsClassica package with tcolorbox, there is an error related to amsmath even when no math is used:

Package amsmath Warning: Unable to redefine \Umathaccent \hat.


Package amsmath Warning: Unable to redefine \Umathaccent \check.


Package amsmath Warning: Unable to redefine \Umathaccent \tilde.


Package amsmath Warning: Unable to redefine \Umathaccent \acute.


Package amsmath Warning: Unable to redefine \Umathaccent \grave.


Package amsmath Warning: Unable to redefine \Umathaccent \dot.


Package amsmath Warning: Unable to redefine \Umathaccent \ddot.


Package amsmath Warning: Unable to redefine \Umathaccent \breve.


Package amsmath Warning: Unable to redefine \Umathaccent \bar.


Package amsmath Warning: Unable to redefine \Umathaccent \vec.


Package amsmath Warning: Unable to redefine math accent \mathring.

! Extended mathchar used as mathchar (4203026).
<to be read again> 
                   \relax 
l.893 \mathchardef\std@minus\mathcode`\-\relax

Minimal non-working code:

\documentclass{article}
\usepackage{savesym} %1
\usepackage{arsclassica} %Comment this out to make it compilable
\savesymbol{dddot} %1
\savesymbol{ddddot} %1

\usepackage[many]{tcolorbox}
\usepackage[noendash]{mathastext} %2

\title{Quả cầu}
\author{}
\restoresymbol{TXF}{dddot} %1
\restoresymbol{TXF}{ddddot} %1

\begin{document}
\maketitle
test
\end{document}
  1. Fix for command already defined. Related with amsmath.
  2. Fix for Extended mathchar used as mathchar. Also related with amsmath.

Is there a way to disable amsmath? The engine is XeLaTeX

9
  • Your write-up isn't very clear, I'm afraid. In particular, could you provide a bit more information about the "several errors related to math when compiling"? Does your text maybe contain the characters _, ^, and $? Please advise.
    – Mico
    Commented Dec 13, 2017 at 5:53
  • @CarLaTeX I've updated the question
    – Ooker
    Commented Dec 13, 2017 at 6:58
  • 1
    Thanks for providing some additional information. Your code doesn't seem to load the amsmath package, so it's not clear how or why the warning messages (not error messages) arise. Please make your code compilable, and do please indicate which TeX engine you employ.
    – Mico
    Commented Dec 13, 2017 at 7:01
  • Your code still isn’t compilable. For sure , it’s lacking \documentclass{...}, \begin{document}, and \end{document} statements.
    – Mico
    Commented Dec 13, 2017 at 7:32
  • @Ooker Your code works for me with an updated Miktex version and using pdflatex.
    – Ignasi
    Commented Dec 13, 2017 at 7:43

1 Answer 1

3

Some observations:

  • If there really is no math anywhere in your document, there's no point in loading the mathastext package. Likewise, I can't see the need for loading the savesym package and for excecuting the pairs of \savesymbol and \restoresymbol directives.

  • Assuming your TeX distribution has been updated recently -- specifically, more recently than 2017/10/31 -- all you really need to do is be sure to load tcolorbox before arsclassica.

The MWE (minimum working example) would look like this:

\documentclass{article}
\usepackage[many]{tcolorbox}
\usepackage{arsclassica} 
\title{Quả cầu}
\author{}

\begin{document}
\maketitle
test
\end{document}

If your TeX distribution has not been updated recently, you should also take the following observations on board:

  • You should use the report class, not the article class, with the arsclassica package. Why? Because you need to use a document class that provides the commands \chapter and \chaptermark. (The most recent version of arsclassica no longer requires a document class that provides \chapter and \chaptermark; that's why it's OK to use the article document class in the MWE shown above.)

  • Specify the option flushmargin when running \documentclass. That way, this option will automatically get passed to the footmisc package (which is loaded by the arsclassica package).

  • Last but definitely not least, be sure to load the fontspec package, and do specify a main font (via \setmainfont) that provides all the glyphs that occur in your input file.

A revised MWE (minimum working example) for older TeX distributions would thus be as follows:

\documentclass[flushmargin]{report}
\usepackage[many]{tcolorbox}
\usepackage{arsclassica} 
\usepackage{fontspec}     
\title{Quả cầu}
\author{}

\begin{document}
\maketitle
test
\end{document}
4
  • There is no need to load fontspec. arsclassica will do it. Commented Dec 13, 2017 at 9:34
  • @UlrikeFischer - If I don't include the \usepackage{fontspec} directive in the MWE, the double-accented characters aren't displayed properly, i.e., the base characters are displayed without any accents. Moreover, the log file doesn't indicate that the fontspec package was loaded.
    – Mico
    Commented Dec 13, 2017 at 9:38
  • Hm. Together with the remark about chapter (that I can't reproduce either) I wonder if you have some different files. I checked with --recorder: My (xelatex)-compilation only uses files from a current texlive updated today. Commented Dec 13, 2017 at 9:51
  • @UlrikeFischer - This morning, I was working on a PC and a MikTeX installation that hadn't been updated since Feb. 2017 (tsk, tsk); the version of the arsclassica package that I had access to is V4.0, 2012/02/21. Just now, I reran the MWE on my personal laptop (which runs MacTeX2017 and is fully up to date); its version of the arsclassica package is 2017/10/31. Conflict solved. I'll edit my answer to modify the statement about needing to use the report document class.
    – Mico
    Commented Dec 13, 2017 at 10:51

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .