# How can I space so that the following text can be vertically aligned

I have the following code:

\newpage
\chapter*{Notations}
Note: Some of these notations appear as a subscript in the thesis work.\bigskip

\textbf{Roman upper case letters}\\
\textit{BB}\hspace{1cm}Bollinger Band(s)

\bigskip

\textbf{Roman lower case letters}\\
\textit{n}\hspace{1cm}Number of days


Which yields the following output:

However I am trying to find an alternative to \hspace so that the output after the notation the description of notation should be vertically aligned such as:

Question: Is there any alternative approach to vertical align text after horizontal spacing?

I suggest using the glossaries package which is meant for creating such acronym lists.

A quick solution for your specific problem would be defining a new command that puts each notation symbol into a box of fixed width:

\documentclass{article}

\newcommand\notation[2]{\makebox[1cm][l]{\textit{#1}}#2}

\begin{document}
\parindent=0pt

\section*{Notations}
Note: Some of these notations appear as a subscript in the thesis work.\bigskip

\textbf{Roman upper case letters}\\
\notation{BB}{Bollinger Band(s)}

\bigskip

\textbf{Roman lower case letters}\\
\notation{n}{Number of days}

\end{document}


• thank you, I've amended a \newline command into your function \newcommand\notation[2]{\newline\makebox[1cm][l]{\textit{#1}}#2} Aug 18, 2018 at 8:51
• It should be \\* after the title, but I'd use \subsubsection*. Aug 18, 2018 at 9:21
• @egreg What is the difference \\* and \\ ? Aug 18, 2018 at 10:59
• @3kstc The former inhibits a page break. Aug 18, 2018 at 12:23

You may consider to write your lists of used notations as tables. if list are short, than is appropriate use of the tabularx package, otherwise is handy ltablex:

\documentclass{article}
\usepackage{ltablex}

\begin{document}
\section*{Notations}
Note: Some of these notations appear as a subscript in the thesis work.

\subsection*{Roman upper case letters}
\begingroup
\centering
\begin{tabularx}{\linewidth}{@{} >{\hsize=0.1\hsize\raggedright}X
>{\hsize=0.9\hsize} X
@{}}
M       &   number of days  \\
N       &   some very very very very very very very very very very very very very very very very long description what is this  \\
OO      &   number of days  \\
PPPP    &   number of days  \\
QQ      &   number of days  \\
RRR     &   number of days  \\
S       &   number of days
\end{tabularx}
\endgroup

\subsection*{Roman lower case letters}
\begingroup
\centering
\begin{tabularx}{\linewidth}{@{} >{\hsize=0.1\hsize\raggedright}X
>{\hsize=0.9\hsize} X
@{}}
n   &   number of days  \\
n   &   some very very very very very very very very very very very very very very very very long description what is this  \\
n   &   number of days  \\
n   &   number of days  \\
n   &   number of days  \\
n   &   number of days  \\
n   &   number of days
\end{tabularx}
\endgroup
\end{document}


(red lines indicate text border)