3

I am using witharrows package and it seems like it does not respect surrounding color.

A sample code like this

\documentclass{article}
\usepackage{witharrows}

\begin{document}
    {\color{red}
 $\begin{WithArrows}
 A & = \bigl((a+b)+1\bigr)^2 \Arrow{}\Arrow{}[jump=2] \\
   & = (a+b)^2 + 2(a+b) +1 \\
   & = a^2 + 2ab + b^2 + 2a + 2b +1
\end{WithArrows}$
}
\end{document}

will produce the following enter image description here

Is there any way to enforce the WithArrows environment to respect the surrounding color? Thanks.

Edit: Seems like compiling with pdflatex works fine; but I am not sure why xelatex will experience this (or, any pointer on how to debug this since in the comment someone can produce all red environment using xelatex)

I use manjaro. My xelatex is (output of xelatex --version)

XeTeX 3.141592653-2.6-0.999994 (TeX Live 2022/Arch Linux)
kpathsea version 6.3.4
Copyright 2022 SIL International, Jonathan Kew and Khaled Hosny.
There is NO warranty.  Redistribution of this software is
covered by the terms of both the XeTeX copyright and
the Lesser GNU General Public License.
For more information about these matters, see the file
named COPYING and the XeTeX source.
Primary author of XeTeX: Jonathan Kew.
Compiled with ICU version 71.1; using 71.1
Compiled with zlib version 1.2.12; using 1.2.12
Compiled with FreeType2 version 2.12.0; using 2.12.1
Compiled with Graphite2 version 1.3.14; using 1.3.14
Compiled with HarfBuzz version 4.2.0; using 5.2.0
Compiled with libpng version 1.6.37; using 1.6.38
Compiled with pplib version v2.05 less toxic i hope
Compiled with fontconfig version 2.14.0; using 2.14.0

and packages I installed are the latest in the channel

texlive-bin 2022.62885-1
texlive-core 2022.63035-1
texlive-fontsextra 2022.62977-1
texlive-langchinese 2022.62922-1
texlive-langjapanese 2022.63011-1
texlive-latexextra 2022.63034-1
texlive-local-collection-fontsextra 63936-1
texlive-pictures 2022.62992-1
texlive-science 2022.62977-1
10
  • 1
    Your syntax is faulty: the \color macro takes 1 argument, not 2. Hence, instead of \color{red}{...}, do write {\color{red}...} in order to delimit the scope of the \color directive.
    – Mico
    Sep 26, 2022 at 21:18
  • @Mico, thanks! I guess I was using it wrong the whole time! But fixing this produce the same though. Sep 26, 2022 at 21:21
  • Please check your log file for information about the version of the witharrows package you employ. I use MacTeX2022, with all updates applied, and I find witharrows 2022/04/20 v2.7 in the log file. FWIW, when I run your code, all three rows are red, and not just the first one.
    – Mico
    Sep 26, 2022 at 21:26
  • @Mico, I checked my .log and it seems that I am using the same version too. Interestingly I still have the same output. I am using XeLatex, maybe this will change something? I updated my entire .tex file in the quesiton. Sep 26, 2022 at 22:14
  • Even when using witharrows 2019/02/20 v1.15 and XeLaTeX, I don't get the output you show. All three lines are red in the result of my compilation. I cannot reproduce your output at all using the code you provide in your updated answer. Sep 27, 2022 at 7:06

1 Answer 1

2

Mr. Pantigny helped me resolve this issue. Turns out that even though packages say "version 2022.xxx" on manjaro channel, they are not the latest versions. I have to install vanilla texlive and then, with the latest 2022 version, the problem got resolved.

You must log in to answer this question.

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