1

How can one change the font size and color of the text in the "quote" environment?

3 Answers 3

3

With an up-to-date LaTeX system (released on 2020-10-01 or later), it's very easy:

\documentclass{article}
\usepackage{xcolor}

\usepackage{lipsum} % for mock text

\AddToHook{env/quote/begin}{\small\color{blue!70}}

\begin{document}

\lipsum[3][1-4]
\begin{quote}
\lipsum[4][1-4]
\end{quote}
\lipsum[4][1-4]

\end{document}

enter image description here

2

If you look in article.cls (similar if you are using a different class) quote is defined by

\newenvironment{quote}
               {\list{}{\rightmargin\leftmargin}%
                \item\relax}
               {\endlist}

so in your document you can use

\renewenvironment{quote}
               {\list{}{\rightmargin\leftmargin}%
                \item\relax\large\color{red}}
               {\endlist}
0

I'm not sure what you want the user interface to be but the following gives you a couple of options.

% quoteprob.tex  SE 605141
\documentclass{article}
\usepackage{lipsum}
\usepackage{comment}

\newenvironment{myquote}%  %%% using the \Large font
  {\begin{list}{}%
    {\setlength\rightmargin{\leftmargin}}%
  %% set the font size (and color?)
  \Large
  \item[]\makebox[0pt]{}%[r]{``}
     \ignorespaces}%
 {\unskip\makebox[0pt]{}%[l]{''}
  \end{list}}

\begin{document}

Some random words just to see the width of the textblock.
Plus some more random words just to see the width of the textblock.


\begin{quote}
  This is in a regular \verb!quote! environment. Have a look at the font size
  compared with the normal font size.
\end{quote}

Some random words just to see the width of the textblock.
Plus some more random words just to see the width of the textblock.

\begin{quote}
  \footnotesize
  This is in a regular \verb!quote! environment with \verb!\footnotesize!. Have a look at the font size
  compared with the normal font size.
\end{quote}


Some random words just to see the width of the textblock.
Plus some more random words just to see the width of the textblock.



\begin{myquote}
  This is in a \verb!myquote! environment. Have a look at the font size
  compared with the normal font size.
\end{myquote}

Some random words just to see the width of the textblock.
Plus some more random words just to see the width of the textblock.


\end{document}

enter image description here

So, you can use the regular quote environment and each time specify how the text should look, or you can (re)define the quote environment along the lines of myquote to give a fixed text appearance. More esotericaly you could define a version of the quote environment that took a parameter specifying the look of the text.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .