7

I have a command \work which will format titles in SmallCaps and with less letter spacing. Now the funny thing: If I try to add some word spacing, too, and only for SmallCaps, it affects the whole document, as you can see in the MWE. Any ideas how to achieve that the word spacing only affects SmallCaps or my command?

\documentclass{article}

\usepackage{blindtext}
\usepackage{fontspec}
\setmainfont[SmallCapsFont={Latin Modern Roman Caps},
             SmallCapsFeatures={LetterSpace=-6,WordSpace={3}}]{Latin Modern Roman}

\newcommand{\work}[1]{\textsc{{#1}}}

\begin{document}

    Immanuel Kants \work{Kritik der praktischen Vernunft}, \work{Kritik der reinen Vernunft} und \work{Kritik der Urteilskraft}...

    \blindtext

\end{document}

enter image description here

3
  • LetterSpace works just fine
    – musicman
    Commented Oct 24, 2014 at 17:14
  • 3
    @musicman I already told you that negative letter spacing is exactly the contrary of what you should do; bigger word spacing only for small caps is something I can't understand the purpose of. Nonetheless, you seem to have discovered a bug in fontspec.
    – egreg
    Commented Oct 24, 2014 at 17:29
  • (I know you don't like it. But I couldn't find a proper font which gives me a similar output. In fact I want less letterspacing, and so I also need to shrink the wordspacing... And I'm not happy to find bugs)
    – musicman
    Commented Oct 24, 2014 at 17:33

2 Answers 2

5

An acceptable workaround, which still let's you use \textsc without changing it, it defines a similar command \work which does have the desired spacing.

I think that there's absolutely no reason to desire this spacing: letters overlap! They need room to breathe…

\documentclass{scrartcl}

\usepackage{blindtext}
\usepackage{fontspec}
\setmainfont{Latin Modern Roman}
\newfontface\workcaps{Latin Modern Roman Caps}[LetterSpace=-6,WordSpace=3]
\DeclareTextFontCommand\work{\workcaps}

\begin{document}

Immanuel Kants \work{Kritik der praktischen Vernunft}, \work{Kritik der
reinen Vernunft} und \work{Kritik der Urteilskraft}...

\blindtext

\end{document}

enter image description here

3
  • Thank you for this easy workaround. Works perfectly! If I don't get other answers I will accept yours. My current LetterSpace is -4 btw :-)
    – musicman
    Commented Oct 24, 2014 at 19:52
  • Even if I said this is a workaround, because if there were no bug you wouldn't need it, this is the official way of doing this. Since you don't want to change all the small caps from the document, just create a macro to document the work of an author…
    – Manuel
    Commented Oct 24, 2014 at 19:54
  • 1
    this really needs extra word space before (and possibly after) the title. mashing together the text with the title makes this really hard to read. (i agree that negative letterspacing is a bad thing, and increasing the word spacing makes things even worse.) Commented Feb 16, 2015 at 21:45
0

After fiddling around with the same issue, I found the source of the «bug». It was the «Wordspace» feature. I am not quite sure that the «Letterspace» definition takes care of the spaces as well.

\documentclass{article}
\usepackage{blindtext}
\usepackage{fontspec}
\setmainfont[SmallCapsFont={Latin Modern Roman Caps},
             SmallCapsFeatures={LetterSpace=-6}]{Latin Modern Roman}
\newcommand{\work}[1]{\textsc{{#1}}}

\begin{document}
    Immanuel Kants \work{Kritik der praktischen Vernunft}, \work{Kritik der reinen Vernunft} und \work{Kritik der Urteilskraft}...
    \blindtext
\end{document}

enter image description here

2
  • The new syntax is \setmainfont{..}[..].
    – Manuel
    Commented Feb 16, 2015 at 19:44
  • Your test confirm that we are not seen a bug. Word space is the distance between words. The question ask for a local word spacing and your excersie, proves that the parameter you found is an optimum for the letter space, for the given type face.
    – djnavas
    Commented Apr 26, 2016 at 17:03

You must log in to answer this question.

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