Generaltable/figure background and border

LaTeX specific issues not fitting into one of the other forums of this category.
Post Reply
paulvanderheijden
Posts: 4
Joined: Sun Feb 17, 2008 2:34 pm

table/figure background and border

Post by paulvanderheijden »

I am working on my masters thesis. The content is pretty technical (lots of graphs and formulas), so I am really trying to keep it interesting to read by designing a fitting layout. I have a few ideas but no idea how to do it:

I'd like my figures and tables to reside in a box. Just the content and not the title and caption. My primary colors will be, say, black and blue, so I'd like this box to have a 20% blue background and on the top and bottom a 100% blue border.

How do I do this? Should I make a class for this (never done that before).

A sideline question: I am feeling pretty comfortable with the typesetting part of Latex, but I would love to have some examples of beautifully typeset (color) books with sourcecode. Any source for that?

Thanks!

Paul

Recommended reading 2024:

LaTeXguide.org • LaTeX-Cookbook.net • TikZ.org
LaTeX Beginner's Guide LaTeX Cookbook LaTeX TikZ graphics TikZによるLaTeXグラフィックス
User avatar
localghost
Site Moderator
Posts: 9201
Joined: Fri Feb 02, 2007 12:06 pm

table/figure background and border

Post by localghost »

paulvanderheijden wrote:[...] I'd like my figures and tables to reside in a box. Just the content and not the title and caption. My primary colors will be, say, black and blue, so I'd like this box to have a 20% blue background and on the top and bottom a 100% blue border. [...]
I can only offer you a partial solution using the xcolor package.

Code: Select all

\documentclass[BCOR13mm,DIV15]{scrartcl}
\usepackage[T1]{fontenc}
\usepackage[latin1]{inputenc}
\usepackage{font=small,labelfont=bf]{caption}
\usepackage{xcolor}

\begin{document}
  \begin{figure}[!ht]
    \centering
    \fcolorbox{blue}{blue!20}{
      \rule{6.4cm}{3.6cm}
    }
    \caption{A figure in a colored box}\label{fig:colorboxfig}
  \end{figure}
\end{document}

Best regards
Thorsten¹
How to make a "Minimal Example"
Board Rules
Avoidable Mistakes[/size]

¹ System: openSUSE 42.2 (Linux 4.4.52), TeX Live 2016 (vanilla), TeXworks 0.6.1
Post Reply