Lets have simple \pbox
example like this:
\documentclass[twoside]{book}
\usepackage{pbox, calc}
\begin{document}
\noindent\fbox{\pbox{\textwidth}{Some text\\Text}}
\end{document}
Here is printed result:
I want that Text
on second line to be alighned right. I tried to adjust previous code so that it reads:
\documentclass[twoside]{book}
\usepackage{pbox, calc}
\begin{document}
\noindent\fbox{\pbox{\textwidth}{\begin{flushright}Some text\\Text\end{flushright}}}
\end{document}
When trying to compile it I'm getting following error:
! LaTeX Error: Something's wrong--perhaps a missing \item.
Even with the error there is still some output but it is not entirely correct (too big box margins):
How can I correctly right align content of pbox
?
Best Answer