# Tag Info

19

I don't think it is reasonable to expect a full list to be created and maintained here. I think it is better to explain how to figure out whether fonts have this support so that users can determine the current answer for a specific font for themselves. If nothing else, this will enable people to check whether an answer here is still correct. Thérèse is ...

18

Use T1 fontencoding instead of OT4 (default). \documentclass{article} \usepackage[T1]{polski} \usepackage[utf8]{inputenc} \usepackage{microtype} \begin{document} \noindent Lorem'' \newline ,,Lorem'' \newline Lorem \newline ć, ń, ó, ś, ź, ż, ą, ę, ł \newline Ć, Ń, Ó, Ś, Ź, Ż, Ą, Ę, Ł \end{document}

17

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. ...

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?

16

EDIT: This has been fixed in version 2.7b (28 Feb 2019). The default microtype configuration lacks protrusion settings for the „ ligature. You can add them like this (in the preamble): \LoadMicrotypeFile{cmr} \SetProtrusion [ name = cmr-OT4, load = cmr-OT1] { encoding = OT4, family = cmr } { "FF = {500,300} }

13

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} \setmainfont[...

10

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 ...

10

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} {\@...

10

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 ...

10

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 is ...

9

Let me first expand on the possible ways of how to specify characters in microtype's settings: For pdftex, the following input methods are allowed: a character (like A) within the (7-bit) ASCII range you may also use 8-bit (eg., Ä), and UTF-8 characters (eg., …), if the glyph is defined in the input encoding. to remain portable, you may use text commands ...

9

The sticking into the left margin of the second line comes from the character protrusion feature. Very likely package microtype is loaded. The protrusion of the first line is prevented by \begin{flushleft}, which adds an invisible empty box at the very beginning of the paragraph. This can be seen by \showlists with \showboxbreadth=\maxdimen\showboxdepth=\...

9

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 http://latex-...

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) `...

8

After searching and experimenting I contrived a partial answer. Please expand if you know the answer to the rest. First point, about why limit the font sets: Protrusion. Still unclear why not set all or allmath, results do not worsen then. Expansion. Setting expansion to all or allmath yields sometimes better results and sometimes worse results. It did ...

7

This is indeed, as @egreg has said in the comments, by design (margin kerning is lost after \unhboxing or \unhcopying). But there are two commands that come as remedy: \leftmarginkern and \rightmarginkern allow access to the the respective kerns of an hbox. So to adapt your sample code, the following will reinsert margin kerning: \showboxdepth=20 \...

7

You can define a command that prints an emdash after a small kern (zero is not sufficient, but 1sp is the least nonzero length in TeX and goes unnoticed): \documentclass{article} \usepackage{etoolbox,microtype,showframe} \setlength{\textwidth}{7cm} \newrobustcmd{\npemdash}{% \mbox{\kern1sp ---}% } \begin{document} Let's push the emdash to the next ...

6

This seems to be fixed in the current 0.80 release This is LuaTeX, Version beta-0.80.0 (TeX Live 2015) (rev 5238) restricted \write18 enabled. (./gg384.tex---- looking at table char 50 table: 0x60106f270 depth = 0 used = false width = 327681 expansion_factor = 333 ...

6

It is possible to temporarily disable microtype, here an example: \documentclass[12pt,oneside]{report} \usepackage{lmodern} \usepackage[T1]{fontenc} \usepackage[showframe]{geometry} \usepackage[activate,verbose=true]{microtype} \begin{document} \begingroup \microtypesetup{activate=false}% \noindent Disable protrusion from microtype for just one word ...

5

I fiddled.... I have no idea what I am doing. If this breaks your document horribly, you get to keep all the itsy-bitsy pieces for yourself. I accept no responsibility if the code collaborates with your cat to order courier delivery of new tin-openers or dials out for pizza when bored. Caveat emptor... The basic problem, I think, is the definition of the ...

5

The inner code of \section prevents that the protrusion can work (it inserts a box with a skip and a \noindent). The \protrudeleft command from the question you linked to imho can't work here, as it implicitly assumes that it is used in vertical mode. You can get the protrusion with the following code. Attention This is not a "general" code. It assumes ...

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 ...

4

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 [ ...

4

newtxmath changes the math sizes. \sf@size (used by the superscript) has now size 8.8 and not 8. So you need to add this value to the size declaration: size={5,6,7,8,8.8} or use a size range: size={5-9} (the last number has to be greater than 8.8 because microtype won't include the upper limit in the range itself)

4

Links in xelatex are done with a \special, a "whatsit" and they seem not to be transparent for protrusion. You can see a similar problem with \label. Imho it is a deficiency or a bug of the engine but the author of microtype could say something more definitive. \documentclass{article} \usepackage{microtype,tikz} \begin{document} \tikz[overlay]\draw[red](\...

4

The problem with the code you tried from the other answer is that here the unboxing takes place inside another (incompatible) box, which makes tex stumble. The solution is, just as you suggested in your comment, to measure the protrusion first and then subtract it from the label sep: \documentclass{article} \usepackage[activate={true, nocompatibility}, ...

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 = \the\...

3

I posted the same question on the ConTeXt mailing list and got an answer from Hans Hagen: that would only work if you typeset with a \hsize that is exactly the length of the title which in turn means that you have to adapt the font size and even then tex will probably squeeze the spacing first so the best is: \subject{Call me Ishmael\rlap{.}} ...

3

Don’t worry, this is normal — the first line of an indented paragraph are not outdented. Minimum working example: \documentclass{article} \usepackage{geometry} % For convinience, show the margins \geometry{a5paper,showframe} % Use a5 size paper and display a border around the % edge for debugging purposes \usepackage{...

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