Question about LateX symbols

50 views
Skip to first unread message

OHappyDay

unread,
Feb 19, 2025, 12:08:54 PM2/19/25
to PreTeXt support
Dear all,

I try to include some symbols:

  • \usepackage{txfonts} in docinfo.ptx
  • Included \varheartsuit and \vardiamondsuit in a document.
    • These are the filled versions of the regular \heartsuit and \diamondsuit which have only an outline
After building both web and print versions the symbols are visible in the print version but the HTML version has not recognized the variants of the symbols and only prints the commands.

Any idea what is wrong or what I am doing wrong?

Thanks
Klaus
suitsymbols.png

Alex Jordan

unread,
Feb 19, 2025, 12:20:31 PM2/19/25
to pretext...@googlegroups.com
Where exactly did you put this:
\usepackage{txfonts}
?

If that is in latex-image-preamble, you should be able to use \varheartsuit, etc, in a latex-image.

> Included \varheartsuit and \vardiamondsuit in a document.
For clarification, do you mean in regular text or in math content? (Or in a latex-image as mentioned above?)

\usepackage{txfonts}
is loading a tex package. It is not going to affect HTML (except with latex-image images, since those are actually built by LaTeX). So then using
\varheartsuit
in regular text would not do anything in HTML text except faithfully reprint "\varheartsuit". And using it in math content will lead to an error in MathJax.

If you are using XeLaTeX to build your PDF, you can use the heart character directly in your content:  ♥

Although for print, you may need to ensure that the font carries this character. (If it does not, there are ways to have tex switch to a different font for a particular unicode character.)




--
You received this message because you are subscribed to the Google Groups "PreTeXt support" group.
To unsubscribe from this group and stop receiving emails from it, send an email to pretext-suppo...@googlegroups.com.
To view this discussion visit https://groups.google.com/d/msgid/pretext-support/28036609-8aa9-41d0-8c7d-bea5ccc286f2n%40googlegroups.com.

OHappyDay

unread,
Feb 19, 2025, 12:44:21 PM2/19/25
to PreTeXt support
Hi,
it is indeed in the mentioned preamble and I use it in math mode. It prints the \varheartsuit text. I wanted to use this instead of the font symbol ♥ to be sure it displays in a consistent way.
I will then switch back to the heart and diamond symbol.
Thanks
Klaus
Reply all
Reply to author
Forward
0 new messages