TransWikia.com

adjust vertical space in quoting environment to exactly one line

TeX - LaTeX Asked by PeterStrawson on April 22, 2021

I am sure this must have been asked before: I want to adjust the vertical space before and after the quoted text to exactly one line. The default seems to be a little less. I am working in a double column document and the columns should stay on the same grid even if there is quotes involved.

documentclass[DIV=30,12pt,twocolumn]{scrartcl}
usepackage[utf8]{inputenc}
usepackage[T1]{fontenc}
usepackage[english]{babel}
setlength{columnsep}{20pt}
usepackage{blindtext}
begin{document}
Blindtext
begin{quote}
    blindtext
end{quote}
blindtext
end{document}

2 Answers

Following the first answer here I solved the problem by redefining the quote environment.

documentclass[DIV=30,12pt,twocolumn]{scrartcl}
usepackage[utf8]{inputenc}
usepackage[T1]{fontenc}
usepackage[english]{babel}
setlength{columnsep}{20pt}
makeatletter
renewenvironment{quote}
{list{}{listparindent=0em
        partopsep=1baselineskip
        itemindent=listparindent
        leftmargin=parindent
        rightmargin=parindent
        topsep=0em
        parsepz@@plusp@}%
    itemrelax}
{endlist}
makeatother
usepackage{blindtext}
begin{document}
Blindtext
begin{quote}
    blindtext
end{quote}
blindtext
end{document}

Correct answer by PeterStrawson on April 22, 2021

You do not have to reinvent the wheel: the quoting package enables you to customise very easily the quoting environment with a system of keys:

documentclass[DIV=30,12pt,twocolumn]{scrartcl}
usepackage[T1]{fontenc}
usepackage[english]{babel}
setlength{columnsep}{20pt}
usepackage{blindtext}
usepackage{quoting}
quotingsetup{indentfirst=false, leftmargin=parindent, vskip=baselineskip}

begin{document}

Blindtext
begin{quoting}
    blindtext
end{quoting}
blindtext

end{document} 

enter image description here

Answered by Bernard on April 22, 2021

Add your own answers!

Ask a Question

Get help from others!

© 2024 TransWikia.com. All rights reserved. Sites we Love: PCI Database, UKBizDB, Menu Kuliner, Sharing RPP