Tag Info

Hot answers tagged

18

With version 2.5 of the microtype package, available on CTAN since 13 March 2013, the simple answer to my question is "use microtype". Thanks, Herbert and Joseph, for telling me that this can be done with the microtype package. I did know that microtype can do margin kerning, but I had always thought that this is only about punctuation. In reality, one ...


17

This could be related to a bug with negative protrusion values that I reported a year ago and which is obviously still open. Which luatex version are you using?


17

microtype has an optional argument that you can allow to shift the characters more to the right, e.g. [factor=1300] \documentclass{article} \usepackage[T1]{fontenc} \usepackage{lmodern,picture} \usepackage{microtype} \textwidth=3.85cm \begin{document} \itshape\noindent\makebox(0,0){\put(\textwidth,-2cm){\line(0,-1){80}}}% This is a small text. If jam is ...


15

Your analysis is correct. A couple of years ago, the pdftex team has been discussing whether pdftex should indeed try harder. No clear conclusion transpired except that it would probably be too difficult to get it right in all cases, hence the issue was postponed for later consideration ... maybe too late for pdftex now, and to be passed on to luatex. ...


13

I'd regard this as a bug in csquotes. You can solve it by putting the following code into your preamble, but I can't say if this breaks other things. \makeatletter \def\csq@qclose@ii#1{% \ifdim\lastkern=\csq@omitmarker #1\csq@eqgroup \else \csq@addkern@close \ifodd\csq@qlevel \csq@thequote@oclose ...


12

You can change the default factor like this (5 is not a sensible value but shows the effect quite good: \documentclass[a4paper, 12pt, oneside, article]{memoir} \usepackage{fontspec} \defaultfontfeatures{Ligatures=TeX} \newfontfeature{Microtype}{protrusion=default;expansion=default;} \directlua{fonts.protrusions.setups.default.factor=5} ...


11

It is my understanding that margin kerning does work but that font expansion doesn't. This is one of the reasons why I'm currently using pdflatex and not XeLaTeX: OpenType support in XeTeX is very good because of the fontspec package, but XeTeX is not fully compatible with microtype. You don't explain why you need XeTeX, so I'll explain some possible ...


9

First, let us make it work with hyperref. hyperref redefines \@footnotemark itself, so instead of overwriting it, we just patch it with the etoolbox package. \usepackage{etoolbox} ... \makeatletter \newcommand*\new@makefnmark{\hbox{\@textsuperscript{\normalfont \microtypecontext{protrusion=footnote}\@thefnmark}}} \patchcmd{\@footnotemark} ...


9

The definition of \thinspace is % latex.ltx, line 1315: \def\thinspace{\kern .16667em } so it's a kern; since it's not followed by glue it's not a feasible line break point. You probably want \hspace{.16667em} instead of it; then \allowbreak is not needed. On the other hand, \ignorespaces does nothing at all where you place it, because its only action ...


9

Personally, I think using the Latin Modern fonts with microtype seems to be a better approach \documentclass{article} \usepackage[T1]{fontenc} \usepackage{lmodern,microtype} \textwidth=3.85cm \begin{document} \it\noindent This is a small text. If jam is what you like, two fingers up, or whatever. Under certain conditions you see that the left and right ...


8

This is how you can extend or alter existing settings: Make sure that the settings you want to change are already loaded; in the preamble, this isn't guaranteed to be the case, so you need \LoadMicrotypeFile. Create new settings that load the default settings by way of the load key. If you want set protrusion for any glyph to zero, you explicitly have to ...


8

This is indeed (as @yun suspected in his/her first comment to the question) again the bug in luatex with negative protrusion values. The relevant difference between version 2.4 and 2.5 of microtype is not in the package itself but in the configuration file for Latin Modern Roman, which now specifies also negative values for the italics font (which was ...


8

As @Thorsten mentioned, the problem is that microtype is unable to associate your protrusion settings properly with the footnote. This is because you only specify the font type via the incorrect size - \footnotesize in this case. The warning produced by pdfTeX is Package microtype Warning: I cannot find a protrusion list for font (microtype) ...


7

You can try installing the current beta of the microtype package. Its support of XeTeX is incomplete but protrusion (and hence hanging hyphenation) already works and despite its beta status I haven’t (so far) experienced any difficulties with it.


7

The example in the TeXbook is obsolete since all current engines support margin kerning without any tricks. For plain XeTeX: \XeTeXprotrudechars=2 \font\rm="TeX Gyre Pagella"\relax \rm \rpcode\font\XeTeXcharglyph\hyphenchar\font=250 \hsize=20mm a a a a a a a a a abbabbabb aabbabbabb abbabb \bye \XeTeXprotrudechars=2 activates protrusion, the \rpcode line ...


6

The point of hanging punctuation is not that you notice it, but rather that you don't notice it (as with most aspects of typography), i.e., the idea is to get the margin more uniform not to have letters stick out into the margin. As an example of use inthe TeX world: The LaTeX Companion makes use of it and you can examine a sample chapter at ...


5

This is for lualatex: \documentclass{article} \usepackage{fontspec} \setmainfont[RawFeature={protrusion=default}]{TeX Gyre Pagella} \pdfprotrudechars2 % 1 if you don't want to change line breaking \begin{document} \input{knuth} \end{document}


4

I use LuaTeX for the most part, but fall back on XeTeX if a document requires bidi. Use TLContrib (see latex-alive.tumblr.com/post/1303450459 for concise instructions) to get the latest version of microtype. It supports protrusion in XeTeX, though not the other microtypographic features. Protrusion is already enough to fix the worst eyesores. And if you ...


3

If you end up using LuaTeX, you could also remove microtype entirely (ref): \pdfprotrudechars=2 \pdfadjustspacing=2 \newfontfeature{Microtype}{protrusion=default;expansion=default;} \defaultfontfeatures{Microtype,Ligatures=TeX} To get letterspacing, use soul (or soulutf8). Also, you can check for LuaTeX using ifluatex.


3

If you don't mind using luatex (ConTeXt MkIV), you can do the following: %\setupframedtext [align=hanging] \definefontfeature [default] [default] [ %protrusion=quality, % partial protrusion protrusion=pure, % full protrusion ] \setupalign [hanging] \showframe \starttext \input knuth \stoptext For \framed and framedtext protrusion is ...


3

See this question. The protrusion is only disabled for the first character of the paragraph, due to the \item (which is hidden in the case of quote and adjustwidth). The answers to that question give some possible solutions, or for simply increasing the margins you can use TeX primitives: {\leftskip 1em\rightskip 1em% ``So'' the quotes to the left in this ...


3

My bad, punctuation is not hanged at the beginning of a paragraph with an indentation, and this is normal. MWE : \documentclass{article} \usepackage{geometry} % Only for convinency, to show the margin. \geometry{a5paper,showframe} % Small paper, we show the frames. \usepackage{csquotes} % For the command \enquote, automatically in ...


3

With TeX Live 2014 protrusion is working: \documentclass[11pt,a5paper]{article} \usepackage[protrusion=true,expansion=true,final]{microtype} \begin{document} \section*{The Microtypesetting} \newcommand*{\test}{% \noindent A run of the mill paragraph with some text. \par\hrule height .5ex \vskip.5ex \noindent \textquoteleft Wow (lpcode = ...


2

Delete the lines \microtypesetup{protrusion=true} and everything will be ok. Protrusion is set by default to true and inside an environment (textblock) everything is local.


2

I think the problem might be in the character you are trying to adjust. With the hex specification \char"002D the protrusion does not work for me, however, if I replace it with -, which I copied out from the PDF, or a regular hyphen -, it works without problems.


2

After looking more closely, I do see that protrusion works (now that I know what it's supposed to do) and I understand that font expansion doesn't (yet) work with XeTeX. This question is thus solved.


2

XeTeX has recently been enhanced with microtypography extensions as well, but it's still in a beta phase.


2

I presently load microtype with protrusion adjustments as follows. Perhaps someone is interested in using my values, especially for Times (ptm), which imho has too much protrusion. Please note that my selection of adjustments is not an attempt at being exhaustive. \usepackage[verbose=silent]{microtype} \LoadMicrotypeFile{ptm} \SetProtrusion [ ...


1

I’ve recently converted a few OTF fonts using otdtotfm (LY1 encoding) and written a corresponding .fd file; then a few more imports to get the font selection done and the thing worked very well together with pdftex and microtype. Some protrusion is applied (though I don’t know if it’s ‘perfect’ – whatever that would mean) – in fact there are much, much less ...



Only top voted, non community-wiki answers of a minimum length are eligible