0

I want to make quotes like the following image at the start of a chapter, but I can't seem to find how :(

This is what i been using for Now but i like this one. Can you help with that. thanks :) have a good day

\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}[Confucius]Our greatest glory is not in
    never falling, but in rising every time we fall.
  \end{fquote}
  \lipsum[2]
  \begin{fquote}[Lewis Carroll][Alice in Wonderland]
    [1899]Begin at the beginning,'' the King said,
    gravely, ``
  \end{fquote}
  \lipsum[2]
\end{document}

enter image description here

  • Sorry for being thick, but can you explain what exactly you are asking again? The code you posted roughly produces something similar to the picture. Do you want the output to look more like the picture? If so, please explain what exactly needs to be changed in more detail. – moewe Sep 17 '18 at 14:50
  • yeah i want the output similar to the picture :) – Alexia Colaud Sep 17 '18 at 14:54
  • It would still help if you could list exactly what you want to have changed from the status quo, but maybe that is just me. The original code seems to come from tex.stackexchange.com/a/53452/35864. Possibly interesting: tex.stackexchange.com/q/16964/35864, tex.stackexchange.com/q/98984/35864 – moewe Sep 17 '18 at 15:03
  • I want the format and the position of quotation mark and the vspace between the quote and chapter title – Alexia Colaud Sep 17 '18 at 15:06
  • I saw this kind of block quotes but not actually what i wanted can you just tell me how can i modify just the format and position of quotation mark?? that will be enough for me – Alexia Colaud Sep 17 '18 at 15:10
2

Building upon pluton's answer to "Inspirational" quote at start of chapter we can come up with the following

\documentclass[11pt]{book}
\usepackage[utf8]{inputenc}
\usepackage[T1]{fontenc}
\usepackage{libertinus}
\usepackage{microtype}
\usepackage[english]{babel}
\usepackage{graphicx}
\usepackage{xcolor}
\usepackage{csquotes}
\usepackage{lipsum}

\definecolor{quotemark}{gray}{0.7}
\makeatletter
\newlength\origparskip

\newcommand{\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}%
  %\vspace{1em}%
  \noindent%
  \begin{list}{}{%
    \setlength{\leftmargin}{0.3\textwidth}%
    \setlength{\rightmargin}{0.1\textwidth}%
    \setlength{\origparskip}{\parskip}%
  }%
    \item[]%
      \begin{picture}(0,0)%
        \put(-15,-8){\makebox(0,0){\scalebox{4}{%
          \textcolor{quotemark}{\textquotedblright}}}}%
      \end{picture}%
      \begingroup
      \itshape
      \ignorespaces}%

\def\endfquote{%
  \endgroup
  \par
  \raggedleft
  \ifx\tempa\empty
  \else
    {\bfseries --- \tempa\par}%
    \setlength{\parskip}{\origparskip}%
    \ifx\tempb\empty
    \else
      (\tempb)%
  \fi
  \par
  %\vspace{0.5em}%
  \end{list}}
\makeatother

\begin{document}
  \chapter{Graph theory}
  \begin{fquote}[Wim Crouwel][Graphic designer and typographer]
    You can’t do better design with a computer, but you can speed up your work enormously.
  \end{fquote}
  \lipsum[2]
  \begin{fquote}[Wim Crouwel]
    You can’t do better design with a computer, but you can speed up your work enormously.
  \end{fquote}
  \lipsum[2]
\end{document}

The code has been changed to output only the opening quotation mark and fquote only accepts two optional arguments now: One for the name and one for the parenthetical insertion.

screenshot of the result

  • Should the quotes be opening? – Sigur Sep 17 '18 at 16:39
  • 2
    @Sigur Let's say they are opening in the sense of the question ;-). If you shift them down a tiny bit they would work as German opening quotes as well (which are „Gänsefüßchen“ 99-bottom and 66-top). – moewe Sep 17 '18 at 16:41
  • Thta is exactly what i want thank youuuuu so much @moewe – Alexia Colaud Sep 17 '18 at 17:10
  • 1
    @AlexiaColaud (1) Where do you get that quotation mark? (2) Please show me a complete example document that reproduces the behaviour. I could not reproduce it only by adding \usepackage[babel,french=guillemets]{csquotes} to the code above, even after changing to french as the main language I still get a big "„" in front of the quotation. Of course inside the epigraph things might be different. But I'm not quite sure if I understand you correctly, so I need to see the code. – moewe Sep 17 '18 at 19:07
  • 1
    @AlexiaColaud Very good. Glad I could help. – moewe Sep 17 '18 at 19:12
2

I'm not sure I understood exactly what you want, but this is what I propose, based on epigraph. I replaced the obsolete times package with newtxtext, newtxmath based on the Times clone TeX Gyre Termes:

\documentclass[11pt]{book}
\usepackage[utf8]{inputenc}
\usepackage[T1]{fontenc}
\usepackage{microtype}
\usepackage{newtxtext, newtxmath}
\usepackage[english]{babel}
\usepackage{graphicx}
\usepackage[svgnames]{xcolor}
\usepackage{lipsum}
%%%%*************************************************
\usepackage{tabularx}
\usepackage{epigraph}
\setlength{\epigraphwidth}{0.6\textwidth}
\setlength{\epigraphrule}{0pt}
%%%*********************************************
\newcommand{\myopeningquote}{\smash{\raisebox{-1.25\height}{\llap{\scalebox{3}
          {\textcolor{Silver}{``}}\,}}}}
\newcommand{\myclosingquote}{\raisebox{-0.66\height}{\scalebox{3}{\textcolor{Silver}{”}}}}

\begin{document}

  \chapter{Graph theory}

\epigraph{\itshape\myopeningquote Our greatest glory is not in never falling, but in rising every time we fall.\myclosingquote}
{Confucius}%

  \lipsum[2]

\epigraph{\itshape\myopeningquote Begin at the beginning,'' the King said,
    gravely,\myclosingquote}
{Lewis Carroll, \emph{Alice in Wonderland} (1865)}%

  \lipsum[2]

\end{document} 

enter image description here

Your Answer

By clicking "Post Your Answer", you acknowledge that you have read our updated terms of service, privacy policy and cookie policy, and that your continued use of the website is subject to these policies.

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