Take the 2-minute tour ×
TeX - LaTeX Stack Exchange is a question and answer site for users of TeX, LaTeX, ConTeXt, and related typesetting systems. It's 100% free, no registration required.

In traditional typesetting for books, there are often little figures called vignettes that serve as a separation between sections or subsections.

One could always include the graphics as in a figure/vector, draw it with tikz-pgf or even work a font, but I am wondering if there is any package that provides good integration with (hopefully pretty) vignettes.

If not, a good collection and instructions to put them automatically at the end of a section will be much appreciated.

Edit: Summary of answers: there is no package or way to doing that automatically, at least not touching only the preamble. The best way is to create a macro to insert the ornament and calling it wherever is needed.

share|improve this question
5  
@Victor Check out this post tex.stackexchange.com/questions/10941/free-ornaments-font –  Yiannis Lazarides Mar 2 '11 at 20:28
    
@Yiannis: Good link! I used it too at the same time in my answer. –  Stefan Kottwitz Mar 2 '11 at 20:35
    
@Yiannis Thank you very much for the link, there is not an automatic way but it seems not very difficult to integrate manually :) Still, there is a "good" way of automatically add a piece of text (in that case the figure) to the end of a section? –  Víctor Pimentel Mar 2 '11 at 20:55
    
@Victor it would be very difficult if not impossible! Only way I could think of it, is to have it typeset as en environment. If you are willing to type begin{mysection}...\end{mysection} is possible. But I think it will be more typing in the end. –  Yiannis Lazarides Mar 2 '11 at 21:24
    
@Victor see my post. –  Yiannis Lazarides Mar 2 '11 at 21:48
show 2 more comments

3 Answers

up vote 8 down vote accepted
share|improve this answer
    
Thank you for the information, still, the solution of those questions you link relays on putting the same code (or a macro you define) over and over exactly in the places you want. As I asked Yiannis, do you know a way of adding that code automatically to the end of all sections? Hopefully, without having to define a new environment to use instead of \section. –  Víctor Pimentel Mar 2 '11 at 20:59
add comment

These are called ornaments. You can define an environment and use them automatically as follows:

\documentclass[12pt]{article}
\usepackage{fourier}
\usepackage{lipsum}

\begin{document}
\newenvironment{Section}[1]
{\section{#1}}
{\vspace{12pt}\centering ------- \decofourleft\decofourright ------- \par}

\begin{Section}{Test}
\lipsum[1]
\end{Section}

\end{document}
share|improve this answer
add comment

After looking to Jiannis and Stefan answers I just decided that the best option is to do it manually with some macros. I post my "solution" to help others:

% Nice ending for sections and subsections

\newcommand*\myhrulefill{%
   \leavevmode\leaders\hrule depth-2pt height 2.4pt\hfill\kern0pt}

\newcommand\niceending[1]{%
  \begin{center}%
    \LARGE \myhrulefill \hspace{0.2cm} #1 \hspace{0.2cm} \myhrulefill%
  \end{center}}

\newcommand*\nicesectionending{\niceending{\aldineright\aldineleft}}
\newcommand*\nicesubsectionending{\niceending{\aldinesmall}}

After this is defined, I just use \nicesectionending or \nicesubsectionending wherever I want. It is not as good as done automatically but as Yiannis said, it will be more typing and very easy to mess up the code.

share|improve this answer
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.