Take the 2-minute tour ×
TeX - LaTeX Stack Exchange is a question and answer site for users of TeX, LaTeX, ConTeXt, and related typesetting systems. It's 100% free, no registration required.

I'm using LuaLaTeX to write my thesis and I've been learning about typography thanks to Robert Bringhurst's "The elements of typographic style". Problem is I can't replicate the letterspacing used in titles sectioning, so do you know how I can achieve that? (I tried with microtype package with no success at all).

My cls is inspired heavily by Evind Uggedal's thesis (which at the same time he is inspired by Robert Bringhurst's book) but he is using pdflatex instead of LuaLaTeX.

Here is Eivind Uggedal's cls: https://bitbucket.org/uggedal/thesis/src/5017b3e8bdb8/src/uiothesis.cls

And here is mine: https://bitbucket.org/aldoborrero/alma-pfc/src/b89264c1b2fd/src/UAHMemoir.cls

Here you have an screenshot: Sceenshot

Thanks!!

UPDATE:

As @rdhs has pointed in the comment below you can use the two options he wrote. In my case I prefer the first one because I don't have to import another package, so if you are going to use it make sure you update your microtype package to the last beta version (visit this site if you need more info http://latex-alive.tumblr.com/post/1303450459).

tlmgr --repository http://tlcontrib.metatex.org/2011 update microtype

Here is the final result: enter image description here

UPDATE 2:

As @NVaughan said in the comment below, if you're using TexLive 2012 you should type:

tlmgr --repository http://tlcontrib.metatex.org/2012 update microtype
share|improve this question
1  
I have a suspicion that you may be coming up against features of microtype that are not (fully) implemented for the XeTeX and LuaTeX engines. A number of questions, such as this one mention these restrictions. –  Brent.Longborough Apr 22 '12 at 15:38
1  
If you're using TeXLive (or MacTeX) 2012, the command is rather sudo tlmgr --repository http://tlcontrib.metatex.org/2012 update microtype. –  NVaughan Jan 2 '13 at 18:46
    
@NVaughan Yes you're right! Thanks for pointing that! :D –  Aldo Borrero Jan 2 '13 at 19:03

1 Answer 1

up vote 3 down vote accepted

At the moment, the best way to get letterspacing in LuaLaTeX is with the microtype package. You'll need the Microtype 2.5 beta from TLContrib (http://tlcontrib.metatex.org/2011), and to get it working nicely with smal caps you'll need to use the Renderer=Basic hack:

\documentclass{memoir}
\usepackage{fontspec}
\setmainfont{Minion Pro}

\usepackage{microtype}

\def\seclcls#1{\textls*[80]{\MakeLowercase{#1}}}
\setsecheadstyle{\scshape\addfontfeatures{Renderer=Basic}\raggedright\seclcls}

\begin{document}
\section{¿Qué necesidades tiene alma?}
\end{document}

You could also use soulutf8 instead. Using code from this answer:

\documentclass{memoir}
\usepackage{fontspec}
\setmainfont{Minion Pro}

\usepackage{soulutf8}
\usepackage{xparse}

\setsecheadstyle{\scshape\raggedright\MakeLowercase}
\sodef\secso{}{.08em}{.5em}{.5em}
\DeclareDocumentCommand\Section{oom}{
\IfNoValueTF{#1}
  {\section{\secso{#3}}}
  {\IfNoValueTF{\secso{#2}}{\section[#1]{\secso{#3}}}{\section[#1][#2]{\secso{#3}}}}
}

\begin{document}
\Section{¿Qué necesidades tiene alma?}
\end{document}
share|improve this answer
    
Thanks @rdhs the second solution you posted worked pretty close to the desired look. I have to check the first one because I think it's "prettier" (I don't know what microtype version I have installed on my machine). –  Aldo Borrero Apr 23 '12 at 0:08

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.