8

I want to create tags for equations as sequential asterisks

            a+b=c                                   (∗)
            x+y=z                                   (⁑)
            i+j=k                                   (⁂)

How would you typeset them?

3 Answers 3

13

For the numbering with asterisks you have in mind, you can define it without \substack that doesn't seem to be the best tool.

\documentclass{article}
\usepackage{amsmath}

\makeatletter
\newcommand{\stars}{}% just for safety
\DeclareRobustCommand{\stars}[1]{\stars@{#1}}
\newcommand{\stars@}[1]{%
  \ifcase#1\relax\or\stars@one\or\stars@two\or\stars@three\or\stars@four
  \else ??\fi
}
\newcommand{\stars@char}{$\scriptstyle*$}
\newcommand{\stars@base}[1]{%
  $\m@th\vcenter{\offinterlineskip\ialign{\hfil##\hfil\cr#1\crcr}}$%
}
\newcommand{\stars@one}{%
  \stars@base{\stars@char}%
}
\newcommand{\stars@two}{%
  \stars@base{\stars@char\cr\stars@char}%
}
\newcommand{\stars@three}{%
  \stars@base{\stars@char\cr\stars@char\stars@char}%
}
\newcommand{\stars@four}{%
  \stars@base{\stars@char\stars@char\cr\stars@char\stars@char}%
}
\makeatother

\begin{document}

\begin{gather}
p+q=w \\
a+b=c \label{eq:1} \tag{\stars{1}} \\
x=y   \label{eq:2} \tag{\stars{2}} \\
x=y   \label{eq:3} \tag{\stars{3}} \\
x=y   \label{eq:4} \tag{\stars{4}}
\end{gather}

Text \eqref{eq:1} and \eqref{eq:2} and \eqref{eq:3} and \eqref{eq:4}

\end{document}

enter image description here

6

Unfortunately, the character ⁂ (U+2042) is not declared in the MathClass.txt file, so it is missing in almost all Unicode math fonts. But the character ⁑ (U+2051) is present here and there are Unicode math fonts they include it, for example STIXMath-Regular.otf. My example uses this font and defines ⁂ as active character equivalent to the macro \threeasts which is defined by \halign and completes these three *.

The example uses OpTeX:

\loadmath{[stixmath-regular]}
\fontfam[termes]

\def\threeasts{\vcenter{\offinterlineskip\halign{\hfil##\hfil\cr$*$\cr$**$\cr}}}
\catcode`⁂ = 13 \let ⁂ = \threeasts

$$
  a + b = c \eqno (*)
$$
$$
  x + y = z \eqno (⁑)
$$
$$
  i + j = k \eqno (⁂)
$$

\bye
 
2

Here is a simplification of egreg’s great answer that uses the Unicode characters: It works in LuaLaTeX or XeLaTeX.

\documentclass{article}
\tracinglostchars=3 % Make it an error if a glyph is missing.
\usepackage[default]{fontsetup} % Load unicode-math and New Computer Modern

\newfontfamily\symbolfont{DejaVu Serif}[Scale=MatchUppercase]

\newcommand\texttwostars{{\symbolfont\symbol{"2051}}} % ⁑
\newcommand\textthreestars{{\symbolfont\symbol{"2042}}} % ⁂
\newcommand\textdoublequestion{{\symbolfont\symbol{"2047}}} % ⁇

\newcommand{\stars}[1]{%
  \ifcase#1\relax\or\textasteriskcentered\or\texttwostars\or\textthreestars
  \else\textdoublequestion\fi}

\begin{document}
\begin{gather}
p+q=w \\
a+b=c \label{eq:1} \tag{\stars{1}} \\
x=y   \label{eq:2} \tag{\stars{2}} \\
x=y   \label{eq:3} \tag{\stars{3}}
\end{gather}
\end{document}

New Computer Modern + DejaVu Serif sample

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.