3

I have the following code:

\newpage
\addcontentsline{toc}{chapter}{Notations}
\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: enter image description here

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:

enter image description here

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

0

2 Answers 2

6

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}

enter image description here

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

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}

enter image description here

(red lines indicate text border)

You must log in to answer this question.

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