I need to place two pieces of paper side-by-side. Each piece of paper is a printout of a compiled LaTeX document. The second document starts in an identical way to the first, but has more text inserted below. I'd like the lines/images/bullet points/table cells to line up in the parts of the document that are the same.
Here is a minimal example. The two documents are side-by-side. The one on the right starts in the same way as the one on the left. I've added some red lines to guide the eye in examining the vertical gaps in which I'm interested.
To my eye, roughly, here are the things I notice:
- The inter-line spacing in each paragraph remains roughly constant. This is what I want.
- The spacing between paragraphs on the right is slightly less than the spacing between paragraphs on the left (\parskip is set to \medskipamount). I'd like this to be the same.
- The spacing above the first item in the list on the left is very much greater than the same spacing on the right. I'd like this to be the same.
- I can't tell whether or not the spacing between items in the list is the same.
- I can't tell whether or not the spacing above/below the image is the same.
- I haven't tried a table in this example, and I'm not sure whether row height would be adjusted or not.
What I'd like to do: set all the vertical spacings so that they're the same on the left or right. As I understand it, this will involve fixing to a constant value:
- the inter-paragraph space
- the space above and below a list
- the inter-item space in a list
- the space above and below a float
- the space above and below a listing
- the space above and below an image
- the space above and below a table
- the row height in tables
- the space when starting/ending an environment (if any)
I don't know whether or not this list is exhaustive, but I think it covers all my use cases.
From what I've read, each length in LaTeX has a plus/minus amount, and I need to set this to 0 for all vertical spaces. However, I don't know the best way to achieve this, and I don't know the name of each length that I need to set, or whether there's a way to set all vertical lengths at once. Setting them all at once would be better, because it would mean that I didn't miss out any variables that I don't know about.
I know that LaTeX adjusting the spaces leads to the most typographically pleasing result in 99.99% of cases, but I really do need everything lined up for my application. This may lead to an excessively large amount of blank space at the end of a page, which I don't mind. I'd almost like to be able to control whether LaTeX splits the last paragraph on the page over the page boundary, or just moves the whole paragraph to the next page (by adjusting a penalty or the like).
I also note that the setspace package has a \setstretch command, but I don't understand fully what this does, and which lengths are set/not set.
The final option would be to allow LaTeX to adjust the spaces in the longer document as it desired, and then feed this information back into the compilation of the shorter document, so that each space is the same in this. Is there any way I could achieve this option?
I don't think this question is a duplicate, since I haven't been able to find the answer through several searches, but please point me to the original if it is and accept my apologies. It's possible that I can't find the correct search term.