1

try to use txfonts to show the play card suit with colors http://ftp.acc.umu.se/mirror/CTAN/fonts/txfonts/doc/txfontsdocA4.pdf, anyone can provide detail latex file?

like how to use \vardiamondsuit & \varheartsuit

enter image description here

1
\documentclass{article}
\usepackage{txfonts,xcolor}
\begin{document}
\noindent
$\spadesuit$~~K 8 7 3\\
$\textcolor{red}{\varheartsuit}$~~A Q\\
$\textcolor{red}{\vardiamondsuit}$~~8 7 4\\
$\clubsuit$~~J 10 3 2
\end{document}

enter image description here

You can use macros to make it easier:

\documentclass{article}
\usepackage{txfonts,xcolor}
\newcommand\redheartsuit{\textcolor{red}{\varheartsuit}}
\newcommand\reddiamondsuit{\textcolor{red}{\vardiamondsuit}}
\begin{document}
\noindent
$\spadesuit$~~K 8 7 3\\
$\redheartsuit$~~A Q\\
$\reddiamondsuit$~~8 7 4\\
$\clubsuit$~~J 10 3 2
\end{document}
  • excellent, so fast to get correct working code sample – larrycai Jan 7 at 15:30
  • @larrycai Glad to assist! I edited the answer slightly for consistency. – Steven B. Segletes Jan 7 at 15:40

Your Answer

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

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