装饰首字下沉效果

装饰首字下沉效果

我正在尝试在 latex 中创建下面示例第一段的装饰效果。我知道如何使用 lettrine 包创建首字下沉,但我不清楚如何插入跨越段落高度的装饰。此外,我非常感谢任何已知装饰包的提示。

在此处输入图片描述

答案1

也许像这样

在此处输入图片描述

\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}

答案2

有几种可能。第一种使用pgfornament。第二种只是使用 TiKZ 构造装饰物。在这两种情况下,minipage环境都用于管理放置。

饰品组合

TiKZ 构造

\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}

相关内容