# Redefining \pmb for nicer results

I want to use suetterlin font as a math alphabet (in a bold and medium version).

This is how far I got (without any manual font conversions....)

\documentclass[convert={density=10000}]{standalone}
\usepackage{amsmath}
\DeclareMathAlphabet{\mathsuet} {T1} {wesu}{bx}{sl}
\pdfpkmode{dpdfezzz}
\pdfpkresolution=8000
\usepackage{bm}
\begin{document}
\fbox{{
$\bm n n$
$\pmb{\mathsuet n}\, \mathsuet n$
}}
\end{document}


As one can see, the thickness of the lines is similar to the normal alphabet... But the bold Version (made with \pmb) is not very nice at the line ends...

I found the definition of \pmb in amsbsy:

\DeclareRobustCommand{\pmb}{%
\ifmmode\else \expandafter\pmb@@\fi\mathpalette\pmb@}


And the definition of \pmb@

\def\pmb@#1#2{\setbox8\hbox{$\m@th#1{#2}$}%
\setboxz@h{$\m@th#1\mkern.5mu$}\pmbraise@\wdz@
\binrel@{#2}%
\dimen@-\wd8 %
\binrel@@{%
\mkern-.8mu\copy8 %
\kern\dimen@\mkern.4mu\raise\pmbraise@\copy8 %
\kern\dimen@\mkern.4mu\box8 }%
}


I have got no idea what this code does, but I assume it should be possible to shift the reprinted characters (by redefining \pmb) so that the line ends look smoother?

A previous version of the question contained the definition of \pmb@@, which is only for non-math mode.

\def\pmb@@#1#2#3{\leavevmode\setboxz@h{#3}%
\dimen@-\wdz@
\kern-.5\ex@\copy\z@
\kern\dimen@\kern.25\ex@\raise.4\ex@\copy\z@
\kern\dimen@\kern.25\ex@\box\z@
}

• why use pmb at all if you have a bold font (as shown by bm) ? – David Carlisle Sep 10 '15 at 12:19
• but this only works for the "normal" font. my \mathsuet already takes the (extended) bold version of of the suetterlin font (which is still very thin), see line 3 of the code: \DeclareMathAlphabet{\mathsuet} {T1} {wesu}{bx}{sl} – Faekynn Sep 10 '15 at 12:23
• @DavidCarlisle This "w" is how the n looks like in this font ;) en.wikipedia.org/wiki/S%C3%BCtterlin – Faekynn Sep 10 '15 at 12:25
• I don't have the font so can't test, oddly texlive has the fd files but not the font? but anyway \kern\dimen@\kern.25\ex@\raise.4\ex@\copy\z@ just shifts the letter by that amount and overprints 3 times, you can add more of them overprinted by different amounts to try to smooth it off – David Carlisle Sep 10 '15 at 12:25
• I did wonder:-) (or do I mean nonder) – David Carlisle Sep 10 '15 at 12:26

You can overprint as often as you like at different offsets to try to get a smoother look (but \pmb never looks that great)

\documentclass[convert={density=10000}]{standalone}
\usepackage{amsmath}
\DeclareMathAlphabet{\mathsuet} {T1} {wesu}{bx}{sl}

% I get metafont errors from these settings?
%\pdfpkmode{dpdfezzz}
%\pdfpkresolution=8000

\makeatletter
\def\pmb@@#1#2#3{\leavevmode\setboxz@h{#3}%
\dimen@-\wdz@
\kern-.5\ex@\copy\z@
\kern\dimen@\kern.25\ex@\raise.4\ex@\copy\z@
\kern\dimen@\kern.2\ex@\raise.3\ex@\copy\z@
\kern\dimen@\kern.15\ex@\raise.2\ex@\copy\z@
\kern\dimen@\kern.25\ex@\box\z@
}
\makeatother

\usepackage{bm}
\begin{document}
\fbox{{
$\bm n n$
$\pmb{\mathsuet n}\, \mathsuet n$
}}
\end{document}

• Oh, now I see why I could't change the definition of \pmb :o I didn't use \makeatletter and \makeatother! – Faekynn Sep 10 '15 at 12:45
• But it works just fine, thanks! – Faekynn Sep 10 '15 at 12:46

\documentclass[convert={density=10000}]{standalone}
\usepackage{amsmath}
\DeclareMathAlphabet{\mathsuet} {T1} {wesu}{bx}{sl}
\pdfpkmode{dpdfezzz}
\pdfpkresolution=8000
\usepackage{bm}
\usepackage{relsize}

\makeatletter
\def\pmb@#1#2{\setbox8\hbox{$\m@th#1{#2}$}%
\setboxz@h{$\m@th#1\mkern.5mu$}\pmbraise@\wdz@
\binrel@{#2}%
\dimen@-\wd8 %
\binrel@@{%
\mkern-.1mu\copy8 %
\kern\dimen@\mkern-.2mu\copy8 %
\kern\dimen@\mkern-.3mu\copy8 %
\kern\dimen@\mkern.1mu\copy8 %
\kern\dimen@\mkern.2mu\copy8 %
\kern\dimen@\mkern.3mu\copy8 %
%\kern\dimen@\mkern.4mu\raise\pmbraise@\copy8 %
\kern\dimen@\mkern.4mu\box8 }%
}
\makeatother

\begin{document}
\fbox{
$\bm n n$
$\pmb{\mathlarger{\mathlarger{\mathsuet n}}}\, \mathlarger{\mathlarger{\mathsuet n}}$
}
\end{document}


And the output: