1

following Code:

\documentclass[11pt,
              a4paper,
              DIV=calc
            ]{scrartcl}
\usepackage[autooneside=false,automark,markcase=ignoreuppercase,headsepline,plainheadsepline]{scrlayer-scrpage}
\usepackage[left=2cm,right=2cm,top=2cm,bottom=3cm]{geometry}
\usepackage{amsmath,amssymb,amsthm}

% Zustandsgrößen
\newcommand{\uC}[1]{\mathrm{u_{C_{#1}}}}
\newcommand{\iL}{\mathrm{i_L}}
% Eingangsgrößen
\newcommand{\Uin}{\mathrm{U_{in}}}
\newcommand{\UD}[1]{\mathrm{U_{D_{#1}}}}
\newcommand{\Usboost}{\mathrm{U_{S_{boost}}}}
\newcommand{\UAC}{\mathrm{U_{AC}}}

\begin{document}
\begin{align*}
   \langle\iL\rangle = \overline{\iL}+\Delta\iL \qquad \langle\uC{1}\rangle &= \overline{\uC{1}}+\Delta\uC{1} \qquad \langle\uC{2}\rangle = \overline{\uC{2}}+\Delta\uC{2}\\
   \delta = \overline{\delta} + \Delta\delta \qquad \Uin &= \overline{\Uin} + \Delta\Uin \qquad \UAC = \overline{\UAC} + \Delta\UAC   
\end{align*}
\end{document}

produces following Output:

align-now

i would like to align every Formula around (=) just like that:

iL = x + y        uc1 = x + y       uc2 = x + y
d  = x + y        Uin = x + y       UAC = x + y

but aligning with &,&&,&&& won't work.

  • 2
    Use alignat* instead. – egreg Nov 8 at 14:29
6

If &&&'s does not work, then what am I doing wrong here?

\documentclass[11pt,
              a4paper,
              DIV=calc
            ]{scrartcl}
\usepackage[autooneside=false,automark,markcase=ignoreuppercase,headsepline,plainheadsepline]{scrlayer-scrpage}
\usepackage[left=2cm,right=2cm,top=2cm,bottom=3cm]{geometry}
\usepackage{amsmath,amssymb,amsthm}

% Zustandsgrößen
\newcommand{\uC}[1]{\mathrm{u_{C_{#1}}}}
\newcommand{\iL}{\mathrm{i_L}}
% Eingangsgrößen
\newcommand{\Uin}{\mathrm{U_{in}}}
\newcommand{\UD}[1]{\mathrm{U_{D_{#1}}}}
\newcommand{\Usboost}{\mathrm{U_{S_{boost}}}}
\newcommand{\UAC}{\mathrm{U_{AC}}}

\begin{document}
\begin{align*}
  \langle\iL\rangle &= \overline{\iL}+\Delta\iL \
  &
  \langle\uC{1}\rangle &= \overline{\uC{1}}+\Delta\uC{1}
  &
  \langle\uC{2}\rangle &= \overline{\uC{2}}+\Delta\uC{2}
  \\
  \delta &= \overline{\delta} + \Delta\delta
  &
  \Uin &=
  \overline{\Uin} + \Delta\Uin
  &
  \UAC &= \overline{\UAC} + \Delta\UAC
\end{align*}
\end{document}

You need one & per alignment, and one & to separate each alignment column. In this case 2x3-1 = 5 &'s

  • @adaptive in an ideal world we'd have one symbol for the alignment marker and a different for the "separate alignments" marker. – daleif Nov 8 at 14:53

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.