Automatically Produce Separated Words Using the Mathcal or Pazocal Fonts

mathcalpdftexxetex

Consider the code:

\documentclass[a4paper,12pt]{article}
\usepackage{amsmath,amssymb}
\usepackage{calrsfs}

\DeclareMathAlphabet{\pazocal}{OMS}{zplm}{m}{n}
\SetMathAlphabet\pazocal{bold}{OMS}{zplm}{bx}{n}

\begin{document}
\Huge
\vskip 15pt
$\boldsymbol{\pazocal{EACH DAY}}$ \\
\end{document}

which produces

enter image description here

Even though "EACH DAY" was entered as text in the code, the two words are not separated. I gather that this is because pazocal is some kind of a math mode font.

To automatically separate the words, I have tried using \text in conjunction with \pazocal, but when I do, the font disappears (though the two words become separated).

I know that I can force a separation by adding horizontal space between the two words; but I would like to be able to do this automatically to accommodate, say, multiple words.

QUESTION: How may I use the \pazocal font and boldsymbol so that the individual words that are typed within the braces of pazocal{} produce separated words with the desired font?

Thank you.

Best Answer

If you want to use the font for text, you have to specify an interword space, because the relevant parameter in OMS encoded fonts is zero (for TeXnical reasons).

\documentclass[a4paper,12pt]{article}

\newcommand{\textpazocal}[1]{%
  \begingroup
  \setlength{\spaceskip}{0.5em plus 0.2em minus 0.1em}%
  \usefont{OMS}{zplm}{bx}{n}#1%
  \endgroup
}

\begin{document}

\textpazocal{EACH DAY}

\end{document}

enter image description here

The final output is really ugly, isn't it?

If you insist for math modeā€¦

\documentclass[a4paper,12pt]{article}
\usepackage{amsmath,amssymb}

\DeclareMathAlphabet{\pazocalalphabet}{OMS}{zplm}{m}{n}
\SetMathAlphabet\pazocalalphabet{bold}{OMS}{zplm}{bx}{n}

\ExplSyntaxOn
\NewDocumentCommand{\pazocal}{m}
 {
  \seq_set_split:Nnn \l_tmpa_seq { ~ } { #1 }
  \pazocalalphabet{\seq_use:Nn \l_tmpa_seq { \ }}
 }
\ExplSyntaxOff

\begin{document}

$\pazocal{EACH DAY}$

$\boldsymbol{\pazocal{EACH DAY}}$

\end{document}

enter image description here

You may want to substitute { \ } with {\mspace{12mu plus 4mu minus 2mu}} to get

\documentclass[a4paper,12pt]{article}
\usepackage{amsmath,amssymb}

\DeclareMathAlphabet{\pazocalalphabet}{OMS}{zplm}{m}{n}
\SetMathAlphabet\pazocalalphabet{bold}{OMS}{zplm}{bx}{n}

\ExplSyntaxOn
\NewDocumentCommand{\pazocal}{m}
 {
  \seq_set_split:Nnn \l_tmpa_seq { ~ } { #1 }
  \pazocalalphabet{\seq_use:Nn \l_tmpa_seq {\mspace{12mu plus 4mu minus 2mu}}}
 }
\ExplSyntaxOff

\begin{document}

$\pazocal{EACH DAY}$

$\boldsymbol{\pazocal{EACH DAY}}$

\end{document}

enter image description here

Adjust the spacing to suit your taste.