0

I would like to establish a little bit more of a border between figures and the flow of text in my documents and therefore would like to introduce some graphic elements to a figure enviroment, either in the general definition or each time manually, if necessary. What would be the most advisable way of doing this?

At least, I would like to add a simple black line above and under the figure. Using a simple command like \hline prints a line, but doesn't look good and throws errors as well.

\begin{figure}%
  \begin{center}
\includegraphics[width=\columnwidth]{./2014_Gini_Index2.pdf}
    \label{fig:Gini_index}
    \caption{Gini-Masterflow}
    \vspace{7pt}
    \hline
 \end{center}
\end{figure}

Ideally, I would like to have something more sophisticated, like the one depicted below with the red rectangle and the line.

Anyways, I am also open to other example and ideas on how to emphasize figures futher!

Figure borrowed from the Economist

2 Answers 2

1

Something like this?

\documentclass[twocolumn]{article}
\usepackage{graphicx, booktabs, lipsum}

\begin{document}

\lipsum[1]
\begin{figure}[!htb]%
\centering
\begin{tabular}{@{}c@{}}
\addlinespace
\toprule
\includegraphics[width=\columnwidth]{2014_Gini_Index2}\\
\bottomrule
\end{tabular}
\caption{Gini-Masterflow}
\label{fig:Gini_index}
\end{figure}
\lipsum[1-4]

\end{document} 

enter image description here

1
  • Thanks, but most importantly, the second line should be below the caption. Plus, this wouldn't be easily adaptable to include the rectangle and coloring. Is there a way to do this with TikZ and include it in the environment?
    – Xima
    Jan 25, 2017 at 13:45
0

Ok, for now I'm quite satisfied with the following solution:

Putting ...

\newcommand\crule[3][black]{\textcolor{#1}{\rule{#2}{#3}}}

\newcommand\newfig[3]{\begin{figure}
\centering
\crule[red]{4pt}{10pt}\raisebox{9.5pt}{\crule[red]{\columnwidth-4pt}{.5pt}}
\includegraphics[width=\columnwidth]{#1}%
\caption{#2}
\crule[red]{\columnwidth-4pt}{0.5pt}\crule[red]{4pt}{10pt}
\label{#3}
\vspace{-2em}
\end{figure}%
}

in the preamble and ...

\newfig{./2014_Gini_Index2.pdf}{Overview of Gini-Indices in the World in the year of 2006 - 2011, respectively}{fig:Gini_index}

in the document body gives me this:

Result

There are still little flaws to it. Like it's a little bit high on the page it seems and the white space below does crazy stuff, but it'll do for now.

Still, any remarks are very welcome!

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .