2

I want to have the following text alignment and I don't want to use any "two column" and table because an environment I use doesn't support them. :(

The text format looks like the picture below. Basically I want to split a line in the middle, and for a line of text there will be 2 parts: the 1st part is on the left and the 2nd part is on the right. However, there are some lines which have long text and I don't want to split them to two parts, thus they will not split.

Thanks a lot for help!

enter image description here

  • Take a look into the tabbing environment. – Daniel Feb 19 '13 at 15:27
  • What do you mean by "the environment I use doesn't support them"? Any LaTeX system supports the tabular environment. – egreg Feb 19 '13 at 15:27
  • It's a non-official package which support traditional chineses note (known as warichu). The package can be found here: code.google.com/p/gezhu. – Coeus Wang Feb 19 '13 at 15:40
  • It looks tabbing environment also not support. :( – Coeus Wang Feb 19 '13 at 15:44
2

You can define a command that manually puts its first argument into the "left column" and the second argument into the "right column.

output

\documentclass{article}
\newcommand*\leftright[2]{%
  \leavevmode
  \rlap{#1}%
  \hspace{0.5\linewidth}%
  #2}
\begin{document}
\leftright{first line part 1}{first line part 2} \par
A longer line that isn't split in two columns \par
\leftright{third line part 1}{third line part 2}
\end{document}
  • Thanks a lot. Though I can't directly use your solution, but this inspire me. :) I have solve this by only apply this changes to main contents. – Coeus Wang Feb 20 '13 at 3:15

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.