Search code examples
textlatextext-alignment

vertical alignment of text in latex


I am trying to create a title page and I want to include some list like this:

\begin{document}
 \centering
    {\Large \textbf{Entity 1:} \quad Some entity 1 \protect\\ 
    \textbf{Entity 2:} \quad Some entity 2 \protect\\ 
    \textbf{Slightly longer entity:} \quad Some slightly longer entity \protect\\
    \textbf{The last entity:} \quad Some entity 3 \par}
\end{document}

However this produces entire lines center-aligned. Whereas I aim to make it look like titles right-aligned and text left-aligned. I could not figure out how to do it. Any help is appreciated.


Solution

  • Use a tabular:

    \documentclass{article}
    
    \begin{document}
     \centering\Large
     \begin{tabular}{rl}
        \textbf{Entity 1:} & Some entity 1\\
        \textbf{Entity 2:} & Some entity 2 \\
        \textbf{Slightly longer entity:} & Some slightly longer entity\\
        \textbf{The last entity:} & Some entity 3\\
     \end{tabular}
     
    \end{document}
    

    enter image description here