5

I'm trying to create the ornament effect in first paragraph of the example below in latex. I know how to use the lettrine package for creating drop caps but I'm unclear how ornaments spanning the height of the paragraph can be inserted. Also I appreciate pointers to any known ornament packages.

enter image description here

9

Something like this perhaps

enter image description here

\documentclass[twocolumn]{article}
\usepackage{graphicx}
\def\a{One two three four five six seven eight nine ten.}
\def\b{\a\a something else \a\a yet more text \a\a\a
      \a\a\a\a\a\a\a}
\begin{document}

\twocolumn[{%
\sbox0{\parbox{\dimexpr\textwidth-1cm-1em}{%
\b}}%
\raisebox{\dimexpr4pt-.5\height}{%
\includegraphics[width=1cm,height=\dimexpr\ht0+\dp0]{e.png}}%
\hspace{1em}%
\usebox0
}]
\b\b\b\b

\a\a\b\b

\end{document}
  • 1
    You like egreg very much indeed ;-) – user11232 Nov 2 '14 at 23:02
  • 1
    @HarishKumar better squashed:-) – David Carlisle Nov 2 '14 at 23:14
  • Thanks. Would there be a way to do this without referring to an ornament image and using any ornament package? – hashable Nov 4 '14 at 2:09
  • @hashable yes sure, \includegraphics can be any tex construct. If you have an ornament font and want say \symbol{123} from that font use \scalebox{!}{\dimexpr\ht0+\dp0}{\symbol{123}} instead to use the character scaled to the right size – David Carlisle Nov 4 '14 at 7:39
4

A couple of possibilities. The first uses pgfornament. The second simply constructs the ornament using TiKZ. In both cases, minipage environments are used to manage the placement.

combination of ornaments

TiKZ construction

\documentclass{book}
\usepackage{calc,pgfornament,rotating,graphicx}
\usetikzlibrary{fadings,fit,backgrounds}
\tikzfading[
  name=fade north,
  top color=transparent!100,
  bottom color=transparent!0]
\tikzfading[
  name=fade south,
  top color=transparent!0,
  bottom color=transparent!100]
\usepackage{kantlipsum}
\begin{document}
  \newlength\myparheight
  \settototalheight{\myparheight}{\parbox{.75\textwidth}{\kant[1]}}
  \chapter{First}
  \newlength\myornheight
  \settototalheight{\myornheight}{\pgfornament[width=.225\textwidth]{81}}
  \noindent
  \begin{minipage}{.225\textwidth}
    \color{gray}%
    \centering
    \vspace*{.25\myornheight}\par
    \pgfornament[width=\linewidth]{81}
    \vspace*{-.25\myornheight}\par
    \begin{sideways}
      \pgfornament[width=.425\myparheight, symmetry=h]{15}%
      \pgfornament[width=.425\myparheight, symmetry=h]{16}
    \end{sideways}%
    \begin{sideways}
      \pgfornament[width=.425\myparheight]{15}%
      \pgfornament[width=.425\myparheight]{16}
    \end{sideways}
    \vspace*{-.75\myornheight}\par
    \pgfornament[width=\linewidth]{81}
  \end{minipage}\hfill
  \begin{minipage}{.75\textwidth}
    \kant[1]
  \end{minipage}

  \chapter{Second}
  \noindent
  \begin{minipage}{.225\textwidth}
    \resizebox*{\linewidth}{\myparheight}{%
      \begin{tikzpicture}[inner sep=0pt, outer sep=0pt]
        \draw [inner color=white, outer color=black, draw opacity=.75]
          (0,0) coordinate (o) [out=75,in=-30] to (0,1) [out=-45, in=105] to cycle
          (0,0) [out=-75, in=30] to (0,-1) [out=45, in=-105] to cycle
          (0,0) [out=30, in=-120] to (.5,1) [out=-150, in=30] to cycle
          (0,0) [out=30, in=-135] to (1,1)  coordinate (ne) [out=-150, in=30] to cycle
          (0,0) [out=-30, in=120] to (.5,-1) [out=150, in=-30] to cycle
          (0,0) [out=-30, in=135] to (1,-1)  coordinate (se) [out=150, in=-30] to cycle
          (0,0) [out=20, in=-125] to (1,.67) [out=-155, in=20] to cycle
          (0,0) [out=-20, in=125] to (1,-.67) [out=155, in=-20] to cycle
          (0,0) [out=15, in=-135] to (1,.33) [out=-155, in=15] to cycle
          (0,0) [out=-15, in=135] to (1,-.33) [out=155, in=-15] to cycle
          (0,0) [out=-10, in=-175] to (1,0) [out=175, in=10] to cycle
          ;
        \begin{scope}[on background layer, inner sep=1pt]
          \node [fill=gray!85, path fading=fade north, fit={(o) (ne)}] {};
          \node [fill=gray!85, path fading=fade south, fit={(o) (se)}] {};
          \node [draw=black, draw opacity=.75, fit={(o |- ne) (se)}] {};
        \end{scope}
      \end{tikzpicture}
    }%
  \end{minipage}\hfill
  \begin{minipage}{.75\textwidth}
    \kant[1]
  \end{minipage}
\end{document}
  • Your paragraphs are much better than David's. And about the ornaments, well… – egreg Nov 3 '14 at 18:08
  • @egreg Oh, David's ornament is clearly superior but I hoped mine would be somewhat acceptable, given that the best choice had already been taken. – cfr Nov 3 '14 at 20:19

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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