LaTeX forum ⇒ Graphics, Figures & TablesWeird textbox placement and testflow

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

Weird textbox placement and testflow

Postby bertibott » Wed Mar 06, 2019 3:49 pm

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/yuzdevn48lwmqie/Weird_placement?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:

  1. % In the preamble:
  2.  
  3. \usepackage{wrapfig}
  4.  
  5. \usepackage{aurical}
  6. \usepackage[T1]{fontenc}
  7. \newtcolorbox{lorequote}{enhanced, interior style tile={width=15cm}{parchment.png}, fontupper = \Fontskrivan, width = 0.5\textwidth}
  8.  
  9. %in the document:
  10. \begin{wrapfigure}{o}{0.5\textwidth}
  11. \begin{lorequote}
  12. ... interesting sideinfor...
  13. \end{lorequote}
  14. \end{wrapfigure}


How do I get it to place the whole thing in a more sensible way?

User avatar
thomasb
Posts: 132
Joined: Thu Aug 03, 2017 10:54 am

Postby thomasb » Mon May 27, 2019 2:12 pm

This works :
  1. \documentclass{article}
  2.  
  3. \usepackage{wrapfig}
  4. \usepackage{tcolorbox}
  5. \usepackage{aurical}
  6. \usepackage[T1]{fontenc}
  7. \newtcolorbox{lorequote}{colback=red!5!white,colframe=red!75!black}
  8.  
  9. \begin{document}
  10. \begin{wrapfigure}{o}{0.5\textwidth}
  11. \begin{lorequote}
  12. ... interesting sideinfor...
  13. \end{lorequote}
  14. \end{wrapfigure}
  15. \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 116 times


Return to “Graphics, Figures & Tables”

Who is online

Users browsing this forum: No registered users and 1 guest