Page LayoutMaking quote environment wider

Information and discussion about page layout specific issues (e.g. header and footer lines, page formats, page numbers).
Yeats
Posts: 62
Joined: Fri Nov 07, 2008 12:29 pm

Making quote environment wider

Post by Yeats »

Hi,
I am trying to make my quotes wider then they are by default.

Here is what I came up with until now:

Code: Select all

\let\oldquote\quote
\renewcommand\quote{\setlength{\textwidth}{12cm}\oldquote}
This actually does nothing :(

If I change the value to 5cm for example, quote width stay the same.

Anyone has an idea how to change quote width?

Tx!

Recommended reading 2024:

LaTeXguide.org • LaTeX-Cookbook.net • TikZ.org

NEW: TikZ book now 40% off at Amazon.com for a short time.

And: Currently, Packt sells ebooks for $4.99 each if you buy 5 of their over 1000 ebooks. If you choose only a single one, $9.99. How about combining 3 LaTeX books with Python, gnuplot, mathplotlib, Matlab, ChatGPT or other AI books? Epub and PDF. Bundle (3 books, add more for higher discount): https://packt.link/MDH5p

localghost
Site Moderator
Posts: 9202
Joined: Fri Feb 02, 2007 12:06 pm

Making quote environment wider

Post by localghost »

The quote environment internally is a list. Please give a more specific description of what you want to achieve (i. e. level of indentation on both or a single side). A short example with your document settings (paper and page geometry) would help a lot.


Best regards
Thorsten
Yeats
Posts: 62
Joined: Fri Nov 07, 2008 12:29 pm

Making quote environment wider

Post by Yeats »

localghost wrote:The quote environment internally is a list. Please give a more specific description of what you want to achieve (i. e. level of indentation on both or a single side). A short example with your document settings (paper and page geometry) would help a lot.


Best regards
Thorsten
Hi, thank you for your answer. Well basically what I want is that all quotes on all my pages be more wide then they are. Lets say that default indentation on both left and the right side is 2 cm. I want to make that 1 cm or 0.5 cm. I would try with different widths. I just need a way to change it, thats it.

Here is an example with settings:

Code: Select all

\documentclass[12pt,a4paper]{scrartcl}
\usepackage[paper=a4paper,left=33mm,right=28mm,top=30mm,bottom=30mm]{geometry}
User avatar
localghost
Site Moderator
Posts: 9202
Joined: Fri Feb 02, 2007 12:06 pm

Making quote environment wider

Post by localghost »

Well, here we go. The code below shows the declaration of the quote environment and the line where you can adjust the margins.

Code: Select all

\documentclass[11pt,a4paper,english]{article}
\usepackage[T1]{fontenc}
\usepackage[utf8]{inputenc}
\usepackage{babel}
\usepackage[includeheadfoot,left=33mm,right=28mm,top=30mm,bottom=30mm]{geometry}
\usepackage{blindtext}

\renewenvironment{quote}{%
  \list{}{%
    \leftmargin0.5cm   % this is the adjusting screw
    \rightmargin\leftmargin
  }
  \item\relax
}
{\endlist}

\begin{document}
  \blindtext

  \begin{quote}
    \blindtext
  \end{quote}

  \blindtext
\end{document}
Yeats
Posts: 62
Joined: Fri Nov 07, 2008 12:29 pm

Making quote environment wider

Post by Yeats »

localghost wrote:Well, here we go. The code below shows the declaration of the quote environment and the line where you can adjust the margins.
Thanks a lot! No wonder I couldn't do it myself... looks rather complicated.
User avatar
localghost
Site Moderator
Posts: 9202
Joined: Fri Feb 02, 2007 12:06 pm

Making quote environment wider

Post by localghost »

Yeats wrote:[...] looks rather complicated.
Not really if you know how to handle list environments like itemize and where to look for such default declarations like in the source code of the class file.
Yeats
Posts: 62
Joined: Fri Nov 07, 2008 12:29 pm

Making quote environment wider

Post by Yeats »

I tried with just this part of code:

Code: Select all

\renewenvironment{quote}{%
  \list{}{%
    \leftmargin0.5cm   % this is the adjusting screw
    \rightmargin\leftmargin
  }
  \item\relax
}
{\endlist}
and that did the work.

I see that the key is to use \renevenvironment instead \renewcommand that I was trying to do.

What exactly do you achieve with blindtext package again?
User avatar
localghost
Site Moderator
Posts: 9202
Joined: Fri Feb 02, 2007 12:06 pm

Making quote environment wider

Post by localghost »

Yeats wrote:[...] I see that the key is to use \renevenvironment instead \renewcommand that I was trying to do. [...]
Of course that's the point because »quote« is an environment and not a command. Perhaps you should do some basic reading. This can't do any harm even if you're not going to use LaTeX intensively.
Yeats wrote:[...] What exactly do you achieve with blindtext package again?
I think this should be self-explanatory. It creates some text passages to demonstrate how things look. In this case it generates the preceding and following paragraph of the quote environment as well as its content with the \blindtext command. The blindtext package is perfect for creating a MWE.
Yeats
Posts: 62
Joined: Fri Nov 07, 2008 12:29 pm

Making quote environment wider

Post by Yeats »

localghost wrote:Perhaps you should do some basic reading. This can't do any harm even if you're not going to use LaTeX intensively.
Well I do try to improve my Latex knowledge although I wont need much more than I know now (I am Geisteswissenschaftler, - don't know the english word lol).

Anyway there are few things higher on my todo list, but after that I do plan to expand my knowledge, just for the sake of it.
User avatar
localghost
Site Moderator
Posts: 9202
Joined: Fri Feb 02, 2007 12:06 pm

Making quote environment wider

Post by localghost »

Yeats wrote:[...] I am Geisteswissenschaftler, - don't know the english word lol. [...]
My dictionary say »arts scholar«.
Yeats wrote:[...] Anyway there are few things higher on my todo list, but after that I do plan to expand my knowledge, just for the sake of it.
I see. In your discipline there are higher priorities. In my university life (physics) LaTeX occupied a big part. Although you can learn much by searching the forum, it might be good to have a book about practical LaTeX on the desk. There are some good German books (e. g. »LaTeX - Das Praxisbuch« by E. and M. Niedermair). And they are not so expensive. But all this shall not keep you from posting your requests here.
Post Reply