Take the 2-minute tour ×
Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

I've come to love TeX's \hfil and \vfil macros, which insert a rubber space (horizontal or vertical, respectively) that can be used to shove content around on a page with respect to the margins. For example,

Some text\hfil here

produces

+------------------------------------------------------------------------------+
| Some text                                                               here |
|                                                                              |
.                                                                              .

and

Some text

\vfil

here

produces

+------------------------------------------------------------------------------+
| Some text                                                                    |
|                                                                              |
.                                                                              .
|                                                                              |
| here                                                                         |
+------------------------------------------------------------------------------+

In light of this, we all know we can't always use the tool we love the most, so I'm stuck with MS Word 2007. As I recall, the abuse of tabular environments always leads to tears, so I'd rather avoid them. Is there any actual Word analogy here?


Note that I do not mean to justify the text either vertically or horizontally (as Word understands the term 'justification') -- while the text will span the entire text area in either case, justification usually implies that the word spacing is still somewhat uniform. I need the text to maintain default spacing on either end.

share|improve this question
1  
As someone who was forced to use MS Word over LaTeX in the past, I feel strongly for your plight. +1 :) –  Breakthrough Jul 16 '13 at 14:49
    
@Breakthrough Weep with me. (Thanks for your condolences XD and for the +1 -- I think questions like this are important if there is ever to be any sort of compromise in the DTP world.) –  vermiculus Jul 16 '13 at 14:56
3  
tab stops comment. –  Raystafarian Jul 16 '13 at 14:57
    
Yeah, at least the equation editor is similar to LaTeX equation formats... As a bit of a thought experiment, I bet one could write some VBA code to effectively provide a LaTeX "console" in MS-Word, where you could simply enter commands like you outlined above, and some predefined VBA code would perform the action at the current cursor position. –  Breakthrough Jul 16 '13 at 14:57
    
@Breakthrough I've attempted something similar, but I think I'm going to move it over to C# (I don't really like VB syntax). I don't know if it could be a console though, more like a simple document converter (thinking Word plugin). But that is certainly off the topic of this questions. ;) –  vermiculus Jul 16 '13 at 15:07
show 4 more comments

2 Answers

For \hfil you can use a right tab stop.

For \vfil, the only thing I can come up with is to change the line spacing preceding the text here, but I don't think that's what you're after since you want something "flexible."

share|improve this answer
add comment

It's a kludge; but you might be able to get what you want with the \hfil by creating a 2 column layout section with text in the left column aligned left and in the right column aligned right.

The main limitation would be if you needed some of left text on one line to go past right text on a different one. In that case you'd need to put the lines in different sets of columns. If you needed to switch back and forth the repeatedly it would get ugly fast.

+------------------------------------------------------------------------------+
| Some text with "||" to indicate the column split         ||             here |
| And some more text here would need     ||    this line and the next to be in |
| a separate set of columns from the     ||                         first line |
|                                                                              |
.                                                                              .
share|improve this answer
    
Nice idea. If you ever personally have the need to do this though, take a look at @Raystafarian's now-comment --- slight abuse of tab-stops does the trick rather well. –  vermiculus Jul 17 '13 at 20:41
    
Not sure why this was down-voted. It's not quite the same semantically as \hfil, but it solves some of the same problems, with the additional advantage that you can have a whole wrapped paragraph on both sides. –  Dan Jul 23 '13 at 8:54
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.