1

In my document I have a huge sized text to the left and what I need is for two normal sized text lines to align them self on top of each other on the right side of the document but still on the same horizontal level as the larger text.

If there was only one text line to the right it could be done quite simply as seen with the text A, B and C.

\documentclass[10pt]{article}
\usepackage[margin=1cm]{geometry}
\setlength{\parindent}{0cm}

\begin{document}
{\Huge AAAAA \textbf{AAAAA}} 
\hfill 
BBBB: CCC CCCC\\
DDDDDD: EEEEEEEEEEE
\end{document}

But what I want is for the text D and E to be on top of the text B and C but everything should still be to the right of the text A. Although it seemed wrong to use equations I have managed to put D on top of B and have them horizontally equal to A using \left., \right. and \begin{tabular}{c} but it didn't quite work since everything was centered and I feel like it should be possible without equations.

How do I put D and E on top of B and C and if possible the beginning of the texts B and D should be aligned neatly.

1

It would help if we knew the desired alignments of the BCDE group (left and right alignments shown separately), and if there are separate alignments of BD and CE or if they are taken as groups (as done here).

\documentclass[10pt]{article}
\usepackage[margin=1cm]{geometry}
\setlength{\parindent}{0cm}
\usepackage{stackengine}
\renewcommand\stackalignment{l}
\begin{document}
{\Huge AAAAA \textbf{AAAAA}} 
\hfill 
\stackon{BBBB: CCC CCCC}{DDDDDD: EEEEEEEEEEE}
\end{document}

enter image description here

\documentclass[10pt]{article}
\usepackage[margin=1cm]{geometry}
\setlength{\parindent}{0cm}
\usepackage{stackengine}
\renewcommand\stackalignment{r}
\begin{document}
{\Huge AAAAA \textbf{AAAAA}} 
\hfill 
\stackon{BBBB: CCC CCCC}{DDDDDD: EEEEEEEEEEE}
\end{document}

enter image description here

As point of note, the BCDE group can be separated to look thus:

enter image description here

by employing two successive stacks:

{\Huge AAAAA \textbf{AAAAA}} 
\hfill 
\stackon{BBBB:}{DDDDDD:}
\stackon{CCC CCCC}{EEEEEEEEEEE}
0

This simple code does the job:

\documentclass[10pt]{article}
\usepackage[margin=1cm]{geometry}
\usepackage{linegoal}
\setlength{\parindent}{0cm}

\begin{document}

{\Huge AAAAA \textbf{AAAAA}}
\parbox[t]{\linegoal}{\raggedleft
BBBB: CCC CCCC\\
DDDDDD: EEEEEEEEEEE}

\end{document} 

enter image description here

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.