4

I was creating one complex tikz-flow chain. One moment compiler stopped working. I was trying to get why.

And I found that the following MWE causes that

\documentclass{article}

\usepackage{empheq}
\usepackage{tikz}                                           
\usepackage{rmathbr}
\begin{document}
$  b\coloneqq b - F $ 
\end{document}

(\coloneqq is getting from empheq in addition)

I am not expert in LaTeX so it's difficult for me to find the reason of incompatibility of them in the code of packages. But I really need both of them in my work.

6
  • As far as I can tell it is an error (catcode) caused by rmathbr. Without the package it works. – TeXnician Apr 15 '17 at 10:50
  • @TeXnician yes, that's the question :) – user98432 Apr 15 '17 at 10:52
  • It was just to reassure that you also have the catcode error (there is another one when loading the packages in other order). – TeXnician Apr 15 '17 at 10:54
  • @TeXnician for me the strangest thing that if I load tikz compiler says that I forgot { }-brackets. and some ways to write := don't work also. I tried \mathrel{\mathop:}= – user98432 Apr 15 '17 at 11:00
  • Btw empheq us not relevant here, mathtools is (it is autoloaded by empheq) – daleif Apr 15 '17 at 12:39
4

The rmathbr package is quite invasive and it's not surprising it doesn't behave with other packages.

Here's a fix.

\documentclass{article}
\usepackage{empheq}

% fix \ordinarycolon and define \ordinaryequals
\edef\ordinarycolon{\mathchar\the\mathcode`: }
\edef\ordinaryequals{\mathchar\the\mathcode`= }

\usepackage{rmathbr}
% don't change the category code of ^ here!
\catcode`^=7

\AtBeginDocument{%
  % do the category code change later
  \catcode`^=12
  % fix \coloneqq to be a mathrel also for rmathbr
  \def\coloneqq{%
    \mathrel{{\mathop\ordinarycolon}\mkern-1.2mu{\ordinaryequals}}%
  }%
}


\begin{document}

$b\coloneqq b - F$

\end{document}

enter image description here

2
  • Thanks. I appreciate that. I hope, in future I will have time to read some books, material in order to become true LaTeXpert. – user98432 Apr 15 '17 at 11:23
  • @barbarabeeton Probably so. Fixed. – egreg Apr 15 '17 at 17:18

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy