1

I use plain XeTeX. I've been asked to include a shamrock character in a typeset document (which I've found at Unicode 2618), but only in outline. The examples in the excellent PST-Text package (page 6) look promising but I haven't managed to achieve any outline text. Any advice would be welcome! John Waś

  • Does it need to be an actual shamrock or is a clubs character (♧, U+2667) also ok? If not, then you could try a font with an outline version of the shamrock, see for example https://tex.stackexchange.com/questions/560919/symbol-for-clover-with-four-leaves. – Marijn Jan 31 '21 at 11:30
  • Hello Marijn. The open club symbol would be faute de mieux - having found the shamrock in a solid form, I was hoping to achieve an outline version (assuming there is no font with that already in place). I'll keep looking, but the pst-text package seemed to be exactly what would do the job, only I can't get it to do anything in plain XeTeX! – John in Oxford Feb 01 '21 at 12:00

1 Answers1

2

TeX SOLUTION

\font\zz=pxsyc
From pxfonts: {\zz  p}

\font\xx=txsyc From txfonts: {\xx p} \bye

enter image description here

LaTeX SOLUTION

I found three fonts that support a club outline, pxfonts, txfonts, and arev. However, in xelatex, the pxfonts seemed to render as times, rather than palatino (not sure why).

Of course, these packages change the font for the whole document. If that is not acceptable, it is possible generally to import a single glyph, if necessary.

\documentclass[12pt]{article}
\usepackage{pxfonts}% $\varclubsuit$
%\usepackage{txfonts}% $\varclubsuit$
%\usepackage{arev}% $\varclub$
\begin{document}
pxfonts: $\varclubsuit$
%txfonts: $\varclubsuit$
%Arev: $\varclub$
\end{document}

enter image description here

enter image description here

enter image description here

For another LaTeX solution using pdf specials (pdftex and pdflatex only), in the manner of Outline text using TrueType fonts, there is this. I think that pdf specials may be available through plain TeX, but I am not sure how.

\documentclass{article}
\usepackage{xcolor}
\input pdf-trans
\newbox\qbox
\def\usecolor#1{\csname\string\color@#1\endcsname\space}
\newcommand\bordercolor[1]{\colsplit{1}{#1}}
\newcommand\fillcolor[1]{\colsplit{0}{#1}}
\newcommand\outline[1]{\leavevmode%
  \def\maltext{#1}%
  \setbox\qbox=\hbox{\maltext}%
  \boxgs{Q q 2 Tr \thickness\space w \fillcol\space \bordercol\space}{}%
  \copy\qbox%
}
\newcommand\shadowfy[1]{\expandafter\shadowfypars#1\par\relax\relax}
\long\def\shadowfypars#1\par#2\relax{%
  \ifx#1\relax\else
    \shadowfywords#1 \relax\relax%
  \fi%
  \ifx\relax#2\else\par\shadowfypars#2\relax\fi%
}
\def\shadowfywords#1 #2\relax{%
  \outline{#1}%
  \ifx\relax#2\else\ \shadowfywords#2\relax\fi%
}
\newcommand\colsplit[2]{\colorlet{tmpcolor}{#2}\edef\tmp{\usecolor{tmpcolor}}%
  \def\tmpB{}\expandafter\colsplithelp\tmp\relax%
  \ifnum0=#1\relax\edef\fillcol{\tmpB}\else\edef\bordercol{\tmpC}\fi}
\def\colsplithelp#1#2 #3\relax{%
  \edef\tmpB{\tmpB#1#2 }%
  \ifnum `#1>`9\relax\def\tmpC{#3}\else\colsplithelp#3\relax\fi
}
\begin{document}
\bordercolor{black}
\fillcolor{white}
\def\thickness{.1}
\newcommand\mytext{$\clubsuit$}%
\shadowfy{\mytext}

\def\thickness{0.15} \bordercolor{blue!70!black} \fillcolor{yellow} \shadowfy{\mytext}

\bordercolor{black} \fillcolor{white} \def\thickness{.5}{\Huge\shadowfy{$\clubsuit$}} \end{document}

enter image description here