I have one technical text with the small figures, which must be placed on
the right side of text. I tried manny solutions /wrapfig package, table,
2 columns package, etc./ but I can't get this to work. When the picture
gets too low, it is drawn in the footer area.
So I'm starting from blank. What should I use to write text with the
following specifications:
-
Text /TEXT/ should be placed on the left side and the picture /FIG/
should be placed on the right – not up, not down and certainlly not
the next page from the TEXT – should start on the SAME page. Pictures
are small (cca. 5 cm, and the text should be in the landscape mode).
The TEXT may be one paragraph or more so it is desirable (but not
required) to stay in the left place, while figures stays on the
right. -
When the FIG gets placed too low on the page, so it gets drawn over
the bottom text margin, both TEXT and FIG should start on the next page,
while leaving empty space on the bottom of the page /no vertical
aligning/. -
The whole process of aligning must be automatic, so when I replace
picture with slightly larger one, the whole process must be handled
automatically /no manual pagebreaks and stuff/. -
The TEXT may or may not flow around the FIG, but the margins must be
rellatively small /5mm/.
How can I do that?
Best Answer
From my experience, this type of design never works well by using packages. You rather build your own code around your requirements. Here is an example with rather large figures, that illustrate some of the issues (the code is in the MWE below).
Here the text is positioned either left or right depending if the page is odd or even. as you observe the height of the text is not right. So my suggestion rather describe your requirements first visually (perhaps by lifting ideas from a book you like or an article), then see how this will work in the overall deign of the class you are using.
As you will observe from the code, the image and caption is placed within
minipages
, so effectively ensuring that it stays together. If you want them to float, enclose them inIf you want numbered captions or the captions to go to the contents, you can style them, using the
caption
package.Minor adjustments on the position of text, you can add rules (make them invisible using a zero width or add space via vspace).
Although this might appear as tedious and requiring a lot of work to set up, for a book at most you will have about 3-5 layout designs. Once you are happy you can change everything to environments or macros to make life easier.