0

I use the dictum command to add a short quote to each chapter in the preamble. Now, I wanted to use a monospaced font:

\setkomafont{dictumtext}{\ttfamily\small}
\setkomafont{dictumauthor}{\ttfamily\small}

Can I somehow define to change the interword spacing only for the dictum environment?

I found this:

\usepackage{everysel}
\renewcommand*\familydefault{\ttdefault}
\EverySelectfont{%
\fontdimen2\font=0.4em% interword space
\fontdimen3\font=0.2em% interword stretch
\fontdimen4\font=0.1em% interword shrink
\fontdimen7\font=0.1em% extra space
}

But it changes the spacing globally and in addition, sets the default font to \ttdefault

If I can't set it for all dictum environments at once, can I then change it locally each time?

Here is a MWE:

\documentclass[
12pt,
pagesize,
a4paper,
twoside,
openright,
parskip=half,
BCOR=10mm,
DIV=14,
]{scrreprt}

\usepackage{newtxtext,newtxmath}
\usepackage[scaled=.86]{helvet}
\renewcommand*{\ttdefault}{lmtt}
\usepackage{microtype}

\usepackage[utf8]{inputenc}
\usepackage[T1]{fontenc}
\usepackage[ngerman,english]{babel,varioref}
\usepackage[autostyle,english=american]{csquotes}

\setkomafont{dictumtext}{\ttfamily\small}
\setkomafont{dictumauthor}{\ttfamily\small}
\renewcommand*\dictumwidth{\textwidth}
\renewcommand*\dictumauthorformat[1]{-- #1}
\renewcommand*\dictumrule{}

\usepackage{blindtext}

\begin{document}
\setchapterpreamble[uc]{%
\dictum[\textsc{Lewis Carroll}, \textit{Alice in Wonderland}]{
\enquote{Begin at the beginning}, the King said, gravely, \enquote{and go on till you come to an end; then stop.}}}
\chapter{First chapter}
\blindtext

\end{document}
1

1 Answer 1

2

enter image description here

\documentclass{scrartcl}

\begin{document}

\dictum[author]{one two three four five }

\setkomafont{dictumtext}{\ttfamily\small}

\dictum[author]{one two three four five }

\setkomafont{dictumtext}{\ttfamily\small\setlength\spaceskip{1cm}}

\dictum[author]{one two three four five }


\end{document}

If \spaceskip (or \xspaceskip for end of sentence space) is set then it over-rides the inter-word spacing set in the font. this is a TeX primitive so applies in any context not just \dictum.

0

You must log in to answer this question.

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