3

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}

enter image description here

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

enter image description here

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

4

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}

enter image description here

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}

enter image description here

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}

enter image description here

3

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}

enter image description here

1

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}
\xpatchcmd{\@TABstackonunder}{\readTABstack}{\expandafter\readTABstack\expandafter}{}{}
\makeatother
%%%
\stackMath
\begin{document}

\tabbedstackunder[6pt]
    {\star &\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}

enter image description here

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.