1

I would like to combine dagger and ddagger vertically, but the result is not so good just by using the command \stackbin{ddagger}{\dagger}, could anybody help me, please? Thanks in advance.

1 Answer 1

3

By using ''newcommand'' you can define your own commands and use the \ooalign and \mathrel in conjunction you can attain what you want. Note that when using the \ooalign environment make sure to use the $$ environment to define your math symbols.

\documentclass[varwidth]{standalone}
\newcommand\newdagger{\mathrel{\ooalign{$\dagger$\cr\hidewidth$\ddagger$\hidewidth\cr}}}
\begin{document}
This is the original dagger: $\dagger$\\
This is the original double-ended dagger: $\ddagger$\\
This is the new dagger: $\newdagger$
\end{document}

to get

enter image description here

Alternatively, you can also try using \vbox to get what you need with adjustable vertical spacing as follows:

\documentclass[varwidth]{standalone}
\newcommand{\newdagger}{%
  \mathrel{\vbox{\offinterlineskip\ialign{%
    \hfil##\hfil\cr
    $\dagger$\cr
    %\noalign{\kern0ex}
    $\ddagger$\cr
}}}}
\begin{document}
This is the original dagger: $\dagger$\\
This is the original double-ended dagger: $\ddagger$\\
This is the new dagger: $\newdagger$
\end{document}

However, note that here \kern0ex is the spacing variable, use negative/positive spacing in the place of 0 to vary the vertical spacing between symbols (to make it how you want it be). An example of the output is shown here which is obtained with 0ex

enter image description here

2
  • 1
    \mathbin should be used instead of \mathrel I think. The LaTeX symbol list lists the original \dagger and \ddagger as binary operators.
    – Troy
    May 20, 2017 at 13:31
  • @Troy I am not sure either, anyway thanks for the information, I shall check into this as well :) May 20, 2017 at 15:54

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.