TeX - LaTeX Stack Exchange is a question and answer site for users of TeX, LaTeX, ConTeXt, and related typesetting systems. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I often find I need to adjust whitespace lengths in my own code. Just as an illustration, I'm in the middle of trying to insert an appropriate amount of space before the 'v's in this, to make them look 'centred'.

enter image description here

(I won't give the source code unless it's specifically requested, as I don't think it's relevant to this very general question.) My normal method is to adjust-compile-adjust-compile-adjust-compile-etc., until things look right. This can take a long time!

It occurred to me that a better method might be to produce a PDF with one copy of the relevant MWE per page, each with a different length used. Again, a picture should make this clearer than the text:

enter image description here

Of course, if you are creating this thing manually each time you need to tune a length, it is clearly not worth it. Are there any packages that would make it easy to do this?

(For what it's worth, this question is inspired by the AvsP editor for the video scripting language AviSynth; that sped up many workflows by an order of magnitude by letting you adjust parameters using sliders, rather than editing values in the script. I thought sliders were a little too much to ask for here, so this question is based on an older AviSynth technique of "animating" parameters by giving a parameter a slightly different value in each video frame.)

share|improve this question
up vote 5 down vote accepted

You seem to want to centre a v between two (decorated) boxes. The usual way is

\fbox{one}\hfill v\hfill\fbox{two}

Not sure what other hints one could give without some more context.

If you do want to experiment with lengths then stick the whole page layout in a macro so




will make 50 pages with the space increasing by 2pt each time.

share|improve this answer
I wasn't looking for an answer to that specific problem; I just meant it as an illustration. (Although the reason it's not as easy as just \hfill is that the L4/5/6/7 bulging out of the RHS tikzpictures affects the horizontal spacing.) – Mohan Jan 23 '13 at 23:16
But they bulge out by known amounts so most of the time the normal TeX way is not to require manual spacing. Of course sometimes optical effects mean you need to manually compensate just as inter-letter spacing needs kerns adding by the font designer but this doesn't really seem to be the case here. (It is possible to make an animation as you ask but I'll let one of the sites tikz experts do that, it's not really my strong point:-) – David Carlisle Jan 23 '13 at 23:23
FWIW: It's only manual in the sense that there is a macro producing the 'v', and I needed to insert a manually chosen length into the macro. Perhaps it would have been possible to compute the relevant quantity, but it was easier to fine-tune manually. But more generally, I find that a lot of my macros have lengths that I have to fine tune manually -- perhaps I chose a bad example to illustrate with. – Mohan Jan 23 '13 at 23:41
Also: I'm not requesting actual animation; just an easy way of generating a series of pictures with different values for a particular length. – Mohan Jan 23 '13 at 23:42
such a loop added to answer – David Carlisle Jan 23 '13 at 23:50

Your Answer


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.