# How to add a symbol at the left top corner of standalone document?

So far, here is my document (I use the stackengine package to stack my formulas).

\documentclass[border=1pt, class=scrreprt]{standalone}
\KOMAoptions{fontsize=15pt}
\usepackage{stackengine}
\pagestyle{empty}

\begin{document}
\stackunder[6pt]
{\stackunder[6pt]
{{$\displaystyle f(a+h)$}}
{{$\displaystyle =$}}
}
{{$\displaystyle \sum_{k=0}^n \frac{f^{(k)}(a)}{k!}\cdot h^k + \frac{h^{n+1}}{n!}\int_0^1 (1-t)^n f^{(n+1)}(a+th) d t$}}
\end{document}


I would like to add a star at the top left of it, is possible in a margin, like in the following picture:

On the picture, the margin is grey but I need a white margin.

Here is a possible solution with the amsmath package

\documentclass{article}

\usepackage[leqno]{amsmath}

\begin{document}

\begin{gather}
f(a+h)\tag{$\star$}\\
=\nonumber\\
\sum_{k=0}^n \frac{f^{(k)}(a)}{k!}\cdot h^k +
\frac{h^{n+1}}{n!}\int_0^1 (1-t)^n f^{(n+1)}(a+th) d t\nonumber
\end{gather}

\end{document}


And if you don't want parenthesis around the star, you can use \tag*{}:

\documentclass{article}

\usepackage[leqno]{amsmath}

\begin{document}

\begin{gather}
f(a+h)\tag*{$\star$}\\
=\nonumber\\
\sum_{k=0}^n \frac{f^{(k)}(a)}{k!}\cdot h^k +
\frac{h^{n+1}}{n!}\int_0^1 (1-t)^n f^{(n+1)}(a+th) d t\nonumber
\end{gather}

\end{document}


Finally, if you want to avoid entering \nonumber, you can instead use the * version of gather:

\documentclass{article}

\usepackage[leqno]{amsmath}

\begin{document}

\begin{gather*}
f(a+h)\tag*{$\star$}\\
=\\
\sum_{k=0}^n \frac{f^{(k)}(a)}{k!}\cdot h^k +
\frac{h^{n+1}}{n!}\int_0^1 (1-t)^n f^{(n+1)}(a+th) d t
\end{gather*}

\end{document}


With the tabular environment:

\begin{document}
\begin{tabular}{cc}
$\star$ &
\stackunder[6pt]
{\stackunder[6pt]
{{$\displaystyle f(a+h)$}}
{{$\displaystyle =$}}
}
{{$\displaystyle \sum_{k=0}^n \frac{f^{(k)}(a)}{k!}\cdot h^k + \frac{h^{n+1}}{n!}\int_0^1 (1-t)^n f^{(n+1)}(a+th) d t$}}
\end{tabular}
\end{document}


If you change the outer \stackunder into a \tabbedstackunder (using the tabstackengine package), the star can be added as a new column in the stack, of the form \tabbedstackunder{\star& ...}{&...}. Note I also employed \stackMath so that all stacked material would automatically be treated in math mode (no \$ delimiters needed).

Note the temporary patch to tabstackengine, until a newly introduced bug in the listofitems V1.4 package is remedied.

\documentclass[border=1pt, class=scrreprt]{standalone}
\KOMAoptions{fontsize=15pt}
\usepackage{tabstackengine}
\pagestyle{empty}
%%% TEMPORARY tabstackengine PATCH UNTIL listofitems V1.4 BUG GETS FIXED
\makeatletter
\usepackage{xpatch}