Possible Duplicate:
“Inspirational” quote at start of chapter
I'm using \documentclass[a4paper,12pt]{article}
. How to do this beautiful quote by using \renewenvironment{quote}
or having my own \newenvironment{myQuote}
?
TeX - LaTeX Stack Exchange is a question and answer site for users of TeX, LaTeX, ConTeXt, and related typesetting systems. It only takes a minute to sign up.
Sign up to join this communityPossible Duplicate:
“Inspirational” quote at start of chapter
I'm using \documentclass[a4paper,12pt]{article}
. How to do this beautiful quote by using \renewenvironment{quote}
or having my own \newenvironment{myQuote}
?
I took Gonzalo Medina's second solution in his answer to "Inspirational" quote at start of chapter and changed the following:
Instead of using the memoir
class, the epigraph
package (from memoir
s author) is loaded;
\epigraphfontsize
is replaced with \epigraphsize
;
The etoolbox
package is used to patch the internal \@epitext
command so that \itshape
works.
\documentclass{article}
\usepackage{epigraph}
% \epigraphsize{\small}% Default
\setlength\epigraphwidth{8cm}
\setlength\epigraphrule{0pt}
\usepackage{etoolbox}
\makeatletter
\patchcmd{\epigraph}{\@epitext{#1}}{\itshape\@epitext{#1}}{}{}
\makeatother
\begin{document}
\section{Graph Theory}
\epigraph{``Begin at the beginning," the King said gravely, ``and go on till you come to the end: then stop."}{--- \textup{Lewis Carroll}, Alice in Wonderland}
\end{document}
quote
environment because it might be needed for block quotes in the text body. BTW, quote
uses a width of somehat less than 100%, and in my example you may change the value of the \epigraphwidth
length.
– lockstep
Aug 5 '12 at 10:43
epigraph
package offers an epigraphs
environment where you write individual quotes using \qitem
-- have a look at the manual.
– lockstep
Aug 5 '12 at 10:54
`
to mark your inline code as I did in my edit. – Joseph Wright♦ Aug 5 '12 at 10:09