Text Formatting ⇒ \hfill doesn't work in tabbing environment
-
- Posts: 2
- Joined: Sat Oct 03, 2009 9:26 pm
\hfill doesn't work in tabbing environment
Here is my question.
When I use \hfill in the tabbing environment, it doesn't seem to play
the role expected. In what way we can achieve the effect of \hfill in
a tabbing env? thank you.
My original problem is I want a layout as below:
Proof
--Assume A \subseteq B
----For all x \in A
------x \in C ..............................(1) %right aligned
------...
------x \in CEDF ............................(2) %right aligned
------Therefore, by (1) and (2),
----x \in C \cap CEDF .......................(3) %right aligned
----Therefore,
--A \subseteq C \cap CEDF
(Ignore --- in the begining of each line. they should be taken
as spaces. I didn't use spaces because the system automatically dels them)
I use tabbing env to implement the "tabbing" inside the proof. However,
inside tabbing env, \dotfill (or \hfill) doesn't work as expected.
Again, appreciate you answer to this question.
Clementian
NEW: TikZ book now 40% off at Amazon.com for a short time.
And: Currently, Packt sells ebooks for $4.99 each if you buy 5 of their over 1000 ebooks. If you choose only a single one, $9.99. How about combining 3 LaTeX books with Python, gnuplot, mathplotlib, Matlab, ChatGPT or other AI books? Epub and PDF. Bundle (3 books, add more for higher discount): https://packt.link/MDH5p
\hfill doesn't work in tabbing environment
E.g.:
Code: Select all
\documentclass{article}
\begin{document}
Proof:
\begin{tabbing}
XXX\=XXX\=XXX\=\kill\\
\>Assume $A \subseteq B$\\
\>\>For all $x \in A$\\
\>\>\>$x \in C$ \`(1) \\
\>\>\>\ldots\\
\>\>\>$x \in CEDF$ \`(2)\\
\>\>\>Therefore, by (1) and (2),\\
\>\>$x \in C \cap CEDF$ \`(3)\\ %right aligned
\>\>Therefore,\\
\>\>$A \subseteq C \cap CEDF$\\
\end{tabbing}
\end{document}
But, in all honestly, you'd probably be better off finding some kind of proof environment, e.g., one that automatically tags your lines, from the AMS math packages or similar.