Page LayoutProblems with the package "tcolorbox"

Information and discussion about page layout specific issues (e.g. header and footer lines, page formats, page numbers).
Post Reply
Cephal
Posts: 3
Joined: Mon May 13, 2013 9:20 pm

Problems with the package "tcolorbox"

Post by Cephal »

Hello everybody!

I have a Windows 7 Pc and I use Texniccenter with Miktex 2.9.
I would like to use the package tcolorbox. I am a beginner in Latex and I have launched the example available on CTAN which is named: tcolorbox-example.tex but I don't have a good result as you can see in te attached picture. The code is:

Code: Select all

\documentclass[a4paper,12pt,twoside]{article}
\usepackage[francais]{babel}
\usepackage[T1]{fontenc}
\usepackage[utf8]{inputenc}
\usepackage{amsmath,amssymb,mathrsfs}
\usepackage{tcolorbox}
\begin{document}
\begin{tcolorbox}
This is another \textbf{tcolorbox}. \tcblower Here, you see the lower part of the box.
\end{tcolorbox}
\end{document}
Picture of the problem
Picture of the problem
Capture.PNG (120.54 KiB) Viewed 9245 times
Thanks for your answers, Cephal.
Last edited by cgnieder on Mon May 13, 2013 9:41 pm, edited 2 times in total.

Recommended reading 2024:

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

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

Cephal
Posts: 3
Joined: Mon May 13, 2013 9:20 pm

Problems with the package "tcolorbox"

Post by Cephal »

I have the same problem with this simple code:

Code: Select all

\documentclass{article}
\usepackage{tikz,lipsum}
\usepackage[listings,theorems,skins,breakable]{tcolorbox}

\begin{document}

\begin{tcolorbox}
This is a \textbf{tcolorbox}.
\end{tcolorbox}

\end{document}
Last edited by cgnieder on Mon May 13, 2013 10:51 pm, edited 5 times in total.
Cephal
Posts: 3
Joined: Mon May 13, 2013 9:20 pm

Re: Problems with the package "tcolorbox"

Post by Cephal »

I don't understand because I have this problem only when I make the compilation latex==>DVI. When I make the compilation latex==>PS or PDF, there is no problem. Do you know why?
User avatar
cgnieder
Site Moderator
Posts: 2000
Joined: Sat Apr 16, 2011 7:27 pm

Problems with the package "tcolorbox"

Post by cgnieder »

Hi Cephal,

Welcome to the LaTeX community!
Cephal wrote:I have this problem only when I make the compilation latex==>DVI.
I don't know the internals of TikZ (which is used by tcolorbox) well enough to give you the details but you shouldn't rely on DVI output to look like you expect when using TikZ. The DVI file is correct which you will see if you convert the DVI file to PS (with dvips) and look at the PS file. Said PS file converted to PDF (with ps2pdf) also gives the correct PDF file. However, nowadays producing a PDF directly either using pdfLaTeX, XeLaTeX or LuaLaTeX is the recommend and usual way to produce a document, anyway.

Regards
site moderator & package author
Post Reply