I recall seeing a package to make quotes like that of the following image at the start of a chapter, but I can't seem to find it again.
(This image is from the book Combinatorics and Graph Theory by Harris, Hirst, and Mossinghoff)
I recall seeing a package to make quotes like that of the following image at the start of a chapter, but I can't seem to find it again.
(This image is from the book Combinatorics and Graph Theory by Harris, Hirst, and Mossinghoff)
I think it is the package epigraph
and is included in both TeX Live and MiKTeX distributions.
\documentclass{book}
\usepackage{epigraph}
\begin{document}
\chapter{First Chapter}
\epigraph{I recall seeing a package to make quotes}{Snowball}
\end{document}
The memoir
document class offers "out of the box" commands \chapterprecis
, \chapterprecishere
, and \chapterprecistoc
:
\documentclass{memoir}
\begin{document}
\chapter{Graph Theory}
\chapterprecishere{``Begin at the beginning,¨ the King said gravely, ``and
go on till you come to the end: then stop."\par\raggedleft--- \textup{Lewis
Carroll}, Alice in Wonderland}
\end{document}
As Brent.Longborough mentions in his comment, memoir
also offers an \epigraph
command and an epigraph
environment:
\documentclass{memoir}
\epigraphfontsize{\small\itshape}
\setlength\epigraphwidth{8cm}
\setlength\epigraphrule{0pt}
\begin{document}
\chapter{Graph Theory}
\epigraphfontsize{\small\itshape}
\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}
memoir
also offers the \epigraph
command, as well as the epigraphs environment. Putting on my semantic pedant's hat, this case (and the OP's intent) is, I think, strictly an epigraph; a chapter précis is meant to be an additional information key, rather than amusement.
Commented
Apr 26, 2012 at 10:42
\epigraph
; thank you.
Commented
Apr 26, 2012 at 12:04
\epigraph
and \chapterprecis
is that by default the latter appears in the table of contents as well as in the chapter. This may or may not be what you want.
Commented
Nov 8, 2016 at 3:13
You can also do it yourself:
\documentclass{book}
\makeatletter
\renewcommand{\@chapapp}{}% Not necessary...
\newenvironment{chapquote}[2][2em]
{\setlength{\@tempdima}{#1}%
\def\chapquote@author{#2}%
\parshape 1 \@tempdima \dimexpr\textwidth-2\@tempdima\relax%
\itshape}
{\par\normalfont\hfill--\ \chapquote@author\hspace*{\@tempdima}\par\bigskip}
\makeatother
\begin{document}
\chapter{Graph Theory}
\begin{chapquote}{Lewis Carroll, \textit{Alice in Wonderland}}
``Begin at the beginning,'' the King said, gravely, ``and go on till you
come to an end; then stop.''
\end{chapquote}
\noindent The Pregolya River passes through the city once known as K\"onigsberg. In the 1700s
seven bridges were situated across this river in a manner similar to what you see
in Figure \ldots
\end{document}
The above MWE provides the chapquote
environment that takes one argument - the author of the quote. It indents the quote by 2em (default), but that can also be changed via an optional argument:
\begin{chapquote}[30pt]{author}
%... your quote
\end{chapquote}
The default setting is in \itshape
, with a right-aligned "author".
\parshape
. In those instances, the adjustwidth
environment (from changepage
) would be more appropriate. Regarding the alignment: All things are subject to change, based on the OP's requirement. For example, one could box the content to check for line length and issue \par
conditionally. Regardless, this provides one means to do it.
Since it hasn't been mentioned before: KOMA-Script also has built-in possibilities for this. There are two main commands of interest here. First
\setchapterpreamble[<position>][<width>]{<preamble>}
where position is determined by one or two letters, o
(above the chapter) or u
(below the chapter) and l
,c
or r
(left-aligned, centered or right-aligned). It allows to put arbitrary stuff before or after the next chapter title without shifting the chapter title itself.
The second command is
\dictum[<author>]{<quote>}
which sets the quote and can be used anywhere in the document.
The default settings look like this:
\documentclass{scrbook}
\usepackage[T1]{fontenc}
\begin{document}
\setchapterpreamble{%
\dictum[Lewis Carroll, \textit{Alice in Wonderland}]{%
``Begin at the beginning,'' the King said, gravely, ``and go on till you
come to an end; then stop.''}}
\chapter{Graph Theory}
The Pregolya River passes through the city once known as K\"onigsberg. In the 1700s
seven bridges were situated across this river in a manner similar to what you see
in Figure \ldots
\end{document}
They can be customized by a series of options and commands to obtain a similar output like in the picture of the question:
\documentclass{scrbook}
\usepackage[T1]{fontenc}
% customize chapter format:
\KOMAoption{headings}{twolinechapter}
\renewcommand*\chapterformat{\thechapter\autodot}
% customize dictum format:
\setkomafont{dictumtext}{\itshape\small}
\setkomafont{dictumauthor}{\normalfont}
\renewcommand*\dictumwidth{\linewidth}
\renewcommand*\dictumauthorformat[1]{--- #1}
\renewcommand*\dictumrule{}
\begin{document}
\setchapterpreamble[uc][.75\textwidth]{%
\dictum[Lewis Carroll, \textit{Alice in Wonderland}]{%
``Begin at the beginning,'' the King said, gravely, ``and go on till you
come to an end; then stop.''}\vskip1em}
\chapter{Graph Theory}
The Pregolya River passes through the city once known as K\"onigsberg. In the 1700s
seven bridges were situated across this river in a manner similar to what you see
in Figure \ldots
\end{document}
\renewcommand*\dictumauthorformat[1]{--- #1\par}
and can now skip \vskip1em
. Thanks!
For the sake of completeness, I provide the following. It might be your alternate.
\documentclass{book}
\usepackage{quotchap}
\begin{document}
\begin{savequote}[0.55\linewidth]
``Don't give up on your dreams, keep on sleeping.''
\qauthor{Higgs Boson (2012 -- present)}
``Stick together team and hold this position!''
\qauthor{Counter Terrorist (1999 -- present)}
\end{savequote}
\chapter{Introduction}
\end{document}
``If you're an underdog, mentally disabled, physically disabled, if you don't fit in, if you're not as pretty as the others, you can still be a hero, read \TeX Book!''
\qauthor{Bug Buster (2014 -- present)}
``Motivation isn't enough. If you've an idiot and you motivate him, now you've a motivated idiot.''
\qauthor{Stiff Jokes (2014 -- present)}
``Learning (La)\TeX, PSTricks, and PGF/TikZ is similar to learning how to swim or drive a car. You don’t get the full benefit by watching someone else do it. Your own fingers must get involved.''
\qauthor{Donut E. Knot (2014 -- present)}
``Don't be lukewarm! If you cannot be the best, be the worst!''
\qauthor{Code Mocker (2014 -- present)}
``Beauty without intelligence is a masterpiece painted on a toilet paper.''
\qauthor{The Last Error (2014 -- present)}
``For every problem, there is always a solution that is simple, neat, but wrong.''
\qauthor{Weirdstress Function (2014 -- present)}
\usepackage{quotchap}
made it look like this for me.
An adaptation of a piece of code found on line but I do not remember where exactly.
\documentclass[11pt]{book}
%%%%********************************************************************
\usepackage{microtype}
\usepackage{times}
\usepackage[utf8]{inputenc}
\usepackage[english]{babel}
\usepackage{graphicx}
\usepackage{xcolor}
\usepackage{lipsum}
%%%%********************************************************************
% fancy quotes
\definecolor{quotemark}{gray}{0.7}
\makeatletter
\def\fquote{%
\@ifnextchar[{\fquote@i}{\fquote@i[]}%]
}%
\def\fquote@i[#1]{%
\def\tempa{#1}%
\@ifnextchar[{\fquote@ii}{\fquote@ii[]}%]
}%
\def\fquote@ii[#1]{%
\def\tempb{#1}%
\@ifnextchar[{\fquote@iii}{\fquote@iii[]}%]
}%
\def\fquote@iii[#1]{%
\def\tempc{#1}%
\vspace{1em}%
\noindent%
\begin{list}{}{%
\setlength{\leftmargin}{0.1\textwidth}%
\setlength{\rightmargin}{0.1\textwidth}%
}%
\item[]%
\begin{picture}(0,0)%
\put(-15,-5){\makebox(0,0){\scalebox{3}{\textcolor{quotemark}{``}}}}%
\end{picture}%
\begingroup\itshape}%
%%%%********************************************************************
\def\endfquote{%
\endgroup\par%
\makebox[0pt][l]{%
\hspace{0.8\textwidth}%
\begin{picture}(0,0)(0,0)%
\put(15,15){\makebox(0,0){%
\scalebox{3}{\color{quotemark}''}}}%
\end{picture}}%
\ifx\tempa\empty%
\else%
\ifx\tempc\empty%
\hfill\rule{100pt}{0.5pt}\\\mbox{}\hfill\tempa,\ \emph{\tempb}%
\else%
\hfill\rule{100pt}{0.5pt}\\\mbox{}\hfill\tempa,\ \emph{\tempb},\ \tempc%
\fi\fi\par%
\vspace{0.5em}%
\end{list}%
}%
\makeatother
%%%%********************************************************************
\begin{document}
\chapter{Graph theory}
\begin{fquote}[Lewis Carroll][Alice in Wonderland][1899]Begin at the beginning,'' the King said, gravely, ``and go on till you come to an end; then stop.
\end{fquote}
\lipsum[2]
\begin{fquote}[Lewis Carroll][Alice in Wonderland][1899]Begin at the beginning,'' the King said, gravely, ``and go on till you come to an end; then stop.
\end{fquote}
\lipsum[2]
\end{document}
\hfill
right before the \begin{picture}(0,0)%
which follows \item[]%
. for the separating line, you can comment with a %
the two lines starting with \hfill\rule{100pt}{0.5pt}
. Ok?
And if you want to do yourself something very basic, just define a new command:
\documentclass{book}
\newcommand{\chapquote}[3]{\begin{quotation} \textit{#1} \end{quotation} \begin{flushright} - #2, \textit{#3}\end{flushright} }
\begin{document}
\chapter{First Chapter}
\chapquote{``Begin at the beginning,¨ the King said gravely, ``and go on till you come to the end: then stop."}{Lewis Carroll}{Alice in Wonderland}
\end{document}
quotation
paragraph allows paragraph breaks, and some users may therefore be tempted to provide a two-paragraph inspirational quote, you may want to use {\itshape#1}
instead of \textit{#1}
, as \textit
does not permit paragraph breaks in its scope.
You can gain a finer control of the epigraph and chapter heading by the following package.
\begin{filecontents}{chapterhead.sty}
\NeedsTeXFormat{LaTeX2e}[2005/12/01]
\ProvidesPackage{chapterhead}[2012/07/16 v0.0.1 Chapter head and epigraph (AM)]
\RequirePackage{xkeyval}
\RequirePackage{catoptions}
\new@def\chd@alltoendif#1\endif{#1}
\new@def\chd@firsttoendif#1#2\endif{#1}
\new@def*\chdifnumcmpTF#1#2#3{\ifnumcmpTF#1#2{#3}}
% \chdifchoice can be used to define choice keys via command keys:
\new@def*\chdifchoice{\chdifcase\ifstrcmpTF}
\new@def*\chdifcase#1#2{%
\ifstrcmpTF{#1}\ifnone{%
\chd@alltoendif
}{%
\ifstrcmpTF{#1}\endif{}{%
\ifstrcmpTF{#2}\ifnone{%
\chd@alltoendif
}{%
\ifstrcmpTF{#2}\endif{}{\chd@ifcase{#1}{#2}}%
}%
}%
}%
}
\new@def*\chd@ifcase#1#2#3{%
\ifstrcmpTF{#3}\ifnone{%
\chd@alltoendif
}{%
\ifstrcmpTF{#3}\endif{}{%
#1{#2}{#3}\chd@firsttoendif{\chd@ifcase@i{#1}{#2}}%
}%
}%
}
\new@def*\chd@ifcase@i#1#2#3{\chd@ifcase{#1}{#2}}
\define@cmdkey[DKV]{definekeys}[defkey@]{prefix}[KV]{}
\define@cmdkey[DKV]{definekeys}[defkey@]{family}{}
\define@cmdkey[DKV]{definekeys}[defkey@]{holder prefix}[mp@]{}
\define@boolkey[DKV]{definekeys}[defkey@]{initialize}[true]{}
\define@boolkey[DKV]{definekeys}[defkey@]{preset}[true]{}
% Keys not specified in the optional argument of \chddefinekeys will
% get default values:
\presetkeys[DKV]{definekeys}{prefix,family,holder prefix,
initialize=false,preset=false}{}
\robust@def*\chddefinekeys{\@testopt\chd@definekeys{}}
\new@def*\chd@definekeys[#1]#2{%
\setkeys[DKV]{definekeys}{#1}%
\def\defkey@defaultlist{}%
\edef\reserved@a{\cptcommanormalize{#2}}%
\expandafter\defkey@loop\reserved@a,\defkey@nil,%
\ifboolTF{defkey@preset}{%
\cptexpanded{\noexpand\presetkeys
[\defkey@prefix]{\defkey@family}{\expandcsonce\defkey@defaultlist}{}%
}%
}{}%
\ifboolTF{defkey@initialize}{%
\cptexpanded{\noexpand\setkeys
[\defkey@prefix]{\defkey@family}{\expandcsonce\defkey@defaultlist}%
}%
}{}%
}
\begingroup
\lccode`\&=1 \catcode`\&=7
\lowercase{\endgroup
\new@def*\chd@rejecttoks{&}%
\new@def*\defkey@loop#1,{%
\def\reserved@a{\defkey@nil}%
\edef\reserved@b{\cpttrimspace{#1}}%
\ifx\reserved@a\reserved@b\expandafter\@gobble\else\expandafter\@iden\fi
{\defkey@splitatslash#1/&/&/&/&/&/&/&/\defkey@nil\defkey@loop}%
}
}
\new@def*\chd@cmprejecttoks#1{\ifx#1\chd@rejecttoks\else\expandcsonce#1\fi}
\new@def*\defkey@splitatslash#1/#2/#3/#4/#5/#6/#7/#8/#9\defkey@nil{%
\edef\keytype{\cpttrimspace{#1}}%
\edef\keyname{\cpttrimspace{#2}}%
\edef\keydefault{\cpttrimspace{#3}}%
\edef\keycode{\cpttrimspace{#4}}%
\ifx\keyname\chd@rejecttoks
\@latexerr{Empty key name}\@ehd
\fi
\def\reserved@a##1{%
\def\reserved@a####1##1####2####3\@nil{%
\def\reserved@a{####2}%
}%
\reserved@a cmd{0}bool{1}\@nil
}%
\expandafter\reserved@a\expandafter{\keytype}%
\ifcase\reserved@a\relax
\let\reserved@a\define@cmdkey
\or
\xifinsetTF{,\cptoxdetok\keydefault,}{,\detokenize{true,false},}{%
\let\reserved@a\define@boolkey
}{%
\@latexerr{Illegal default value '\cptoxdetok\keydefault'
\MessageBreak for bool key '\keyname'}\@ehd
}%
\else
\@latexerr{Illegal key type '#1'}\@ehd
\fi
\cptexpanded{\noexpand\reserved@a
[\defkey@prefix]{\defkey@family}[\usecsn{defkey@holder prefix}]%
{\chd@cmprejecttoks\keyname}%
\ifx\keydefault\chd@rejecttoks\else[\expandcsonce\keydefault]\fi
{\chd@cmprejecttoks\keycode}%
}%
\edef\defkey@defaultlist{%
\ifx\defkey@defaultlist\@empty\else\expandcsonce\defkey@defaultlist,\fi
\keyname
\ifx\keydefault\chd@rejecttoks\else=%
\oifstrcmpTF\keytype{bool}{%
\oifstrcmpTF\keydefault{true}{false}{false}%
}{%
\expandcsonce\keydefault
}%
\fi
}%
}
\chddefinekeys[
prefix=CHD,family=epigraf,holder prefix=epg@,initialize,preset
]{%
cmd/width/\hsize,
cmd/author/,
cmd/color/black,
cmd/authorcolor/black,
bool/use italics for author/true,
cmd/fontencoding/\encodingdefault,
cmd/fontfamily/\familydefault,
cmd/fontseries/\seriesdefault,
cmd/fontshape/\shapedefault,
cmd/fontsize/10pt,
cmd/hskip/0ex,
cmd/prevskip/0ex,
cmd/postvskip/1ex,
bool/frame/true,
}
\chddefinekeys[
prefix=CHD,family=chapterhead,holder prefix=chd@,initialize,preset
]{%
cmd/textcolor/black,
cmd/textfontencoding/\encodingdefault,
cmd/textfontfamily/\familydefault,
cmd/textfontseries/eb,
cmd/textfontshape/\shapedefault,
cmd/textfontsize/100pt,
cmd/numberfontencoding/\encodingdefault,
cmd/numberfontfamily/\familydefault,
cmd/numberfontseries/eb,
cmd/numberfontshape/\shapedefault,
cmd/numberfontsize/100pt,
% cmd/leftmargin/\leftmargin,
% cmd/rightmargin/\rightmargin,
cmd/texthskip/0em,
cmd/textprevskip/0ex,
cmd/textpostvskip/1ex,
cmd/numberprevskip/0ex,
cmd/numberpostvskip/0ex,
cmd/numberhskip/0em,
cmd/numbercolor/black,
cmd/pagestyle/empty,
bool/make text raggedleft/true,
bool/make number raggedleft/true,
bool/print number before text/true,
bool/frame number/true,
bool/no clear page/true
}
\newbox\chd@boxa
\newcommand\epigraf[2][]{%
\setkeys[CHD]{epigraf}{#1}%
\setbox\chd@boxa=\vbox{%
\ifepg@frame\fbox{\fi
\parbox\epg@width{%
\fontsize{\epg@fontsize}{1.5\epg@fontsize}%
\usefont{\epg@fontencoding}{\epg@fontfamily}%
{\epg@fontseries}{\epg@fontshape}%
\ignorespaces
\textcolor{\epg@color}{#2}%
\hspace*{\fill}\nolinebreak[1]%
\quad\hspace*{\fill}\finalhyphendemerits\z@pt\relax
\begingroup
\ifboolTF{epg@use italics for author}{\itshape}{}%
\textcolor{\epg@authorcolor}{\epg@author}%
\endgroup
}%
\ifepg@frame}\fi
}%
\global\let\chd@printepigraf\chd@bprintepigraf
\@ignoretrue
}
\AtBeginDocument{%
\@ifundefined{@mainmattertrue}{\newif\if@mainmatter\@mainmattertrue}{}%
}
\new@def*\chd@insertchaptertext#1{%
\begingroup
\ifboolTF{chd@make text raggedleft}{%
\raggedleft
}{%
\hskip\chd@texthskip\relax
}%
\advance\leftmargin10em
\interlinepenalty\@M
\vskip\chd@textprevskip\relax
\fontsize{\chd@textfontsize}{1.2\chd@textfontsize}%
\usefont{\chd@textfontencoding}{\chd@textfontfamily}%
{\chd@textfontseries}{\chd@textfontshape}%
\textcolor{\chd@textcolor}{\ignorespaces#1}%
\par\nobreak
\vskip\chd@textpostvskip\relax
\endgroup
}
\new@def*\chd@insertchapternumber{%
\begingroup
\ifnum\c@secnumdepth>\m@ne
\if@mainmatter
\vskip\chd@numberprevskip\relax
\fontsize{\chd@numberfontsize}{1.2\chd@numberfontsize}%
\usefont{\chd@numberfontencoding}{\chd@numberfontfamily}%
{\chd@numberfontseries}{\chd@numberfontshape}%
\usecsn{ifchd@frame number}\fbox{\fi
\textcolor{\chd@numbercolor}{\thechapter}%
\usecsn{ifchd@frame number}}\fi
\par\nobreak
\vskip\chd@numberpostvskip\relax
\fi
\fi
\endgroup
}
\renewcommand\chapter[1][]{%
\setkeys[CHD]{chapterhead}{#1}%
\ifboolTF{chd@no clear page}{}{%
\if@openright\cleardoublepage\else\clearpage\fi
}%
\thispagestyle{\chd@pagestyle}%
\global\@topnum\z@
\ifdefTF\chd@printepigraf\chd@printepigraf\relax
\@afterindentfalse
\secdef\@chapter\@schapter
}
\renewcommand{\@makechapterhead}[1]{%
\begingroup
\begingroup
\leavevmode
\ifboolTF{chd@make number raggedleft}{%
\raggedleft
}{%
\hskip\chd@numberhskip\relax
}%
\ifboolTF{chd@print number before text}{%
\chd@insertchapternumber\chd@insertchaptertext{#1}%
}{%
\chd@insertchaptertext{#1}\chd@insertchapternumber
}%
\endgroup
\nobreak
\endgroup
}
\renewcommand{\@makeschapterhead}[1]{%
\begingroup
\let\c@secnumdepth\m@ne\@makechapterhead{#1}%
\endgroup
}
\newcommand*\chd@bprintepigraf{%
\vskip\epg@prevskip
\hskip\epg@hskip\relax
\copy\chd@boxa
\vskip\epg@postvskip
\global\let\chd@printepigraf\relax
}
\endinput
\end{filecontents}
\documentclass{book}
\usepackage{chapterhead}
\usepackage[dvipsnames]{xcolor}
\begin{document}
\epigraf[
author={Lewis Carroll, \textit{Alice in Wonderland}},
color=blue,
width=.75\hsize,
use italics for author=false,
fontsize=8pt,
fontfamily=cmr,
hskip=10em,
postvskip=2ex,
frame,
]{
``Begin at the beginning,'' the King said, gravely, ``and go on till you
come to an end; then stop.''
}
\chapter[
numberpostvskip=.2ex,
numberfontseries=ux,
numberfontfamily=cmbr,
textfontseries=ex,
textfontsize=50pt,
textfontfamily=cmbr,
textfontshape=it,% not obtainable because of other choices above
textcolor=red,
make text raggedleft=false,
make number raggedleft=false,
print number before text,
no clear page
]{Graph Theory}
\noindent The Pregolya River passes through the city once known as K\"onigsberg.
In the 1700s seven bridges were situated across this river in a manner similar
to what you see in Figure \ldots
\par\vskip3\baselineskip
\hrule height.5pt depth .4pt \relax
\epigraf[
author={Lewis Carroll, \textit{Alice in Wonderland}},
color=black,
width=.75\hsize,
use italics for author,
fontsize=8pt,
fontfamily=cmr,
hskip=-3em,
prevskip=2ex,
postvskip=2ex,
]{
``Begin at the beginning,'' the King said, gravely, ``and go on till you
come to an end; then stop.''
}
\chapter[
numberpostvskip=.2ex,
numberfontseries=ux,
numberfontfamily=cmbr,
textfontseries=ex,
textfontsize=50pt,
textfontfamily=cmss,
textfontshape=it,
textcolor=Brown,
numbercolor=ForestGreen,
make text raggedleft,
make number raggedleft,
frame number,
no clear page
]{Graph Theory}
\noindent The Pregolya River passes through the city once known as K\"onigsberg.
In the 1700s seven bridges were situated across this river in a manner similar
to what you see in Figure \ldots
\end{document}
edit: on second look, my answer is highly similar to wondering's answer
I wanted to do something similar, and came up with a simple and (imo) clean way of reproducing the style of the OP;
\documentclass{book}
\begin{document}
\chapter{Inspirational Quote}
\begin{flushright}
\rightskip=1.8cm\textit{``Dis-moi ce que tu manges, je te dirai ce que tu es.''} \\
\vspace{.2em}
\rightskip=.8cm---Jean Anthelme Brillat-Savarin
\end{flushright}
\vspace{1em}
\noindent
Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.
\end{document}
(the additional \rightskip
s + \vspace
s are just for prettiness sake).
Which results in:
book.cls
your code does not produce the outcome your picture shows.
There is a package called "dirtytalk". Here is the code snippet:
\chapter{Graph Theory}
\say{\textit{Beginning at the beginning,}} \textit{the King said gravely,}
\say{\textit{and go on till you come to the end; then stop.}} --- \textit{Lewis Carroll, Alice in Wonderland}
MWE for article document
\documentclass{article}
\usepackage{lipsum}
\makeatletter
\newenvironment{chapquote}[2][2em]
{\setlength{\@tempdima}{#1}%
\def\chapquote@author{#2}%
\parshape 1 \@tempdima \dimexpr\textwidth-2\@tempdima\relax%
\itshape}
{\par\normalfont\hfill--\ \chapquote@author\hspace*{\@tempdima}\par\bigskip}
\makeatother
\begin{document}
\title{Quote}
\maketitle{}
\author{}
\date{}
\begin{chapquote}{John Allen Paulos}
“Uncertainty is the only certainty there is, and knowing how to live with insecurity is the only security.”
\end{chapquote}
\lipsum[1]
\end{document}