0

The picture is too high to stay in the first column, but the remaining text spreads over the entire height of this column. The only way I've found to avoid this problem is to place an empty vbox at a certain height. This is hardly satisfactory. What's the best method?

\documentclass{scrartcl}
\usepackage{tikz}
\usepackage{multicol,lipsum}
\setlength{\columnsep}{24pt}
\setlength{\columnseprule}{0.4pt}

\begin{document} \begin{multicols*}{2}

\section{Contruction with inversion}

Let us consider the circle $\mathcal{T}$ of center $T$ point common to the circles $\mathcal{A}$ and $\mathcal{B}$ and tangent to the line $(EF)$. It intercepts the two circles at 4 points which define two lines $\mathcal{L_A}$ and $\mathcal{L_B}$ perpendicular to the line $(AB)$.

Consider the inversion of center $T$ with respect to the circle $\mathcal{T}$. The circles $\mathcal{A}$ and $\mathcal{B}$ have as inverses the lines $\mathcal{L_A}$ and $\mathcal{L_B}$.

The orange circle passing through $T$ and tangent to the circle $\mathcal{T}$ and to the line $(EF)$ is therefore tangent to the line $(EF)$. This circle is therefore tangent to the lines $\mathcal{L_A}$ and $\mathcal{L_B}$ since $(EF)$ is tangent to the circles $\mathcal{A}$ and $\mathcal{B}$.

%\vbox to 10cm{}

\begin{tikzpicture} \draw (0,0)--(7,15) (0,15)--(7,0); \end{tikzpicture}

\lipsum[2] \end{multicols*}

\end{document}

enter image description here

Alain Matthes
  • 95,075
  • Somewhat related: https://tex.stackexchange.com/questions/530084/i-want-to-wrap-text-only-above-and-below-a-figure-inside-of-a-column – John Kormylo Jan 14 '24 at 21:07
  • What the results tell, is that you need more text on the first column, moving \lipsum[2] before the picture will produce better results. The figure will then move into a more natural position. – yannisl Jan 15 '24 at 02:07
  • This particular layout will also look better as a 3 column! – yannisl Jan 15 '24 at 02:45
  • @yannisl No for your two remarks : My picture is not exactly the same. It is larger than the one proposed. It's not possible to use three columns. The text that follows the figure is also followed by a figure on the next page. I have one constraint, which is to leave the explanations on the same page as the corresponding figure. – Alain Matthes Jan 15 '24 at 06:17
  • 1
    If so then manual intervention, like you did with the vbox or a vspace* is the best. I have many similar examples in one of my documents. In the end I moved away from multicols for many of them and used two minipages (with a lot of manual adjustments) to get nice arrangements. I can also arrange different width columns this way. – yannisl Jan 15 '24 at 06:26
  • @yannisl Yes I'm thinking of using manual intervention with a vbox. I didn't succeed with vspace*. – Alain Matthes Jan 15 '24 at 08:20
  • 1
    Try this \def\vstretch#1{\vspace{\stretch{#1}}} and then \vstretch{1}\null just where you have the vbox. – yannisl Jan 15 '24 at 09:52
  • 1
    @yannisl yes this could be a solution. You can turn this comment into an answer !! – Alain Matthes Jan 15 '24 at 10:59

1 Answers1

2

This adds enough text to fill the first column, then uses my linked solution.

\documentclass{scrartcl}
\usepackage{tikz}
\usepackage{multicol,lipsum}
\setlength{\columnsep}{24pt}
\setlength{\columnseprule}{0.4pt}

\makeatletter \newcommand{\split}[2]% #1 = text, #2 = insert {\par\bgroup \setbox0=\vbox{\strut #1\strut}% measure height \sbox1{#2}% ditto \dimen0=\dimexpr \pagegoal-\pagetotal-\col@number\baselineskip\relax% fudge factor \dimen1=\pagegoal% compute height of one column \ifnum\col@number>1\relax \divide\dimen1 by \col@number \fi \advance\dimen1 by -\baselineskip% fudge factor \loop\ifdim\dimen0>\dimen1% space left in this column \advance\dimen0 by -\dimen1 \repeat \dimen1=\dimexpr \ht1+\dp1+\textfloatsep\relax% space needed for insert \ifdim\dimen1>\dimen0 \ifdim\ht0>\dimen0 \setbox2=\vsplit0 to \dimen0 \unvbox2 \noindent\box1 \vskip\textfloatsep \unvbox0 \else% entire text will fit into column \unvbox0 \vskip\textfloatsep% probably ignored \noindent\box1 \vskip\textfloatsep \fi \else% insert will fit into column \vskip\intextsep \noindent\box1 \vskip\intextsep \unvbox0 \fi \egroup\par} \makeatother

\begin{document} \begin{multicols*}{2}

\section{Contruction with inversion}

Let us consider the circle $\mathcal{T}$ of center $T$ point common to the circles $\mathcal{A}$ and $\mathcal{B}$ and tangent to the line $(EF)$. It intercepts the two circles at 4 points which define two lines $\mathcal{L_A}$ and $\mathcal{L_B}$ perpendicular to the line $(AB)$.

Consider the inversion of center $T$ with respect to the circle $\mathcal{T}$. The circles $\mathcal{A}$ and $\mathcal{B}$ have as inverses the lines $\mathcal{L_A}$ and $\mathcal{L_B}$.

The orange circle passing through $T$ and tangent to the circle $\mathcal{T}$ and to the line $(EF)$ is therefore tangent to the line $(EF)$. This circle is therefore tangent to the lines $\mathcal{L_A}$ and $\mathcal{L_B}$ since $(EF)$ is tangent to the circles $\mathcal{A}$ and $\mathcal{B}$.\strut

\split{\lipsum[2-3]}{\noindent\begin{tikzpicture} \draw (0,0)--(\columnwidth,15) (0,15)--(\columnwidth,0); \end{tikzpicture}}

\end{multicols*}

\end{document}

demo


If you like big gaps, you can use

\split{\vfill}{\noindent\begin{tikzpicture}
    \draw (0,0)--(\columnwidth,15) (0,15)--(\columnwidth,0);
\end{tikzpicture}}
John Kormylo
  • 79,712
  • 3
  • 50
  • 120