4

I'm trying to align multiple questions below each other.

I'm using the following file.

    \documentclass[11pt]{article}


%comments
%pdflatex, bibtex, pdflatex, pdflatex


  \setlength{\droptitle}{-12cm}


\usepackage{caption}
\usepackage{subcaption}


\usepackage{siunitx}   %allows SI units by using \SI{unit} 
\usepackage{amsmath}   %allows \begin{equation} \end{equation}
\newcommand{\ee}{\mathrm{e}}

% \usepackage{mathastext} package to save yourself from having to type lots and lots of \mathrm "wrapper" statements. 

\usepackage{geometry}
\usepackage{changepage}     %allows you to widen or shorten the page width from the left or the right.

\begin{document}

\subsection{Sputtered ceramic coating on a metal substrate}
\vspace{1em}

 The following data are given for questions 1,2 and 3:

\begin{itemize}
\item {$\mathrm{E = \SI{449}{\giga\pascal}} $}
\item {$\mathrm{\alpha_{TiN} = \SI{7.6e-6}{\per\kelvin}} $}
\item {$\mathrm{\mu = \SI{852.81}{\per\centi\metre}} $}
\item {$\mathrm{\nu = 0.190 }$}
\end{itemize}

   \vspace{2em}
   \noindent 1. \begin{align*}
  sin^{2}(\psi_{0}) &= \frac{2\nu}{1 + \nu} \\
               &= \frac{2\cdot 0.190}{1+.190}\\
               &= 0.319
 \end{align*}

\vspace{1em}

\noindent 2.

\begin{align*}
\epsilon_{//} 
&= \Delta \alpha \Delta T  \\
&= (\alpha_{ss} - \alpha_{TiN}) \cdot (T_{RT} - T_{SP}) \\
&= -3.54\cdot10^{-3}
\end{align*}

\noindent \begin{align*}
 \sigma_{//} 
 &= \frac{E}{1-\nu} \epsilon_{//}  \\
 &=\SI{-1.96}{\giga\pascal}
 \end{align*}

  \end{document}

If I run this file, the equations are not aligned on the same position. I don't know how I can manage this.

8
  • 3
    please don't post disconnected fragments, post a complete document so that people can run it and see the mis-alignment. Commented Dec 31, 2015 at 11:13
  • 1
    you are using the default centred equation setting so there is no alignment between different equations specified. Commented Dec 31, 2015 at 11:14
  • Ok sorry. I did not want to put the whole Latex File on this site as it is like over 10 pages. So I only put the part in this question where it is going wrong. Thanks for the answer already. But how can I specify alignment between the different equations? Commented Dec 31, 2015 at 11:16
  • 2
    No the complete document only needs to be a couple of lines longer than the code you posted already. Add \documentclass, \begin{document} and \end[document] delete any packages not needed in the example, and check the result demonstrates the problem, then post that. Commented Dec 31, 2015 at 11:18
  • to specify alignment between different equations they all need to be in the same align but without an example hard to know. Commented Dec 31, 2015 at 11:20

2 Answers 2

7

Something like this

enter image description here

\documentclass[11pt]{article}

\usepackage{siunitx} 
\usepackage{amsmath}   %allows \begin{equation} \end{equation}
\newcommand{\ee}{\mathrm{e}}

\begin{document}

\subsection{Sputtered ceramic coating on a metal substrate}
\vspace{1em}

 The following data are given for questions 1,2 and 3:

\begin{itemize}
\item $\mathrm{E} = \SI{449}{\giga\pascal} $
\item $\alpha_{\mathrm{TiN}} = \SI{7.6e-6}{\per\kelvin} $
\item $\mu = \SI{852.81}{\per\centi\metre} $
\item $\nu = 0.190 $
\end{itemize}

\begin{enumerate}
\item
$\begin{aligned}[t]
  \sin^{2}(\psi_{0}) &= \frac{2\nu}{1 + \nu} \\
               &= \frac{2\cdot 0.190}{1+.190}\\
               &= 0.319
 \end{aligned}$


\item
$\begin{aligned}[t]
\epsilon_{//} 
&= \Delta \alpha \Delta T  \\
&= (\alpha_{ss} - \alpha_{\mathrm{TiN}}) \cdot (T_{\mathrm{RT}} - T_{\mathrm{SP}}) \\
&= -3.54\cdot10^{-3}\\
 \sigma_{//} 
 &= \frac{E}{1-\nu} \epsilon_{//}  \\
 &=\SI{-1.96}{\giga\pascal}
 \end{aligned}$
\end{enumerate}

  \end{document}

Note you should not use math italic for multi-letter words (\sin not sin but also SP and RT unless they are the product of R and T which I don't think is the case here) Also it's usually better to let latex handle the numbering rather than number things "by hand"

1
  • 1
    +1. For consistency/uniformity, I'd also write \num{-3.54e-3} instead of -3.54\cdot10^{-3}.
    – Mico
    Commented Dec 31, 2015 at 15:29
2

As I understand your question you might to obtain something like this:

enter image description here

    \documentclass[11pt]{article}
\usepackage{caption}
\usepackage{subcaption}

\usepackage{siunitx}   %allows SI units by using \SI{unit}
\usepackage{amsmath}   %allows \begin{equation} \end{equation}
\newcommand{\ee}{\mathrm{e}}

\usepackage{geometry}

    \begin{document}
\subsection{Sputtered ceramic coating on a metal substrate}
\vspace{1em}

The following data are given for questions 1,2 and 3:
    \begin{itemize}
\item {$\mathrm{E = \SI{449}{\giga\pascal}} $}
\item {$\mathrm{\alpha_{TiN} = \SI{7.6e-6}{\per\kelvin}} $}
\item {$\mathrm{\mu = \SI{852.81}{\per\centi\metre}} $}
\item {$\mathrm{\nu = 0.190 }$}
    \end{itemize}

\begin{flalign*}
1.  &&  sin^{2}(\psi_{0}) 
            & = \frac{2\nu}{1 + \nu}            &&\qquad\qquad\\
    &&      & = \frac{2\cdot 0.190}{1+.190}     &&\\
    &&      & = 0.319                           &&\\[2ex]
2.  &&  \epsilon_{//}
            & = \Delta \alpha \Delta T          &&\\
    &&      & = (\alpha_{ss} - \alpha_{TiN}) 
                        \cdot (T_{RT} - T_{SP}) &&\\
    &&      & = -3.54\cdot10^{-3}               &&\\[2ex]
3.  &&  \sigma_{//}
            & = \frac{E}{1-\nu} \epsilon_{//}   &&\\
    &&      & =\SI{-1.96}{\giga\pascal}
\end{flalign*}
    \end{document}
1
  • 1
    although it's not requested here, manual numbering removes the ability to use \label and \ref``, which \item` would permit. Commented Dec 31, 2015 at 12:15

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .