
Onde posso encontrar o separador decorativo retratado aqui?
Quero adicioná-lo ao título do capítulo (quase completo) abaixo. Nota: o programa que utilizo (Latexian) possui os pacotes mais comuns instalados, mas não permite carregar novos (até onde eu sei). Por exemplo, não posso usar pgfornaments.
\documentclass{report}
\makeatletter
\def\@makechapterhead#1{%
\vspace*{-5em}% Space above number
{\parindent \z@ \normalfont
\interlinepenalty\@M
\LARGE\centering \textbf{\itshape\thechapter}%
\par\vspace{0.5em}% Space between number and title
{\LARGE\itshape#1}%
\par\vspace{4em}% Space between title and text
}}
\makeatother
\begin{document}
\chapter{Chapter title}
\end{document}
Responder1
A sua escolha de editor não afeta os pacotes que você pode instalar. Você pode atualizar sua distribuição TeX, instalar pacotes, classes e fontes adicionais e criar seus próprios, independentemente do seu editor. Isto é, seu editor não impede você de usar pgfornaments
e presumo que nada mais o faça, então se você gosta de suas decorações, certamente deve instalá-lo e usá-lo.
decorule
oferece uma regra decorativa e ampliada que não depende da instalação de ornamentos ou fontes adicionais. Em vez disso, ele cria a regra a partir de um personagem incluído em todas as distribuições do TeX. No entanto, os resultados são previsivelmente um pouco menos satisfatórios do que uma decoração tipográfica adequada poderia ser.
\documentclass{report}
\makeatletter
\def\@makechapterhead#1{%
\vspace*{-5em}% Space above number
{\parindent \z@ \normalfont
\interlinepenalty\@M
\LARGE\centering \textbf{\itshape\thechapter}%
\decorule
\par\vspace{0.5em}% Space between number and title
{\LARGE\itshape#1}%
\par\vspace{4em}% Space between title and text
}}
\makeatother
\usepackage{decorule}
\begin{document}
\chapter{Chapter title}
\end{document}
Ou você poderia tentar swrule
. Novamente, nenhum material especial precisa ser instalado. No entanto, nunca consegui produzir resultados satisfatórios:
\documentclass{report}
\makeatletter
\def\@makechapterhead#1{%
\vspace*{-5em}% Space above number
{\parindent \z@ \normalfont
\interlinepenalty\@M
\LARGE\centering \textbf{\itshape\thechapter}%
\par\vspace{0.25em}% Space between number and title
\mbox{}\swrulex{.3\textwidth}{.25pt}{3.5pt}
\par\vspace{0.25em}% Space between number and title
{\LARGE\itshape#1}%
\par\vspace{4em}% Space between title and text
}}
\makeatother
\usepackage{swrule}
\begin{document}
\chapter{Chapter title}
\end{document}
Se você não se importa com a sobrecarga, você sempre pode desenhar um:
\documentclass{report}
\usepackage{tikz}
\newsavebox{\myrule}
\sbox{\myrule}{\tikz {\path [fill, draw] (0,0) [out=0, in=180] to +(.125\textwidth,1pt) [out=0, in=180] to +(.125\textwidth,-1pt) [out=180, in=0] to +(-.125\textwidth,-1pt) [out=180, in=0] to cycle;}}
\makeatletter
\def\@makechapterhead#1{%
\vspace*{-5em}% Space above number
{\parindent \z@ \normalfont
\interlinepenalty\@M
\LARGE\centering \textbf{\itshape\thechapter}%
\par\vspace{0.25em}% Space between number and title
\usebox{\myrule}%
\par\vspace{0.25em}% Space between number and title
{\LARGE\itshape#1}%
\par\vspace{4em}% Space between title and text
}}
\makeatother
\begin{document}
\chapter{Chapter title}
\end{document}
A vantagem de criar \myrule
uma caixa é que a imagem TikZ só precisa ser renderizada uma vez para o documento, independentemente de quantas vezes for usada. Se, no entanto, você quiser alterar o comprimento da regra dentro do documento, um comando funcionará melhor:
\documentclass{report}
\usepackage{tikz}
\newcommand*\myrule[1][.25\textwidth]{%
\tikz {\path [fill, draw] (0,0) [out=0, in=180] to +(.5*#1,1pt) [out=0, in=180] to +(.5*#1,-1pt) [out=180, in=0] to +(-.5*#1,-1pt) [out=180, in=0] to cycle;}}
\makeatletter
\def\@makechapterhead#1{%
\vspace*{-5em}% Space above number
{\parindent \z@ \normalfont
\interlinepenalty\@M
\LARGE\centering \textbf{\itshape\thechapter}%
\par\vspace{0.25em}% Space between number and title
\myrule%
\par\vspace{0.25em}% Space between number and title
{\LARGE\itshape#1}%
\par\vspace{4em}% Space between title and text
}}
\makeatother
\begin{document}
\chapter{Chapter title}
\end{document}
Aqui, \myrule
é .25\textwidth
o padrão, mas \myrule[some length]
substituirá esse padrão. Por exemplo, \myrule[.1\textwidth]
produziria
Isto pode então ser adaptado para permitir alterar o comprimento conforme apropriado no documento:
\documentclass{report}
\usepackage{tikz}
\newcommand*\myrule[1][.25\textwidth]{%
\tikz {\path [fill, draw] (0,0) [out=0, in=180] to +(.5*#1,1pt) [out=0, in=180] to +(.5*#1,-1pt) [out=180, in=0] to +(-.5*#1,-1pt) [out=180, in=0] to cycle;}}
\newlength\myrulelength
\setlength{\myrulelength}{.1\textwidth}
\makeatletter
\def\@makechapterhead#1{%
\vspace*{-5em}% Space above number
{\parindent \z@ \normalfont
\interlinepenalty\@M
\LARGE\centering \textbf{\itshape\thechapter}%
\par\vspace{0.25em}% Space between number and title
\myrule[\myrulelength]%
\par\vspace{0.25em}% Space between number and title
{\LARGE\itshape#1}%
\par\vspace{4em}% Space between title and text
}}
\makeatother
\begin{document}
\let\clearpage\relax% only for testing!
\chapter{Chapter title}
\setlength\myrulelength{.2\textwidth}
\chapter{Another chapter title}
\end{document}
Para que o comprimento se adapte automaticamente dependendo do comprimento do título do capítulo, você pode tentar o seguinte:
\documentclass{report}
\usepackage{tikz}
\newcommand*\myrule[1][.25\textwidth]{%
\tikz {\path [fill, draw] (0,0) [out=0, in=180] to +(.5*#1,1pt) [out=0, in=180] to +(.5*#1,-1pt) [out=180, in=0] to +(-.5*#1,-1pt) [out=180, in=0] to cycle;}}
\newlength\myrulelength
\setlength{\myrulelength}{.1\textwidth}
\makeatletter
\def\@makechapterhead#1{%
\vspace*{-5em}% Space above number
{\parindent \z@ \normalfont
\interlinepenalty\@M
\LARGE\centering \textbf{\itshape\thechapter}%
\settowidth{\myrulelength}{\LARGE\itshape#1}%
\par\vspace{0.25em}% Space between number and title
\myrule[.8\myrulelength]%
\par\vspace{0.25em}% Space between number and title
{\LARGE\itshape#1}%
\par\vspace{4em}% Space between title and text
}}
\makeatother
\begin{document}
\let\clearpage\relax% only for testing!
\chapter{Chapter title}
\chapter{Another chapter title}
\end{document}