10.07.2015 Views

The microtype package

The microtype package

The microtype package

SHOW MORE
SHOW LESS

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

IMPLEMENTATION: Font setup 87\MT@get@slot@• OK, so it must be a macro. We do not allow random commands but only thosedefined in L A TEX’s idiosyncratic font encoding scheme:If \〈encoding〉\〈command〉 (that’s one command) is defined, we try to extract theslot number.We must be cautious not to stumble over accented characters consisting of twocommands, like \‘\i or \U\CYRI, hence, \string wouldn’t be safe enough.2377 \MT@ifdefined@n@TF{\MT@encoding\MT@detokenize@c\@tempa}%2378 \MT@is@symbol• Now, we’ll catch the rest, which hopefully is an accented character (e.g. \"a).2379 {\expandafter\MT@is@composite\@tempa\relax\relax}%2380 \ifnum\MT@char@ < \z@• It could also be a \chardefed command (e.g., the percent character). This seemsthe least likely case, so it’s last.2381 \expandafter\MT@exp@two@c\expandafter\MT@is@char\expandafter2382 \meaning\expandafter\@tempa\MT@charstring\relax\relax\relax2383 \fi2384 \fi2385 \let\MT@char\MT@char@2386 \MT@get@slot@2387 \escapechar\m@ne2388 }2389 2390 2391 \def\MT@get@slot@{%If it’s a legacy (i.e., TFM) font, proceed as usual.2392 \ifnum\XeTeXfonttype\MT@font=\z@2393 \ifnum\MT@char > \m@neIn LuaTEX, it may also be a glyph name, prefixed with ‘/’.2394 2395 \ifnum\MT@char=47\relax2396 \ifMT@norest \else2397 \@tempcnta=\MT@lua{2398 local glyph = <strong>microtype</strong>.name _ to _ slot([[\expandafter\@gobble\@tempa]],true)2399 if glyph then tex.write(glyph)2400 else tex.write(-1)2401 end2402 }\relax2403 \ifnum\@tempcnta `\the\MT@toks’ is a glyph name (\the\@tempcnta)}%2409 \fi2410 \fi2411 \else2412 If the user has specified something like ‘fi’, or wanted to define a number butforgot to use three digits, we’ll have something left of the string. In this case, weissue a warning and forget the complete string.2413 \ifMT@norest \else

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!