0

This code:

\documentclass{acmart}
\usepackage{fdsymbol}
\begin{document}
$\mapstochar\relbar\mathrel{\mkern-12mu}\mapsto$
\end{document}

gives this:

! Undefined control sequence.
<recently read> \mapstochar

l.4 $\mapstochar \relbar\mathrel{\mkern-12mu}\mapsto$

However, if I remove \usepackage{fdsymbol} -- it compiles just fine. What's the problem and how to solve? I do need both fdsymbol and \mapstochar

yegor256
  • 12,021
  • 1
    Why are you using fdsymbol? From the manual: “FdSymbol is a font of mathematical symbols designed as a companion to Typotheque’s Fedra family, but it might also fit well to other contemporary typefaces.” The key is “might”; actually it's visually incompatible with most other fonts. – egreg Oct 22 '22 at 21:55
  • 2
    the style contains \let\mapstochar\undefined. – Ulrike Fischer Oct 22 '22 at 21:58
  • The same happens if I use MnSymbol package... Why they all hate \mapstochar so much? :) – yegor256 Oct 23 '22 at 05:25
  • Looks like yet another case where you have to understand what the source code does and selectively copy parts of it around then. – user202729 Oct 23 '22 at 07:12
  • 1
    There are, unfortunately, too many answers that suggest to load fdsymbol or MnSymbol in order to get some new symbols. Why “unfortunately”? Because both packages provide symbols that are visually incompatible with most math fonts. – egreg Oct 23 '22 at 08:13
  • mnsymbol and fdsymbol are essentially the same, they both swap out the entire symbol collection with a different collection in different encoding. So you should not "expect" any symbol command to still work, Of course by design, as many as possible symbols are mapped to names matching amssymb, but it should be no surprise that some do not. – David Carlisle Oct 23 '22 at 08:17

1 Answers1

1

Try with the following experiment.

\documentclass{acmart}
%\usepackage{fdsymbol}

\begin{document}

%$\mapstochar\relbar\mathrel{\mkern-12mu}\mapsto$

$A\to B\otimes C$

$X\mapsto Y\cong Z$

\end{document}

enter image description here

Now uncomment the fdsymbol line and the output you get changes to

enter image description here

The situation is no better if you replace fdsymbol with MnSymbol

enter image description here

which is hardly what the copy editors at ACM would like to see. The ACM hired Boris Veytsman (who currently also serves as the president of TUG) in order to have a document class replacing the plethora of classes written in the years to satisfy the needs of that ACM journal or conference. This way the ACM is able to ensure uniformity in all of its published documents.

If I were in charge of accepting or rejecting a submission, one that has the symbols shown above would be rejected. And I don't think it would just be me.

The objection that fdsymbol provides many more symbols than amssymb is invalid. The package indeed has many symbols, but the price to have them is possible rejection of a submission, besides the document look more like a patchwork than a typographically sound piece of work.

Now, what would be your symbol with the acmart fonts? The code you use isn't really good in this case, but the following would

\documentclass{acmart}

\begin{document}

$A\mapsto B$

$A\mathrel{\mkern2mu}\mapstochar\mathrel{\mkern-2mu}\mapsto B$

\end{document}

enter image description here

This exploits the fact that \mapstochar has zero width (in the standard setting, which is followed by the Libertine math fonts). With Computer Modern the output would be

enter image description here

Now, if you really want to do the same with fdsymbol, you can't use \mapstochar, that doesn't exist. But you can handcraft it.

\documentclass{article}
\usepackage{fdsymbol}
\usepackage{trimclip}

\makeatletter \providecommand{\mapstochar}{\mathrel{\mathpalette\mapstochar@\relax}} \newcommand{\mapstochar@}[2]{% \makebox[0pt][l]{% \clipbox{0 0 {0.8\width} 0}{$\m@th#1\mapsto$}% }% } \makeatother

\newcommand{\dblmapsto}{% \mathrel{\mkern2mu}\mapstochar\mathrel{\mkern-2mu}\mapsto }

\begin{document}

$A\mapsto B$

$A\dblmapsto B$

\end{document}

enter image description here

egreg
  • 1,121,712