Hi Matt,

>>>>> Matt Mitchell <matthew.mitch...@yale.edu> writes:
> I've noticed that, when previewing LaTeX documents with C-c C-p C-d,
> inline equations inside \textbf{} are pushed to the front of the bold
> section, while the bold text itself is cut off.

> A minimal example is included below, along with my a dump of my Emacs &
> AUCTeX version info. I hope this is enough to reproduce it.

Thanks for your report. I confirmed what you say. This is basically a
issue described in preview-latex manual[1]. However, the workaround
mentioned there, namely putting
\PreviewMacro*\textbf
in the preamble, doesn't work because it is ignored by LaTeX as
,----
| l.7 \PreviewMacro
|                  *\textbf
| 
| ./tst-prv3.tex:7: LaTeX Error: Missing \begin{document}.
`----
. When I put \PreviewMacro*\emph after \begin{document}, document
preview (C-c C-p C-d) does work but region preview doesn't.

In the manual[1], there is also a sentence
,----
| At least all of the above mentioned macros and a few more are already
| catered for by a configuration file ‘prauctex.cfg’ that gets loaded
`----
. However, \textbf is actually missing from "prauctex.cfg". Thus I think
this is a bug of preview-latex.

I'll add \textbf in the default "prauctex.cfg". Until the fixed version
is released, you can work around the bug by the following prescription:
1. Find the default "prauctex.cfg" by "kpsewhich prauctex.cfg".
2. Copy it to the suitable place (current directory or
   ~/texmf/tex/latex/preview/).
3. Add
\PreviewMacro*\textbf
   in the copied "prauctex.cfg".

[1] 
https://www.gnu.org/software/auctex/manual/preview-latex/Misplaced-previews.html#Misplaced-previews

Regards,
Ikumi Keita
#StandWithUkraine #StopWarInUkraine
#Gaza #StopMassiveKilling #CeasefireNOW



_______________________________________________
bug-auctex mailing list
bug-auctex@gnu.org
https://lists.gnu.org/mailman/listinfo/bug-auctex
  • bug#71690: ... Matt Mitchell
    • bug#71... Ikumi Keita
      • bu... Arash Esbati
        • ... Ikumi Keita
          • ... Matt Mitchell
            • ... Ikumi Keita
              • ... Arash Esbati
                • ... Jeremy Bryant via bug-auctex via Bug reporting list for AUCTeX
                • ... Arash Esbati

Reply via email to