2

This question already has an answer here:

I cannot use both packages thmtools and tkz-euclide.

Following is a minimal nonworking example with "pdfTeX, Version 3.14159265-2.6-1.40.18":

\documentclass{article}

\usepackage{thmtools}
\usepackage{tkz-euclide}

\begin{document}
a
\end{document}

this giving

/usr/share/texlive/texmf-dist/tex/latex/oberdiek/kvoptions.sty:433: Extra \endc
sname.
\kv@processor@default ...fincsname\@xa \endcsname 
                                                  \csname iftrue\endcsname \...
l.433 }
/usr/share/texlive/texmf-dist/tex/latex/oberdiek/kvoptions.sty:433:  ==> Fatal 
error occurred, no output PDF file produced!

Following is minimal nonworking example with "XeTeX, Version 3.14159265-2.6-0.99998":

\usepackage{amsmath}
\usepackage{thmtools}
\usepackage{tkz-euclide}

\newtheorem{thm}{Theorem}

\begin{document}
a
\end{document}

this giving

.test.tex.swp:8: LaTeX Error: Missing \begin{
document}.

See the LaTeX manual or LaTeX Companion for explanation.
Type  H <return>  for immediate help.
 ...                                              

l.8 

No pages of output.

marked as duplicate by egreg, Mensch, Bobyandbob, Phelype Oleinik, siracusa Oct 20 '18 at 22:06

This question has been asked before and already has an answer. If those answers do not fully address your question, please ask a new question.

  • @Sigur No, this breaks tkz-euclide. – egreg Oct 20 '18 at 20:46
  • @egreg. Ow, I never heard about that. Thanks for showing to us. – Sigur Oct 21 '18 at 11:16
2

Changing the loading order is not sufficient. As explained in Conflict between tkz-fct and thmtools?, this breaks tkz-euclide.

Here's a working patch.

\documentclass{article}

\usepackage{tkz-euclide}
\usepackage{thmtools}
\usepackage{etoolbox}

\makeatletter
%%% patch tkz-tools-base.tex
\let\tkz@g@xa\tkz@init@xmin % don't undef \@xa or thmtools will be upset
\let\tkz@g@xb\tkz@init@xmax\undef\@xb
\let\tkz@g@ya\tkz@init@ymin\undef\@ya
\let\tkz@g@yb\tkz@init@ymax\undef\@yb
\patchcmd{\tkz@Init}
 {\global\let\@xa\tkz@init@xmin
  \global\let\@xb\tkz@init@xmax
  \global\let\@ya\tkz@init@ymin
  \global\let\@yb\tkz@init@ymax}
 {\global\let\tkz@g@xa\tkz@init@xmin
  \global\let\tkz@g@xb\tkz@init@xmax
  \global\let\tkz@g@ya\tkz@init@ymin
  \global\let\tkz@g@yb\tkz@init@ymax}
 {}{}
\patchcmd{\tkz@Grid}
 {(\@xa,\@ya)(\@xb,\@yb)}
 {(\tkz@g@xa,\tkz@g@ya)(\tkz@g@xb,\tkz@g@yb)}
 {}{}
\makeatother

\newtheorem{thm}{Theorem}

\begin{document}
a
\end{document}

Not the answer you're looking for? Browse other questions tagged or ask your own question.