Graphics, Figures & TablesWeird textbox placement and testflow

Information and discussion about graphics, figures & tables in LaTeX documents.
Post Reply
bertibott
Posts: 14
Joined: Wed Dec 12, 2018 3:32 pm

Weird textbox placement and testflow

Post by bertibott »

Hi,
I am working on a project in which I am using tcolorbox as a sort of sidebar.

While I am already somewhat happy with the box itsself I am having trouble with how to integrate it into the document.
The box is half the width of the text, and I would the text to flow around it while placing the box itself in a somewaht sensible fashion.
The works reasonably well when the box is small enough and somewhere in the middle of the page. But when it get too close to the bottom of the page weird things happen.

https://www.dropbox.com/s/yuzdevn48lwmq ... ement?dl=0

There are some obvious things wrong here:
The box extends too far down... it should be on the next page where it should be placed on the left side.

The text on the second page should not be "flowing around" the box that isn't even there! How do I fix this?

The code I used:

Code: Select all

% In the preamble:

\usepackage{wrapfig}

\usepackage{aurical}
\usepackage[T1]{fontenc}
\newtcolorbox{lorequote}{enhanced, interior style tile={width=15cm}{parchment.png}, fontupper = \Fontskrivan, width = 0.5\textwidth}

%in the document:
\begin{wrapfigure}{o}{0.5\textwidth}
\begin{lorequote}
... interesting sideinfor...
\end{lorequote}
\end{wrapfigure}
How do I get it to place the whole thing in a more sensible way?

Recommended reading 2024:

LaTeXguide.org • LaTeX-Cookbook.net • TikZ.org

NEW: TikZ book now 40% off at Amazon.com for a short time.

thomasb
Posts: 134
Joined: Thu Aug 03, 2017 10:54 am

Weird textbox placement and testflow

Post by thomasb »

This works :

Code: Select all

\documentclass{article} 

\usepackage{wrapfig}
\usepackage{tcolorbox}
\usepackage{aurical}
\usepackage[T1]{fontenc}
\newtcolorbox{lorequote}{colback=red!5!white,colframe=red!75!black}

\begin{document}
\begin{wrapfigure}{o}{0.5\textwidth}
  \begin{lorequote}
    ... interesting sideinfor...
  \end{lorequote}
\end{wrapfigure}
\end{document}
tcolorbox_Capture d’écran_2019-05-27_14-10-52.png
tcolorbox_Capture d’écran_2019-05-27_14-10-52.png (3.59 KiB) Viewed 1769 times
Post Reply