10.07.2015 Views

The microtype package

The microtype package

The microtype package

SHOW MORE
SHOW LESS

You also want an ePaper? Increase the reach of your titles

YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.

IMPLEMENTATION: Preliminaries 45\MT@ifdim\MT@ifstreq485 \setbox\z@=\hbox{%486 \MT@count=1#1\relax487 \ifnum\MT@count=\@ne488 \aftergroup\@secondoftwo489 \else490 \aftergroup\@firstoftwo491 \fi492 }%493 }494 495 }496 \def\MT@ifdimen#1{\csname\MT@lua{<strong>microtype</strong>.if _ dimen([[#1]])}\endcsname}497 498 local function if _ dimen(s)499 if (find(s, "^-*[0-9]+(%a*) *$") or500 find(s, "^-*[0-9]*[.,][0-9]+(%a*) *$")) then501 tex _ write("@firstoftwo")502 else503 tex _ write("@secondoftwo")504 end505 end506 <strong>microtype</strong>.if _ dimen = if _ dimen507508 Test floating point numbers.509 510 \def\MT@ifdim#1#2#3{%511 \ifdim #1\p@ #2 #3\p@512 \expandafter\@firstoftwo513 \else514 \expandafter\@secondoftwo515 \fi516 }517 Test whether two strings (fully expanded) are equal.518 519 \MT@requires@pdftex5{520 \def\MT@ifstreq#1#2{%521 \ifcase\pdfstrcmp{#1}{#2}\relax522 \expandafter\@firstoftwo523 \else524 \expandafter\@secondoftwo525 \fi526 }527 }{528 529 530 \def\MT@ifstreq#1#2{%531 \edef\MT@res@a{#1}%532 \edef\MT@res@b{#2}%533 \ifx\MT@res@a\MT@res@b534 \expandafter\@firstoftwo535 \else536 \expandafter\@secondoftwo537 \fi538 }539 540 }541 \def\MT@ifstreq#1#2{\csname\MT@lua{<strong>microtype</strong>.if _ str _ eq([[#1]],[[#2]])}\endcsname}542 543 local function if _ str _ eq(s1, s2)544 if s1 == s2 then545 tex _ write("@firstoftwo")

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

Saved successfully!

Ooh no, something went wrong!