views:

186

answers:

1

Please help me in creating LaTeX document with the following structure

Text
Author

Text
Author

Where Text is a block of 2-10 lines left aligned and Author is one line aligned to the right, and I need these Text+Author blocks to always appear on the same page.

+4  A: 
  • Use \nobreak to avoid page break.
  • Use \raggedright for left alignment, { and } to restrict the effect of the macro \raggedright and empty line before }.
  • Use \hfill to shift Author to the right.


{\raggedright
Please help me in creating LaTex document with the following structure
Where Text is a block of 2--10 lines left aligned and Author is one line aligned to the right, and I need these Text+Author blocks to always appear on the same page. 

}

\nobreak
\hfill se\_pavel

{\raggedright
Please help me in creating LaTex document with the following structure
Where Text is a block of 2--10 lines left aligned and Author is one line aligned to the right, and I need these Text+Author blocks to always appear on the same page. 

}

\nobreak
\hfill se\_pavel
Alexey Malistov
That is where I was going too...and if you need to do this more than twice wrap it all up in a `\newcommand` or `\newenvironment` or equivalent.
dmckee
`\raggedright`, `\nobreak`, `\hfill` have less letters than \begin{someenviroment}...\end{someenviroment}.
Alexey Malistov
thank you, the hfill command helps me
se_pavel