Advertisement
Guest User

Untitled

a guest
Aug 31st, 2015
189
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 23.55 KB | None | 0 0
  1. documentclass[10pt,a4paper]{article}
  2. makeatletter
  3. %</driver>
  4. % Let's abolish CM! We use Charter and Letter Gothic
  5. % (for the pre-built documentation on CTAN):
  6. usepackage[charter]{mathdesign}
  7. defrmdefault{bch} % not scaled
  8. defsfdefault{SourceSansPro-TLF}
  9. newcommand*{SourceSansPro@scale}{1.02}
  10. defttdefault{blg}
  11. {ttfamilyselectfont
  12. DeclareFontShape{T1}{blg}{k}{n}{<-> ssub * blg/b/n}{}}
  13. usepackage{ifpdf,ifluatex,ifxetex}
  14. %<*!docsty>
  15. usepackage[latin1]{ifluatex luafi inputenc}
  16. %</!docsty>
  17. usepackage[T1]{fontenc}
  18. usepackage{textcomp}
  19. %dpcGetFileInfo{jobname.dtx}
  20. usepackage[expansion=false,kerning=true]{microtype}%dpc[filedate]
  21. DeclareMicrotypeSet*[protrusion]
  22. { doc }
  23. { encoding = {*, TS1, OMS},
  24. family = {rm*, tt*},
  25. size = {footnotesize, small, normalsize} }
  26. SetProtrusion
  27. { encoding = OMS,
  28. family = mdbch }
  29. { "68 = {400, }, % langle
  30. "69 = { ,400} } % rangle
  31. DeclareMicrotypeSet*[kerning]
  32. { doc }
  33. { encoding = T1,
  34. family = blg, % typewriter font and ...
  35. font = * } % French sample in section ref{sub:kerning}
  36. SetExtraKerning
  37. { encoding = T1,
  38. family = blg }
  39. { _ = {100,100} } % underscores shouldn't touch
  40. ifxetexelse
  41. % disable ?` and !` ligatures (sample in section ref{sec:disable-ligatures})
  42. DisableLigatures[?,!]{encoding = *, family = rm* }
  43. fi
  44. % Fraktur sample in section ref{sec:lettersp}
  45. IfFileExists{t1mwr.fd}
  46. {deftextfrak##1{{fontfamily{mwr}selectfont ##1}}
  47. ifpdf
  48. SetTracking[no ligatures={f,s,c}]{encoding=T1,family=mwr}{100}
  49. fi}
  50. {IfFileExists{yfonts.sty}
  51. {usepackage{yfonts}
  52. ifpdf
  53. SetTracking[no ligatures={f,s,c}]{encoding=LY,family=yfrak}{100}
  54. fi}
  55. {deftextfrak{rule{.5em}{1.5ex}@gobble}}}
  56. tolerance=700
  57. ifpdf
  58. ifnumpdftexversion<140 else % pdftex 1.40, including textmatrix patch,
  59. microtypesetup{expansion=alltext,step=1} % hence we can activate expansion ...
  60. tolerance=300 % ... and make TeX almost as intolerant as it normally is
  61. %dpc g@addto@macromacrocode{microtypesetup{expansion=false}}
  62. pdfminorversion=5 % for the OCGs
  63. fi
  64. % bonus material
  65. InputIfFileExists{microtype-logo.dtx}relaxrelax
  66. InputIfFileExists{microtype-lssample.dtx}relaxrelax
  67. usepackage{pdfpages}
  68. else
  69. letlsstylerelax
  70. fi
  71. ifluatex % microtype.dtx finally compiles with 0.35!
  72. microtypesetup{kerning=false}
  73. fi
  74. ifxetex
  75. microtypesetup{kerning=false}
  76. fi
  77. usepackage{booktabs}
  78. usepackage{array}
  79. newcolumntype{L}[1]{p{#1}<{raggedright}}
  80. usepackage{color}
  81. definecolor{thered} {rgb} {0.65,0.04,0.07}
  82. definecolor{thegreen} {rgb} {0.06,0.44,0.08}
  83. definecolor{theblue} {rgb} {0.02,0.04,0.48}
  84. definecolor{sectioning}{gray}{0.44}
  85. definecolor{thegrey} {gray}{0.5}
  86. definecolor{theframe} {gray}{0.75}
  87. definecolor{theshade} {gray}{0.94}
  88. usepackage{graphicx}
  89. % general layout
  90. frenchspacing
  91. DeclareRobustCommandtextoractual[2]{ifpdf
  92. pdfliteral direct{/Span<</ActualText(#2)>>BDC}#1pdfliteral direct{EMC}%
  93. else #1fi}
  94. expandafternewifcsname ifcmrendcsname
  95. longdef@tempa{cmr}
  96. ifxrmdefault@tempa
  97. cmrtrue
  98. defPackageFont{sffamily}
  99. defmatch{textbullet}
  100. usepackage{amssymb} % varnothing
  101. letOrigTeXTeX
  102. defTeX{textoractual{OrigTeX}{TeX}}
  103. setlengthtextheight{49baselineskip}
  104. else
  105. defbfdefault{b}
  106. defModule#1{{color{theblue}textoractual{$langle$}{<}textit{#1}textoractual{$rangle$}{>}}}
  107. defTeX{textoractual{Tkern-.1667emlower.4exhbox{E}kern-.125emX@}{TeX}}
  108. DeclareRobustCommandLaTeX{textoractual{Lkern-.26em{sboxz@ Tvbox tohtz@{%
  109. hbox{check@mathfontsfontsizesf@sizez@math@fontsfalseselectfont A}%
  110. vss}}}{La}kern-.1emTeX}
  111. defPackageFont{ttfamily}
  112. defmatch{{largeraisebox{-.15em}{textbullet}}}
  113. {catcode``=active % indiscernible from ' in Bitstream Letter Gothic
  114. %dpc g@addto@macromacro@code{let`textasciigrave}
  115. }
  116. linespread{1.07}normalfont
  117. setlengthtextheight{48baselineskip}
  118. fi
  119. addtolengthtextheight{topskip}
  120. setlengthtopmargin{5pt}
  121. % sections
  122. %def@seccntformat#1{setbox0hbox to0pt{hsscolorbox{theshade}{spacecolor{sectioning}csname the#1endcsnamestrutspace}hskipmarginparsep}ht0=0pt dp0=0pt box0}
  123. def@seccntformat#1{llap{csname the#1endcsnamehskipmarginparsep}}
  124. defsection{@startsection {section}{1}{z@}%
  125. {-3.5ex @plus -1ex @minus -.2ex}%
  126. {2.3ex @plus.2ex}%
  127. {normalfontLargefontseries{k}sffamilycolor{sectioning}}}
  128. defsubsection{@startsection{subsection}{2}{z@}%
  129. {-3.25ex@plus -1ex @minus -.2ex}%
  130. {1.5ex @plus .2ex}%
  131. {normalfontlargefontseries{k}sffamilycolor{sectioning}}}
  132. defsubsubsection{@startsection{subsubsection}{3}{z@}%
  133. {-3.25ex@plus -1ex @minus -.2ex}%
  134. {1.5ex @plus .2ex}%
  135. {normalfontnormalsizefontseries{k}sffamilycolor{sectioning}}}
  136. defparagraph{@startsection{paragraph}{4}%
  137. {0pt}{8pt plus 2pt minus 1pt}{-1em}%
  138. {normalfontnormalsizeitshape}}
  139. % title
  140. def@maketitle{%
  141. newpagenullvskip 2em
  142. begin{center}letfootnotethankssffamily
  143. {huge @titlepar}vskip 1.5em
  144. {large parbox{.33textwidth}{centering@author}%
  145. parbox{.33textwidth}{centering@date}}%
  146. vskip2.5emrule{textwidth}{.4pt}%
  147. end{center}parvskip1.5em}
  148. defabstractname{}
  149. % headers
  150. headheight=15pt
  151. defps@MTheadings{%
  152. def@oddhead{%
  153. hbox totextwidth{vbox{hbox totextwidth{%
  154. footnotesizesffamily{leftmarkrightmarkstrut}hfillthepagestrut}%
  155. hrule height 0.4pt widthtextwidth vskip-0.4pt
  156. }}hss}
  157. let@oddfoot@empty
  158. let@mkbothmarkboth
  159. defsectionmark##1{markboth{textls*[70]{MakeUppercase{##1}}}{}}
  160. defsubsectionmark##1{markright{: ##1}}}
  161. pagestyle{MTheadings}
  162. % toc
  163. letl@section@l@section
  164. defl@section{vskip -1.25exl@section@}
  165. defl@subsection{vskip.35ex penalty@secpenalty @dottedtocline{2}{1.5em}{2.7em}}
  166. defl@subsubsection#1#2{%
  167. leftskip 4.2em
  168. rightskip 2em plus 2em
  169. parindent 0pt
  170. {letnumberline@gobble{small #1~[#2]}}}
  171. defl@table{@dottedtocline{1}{0pt}{1.5em}}
  172. def@pnumwidth{1.7em}
  173. ifpdf
  174. letORIGpdfoutlinepdfoutline
  175. defspecial@outlines{attr{/F 01}}
  176. defnormaloutline {protected@write@outlinefile{}{letpdfoutline ORIGpdfoutline}}
  177. defspecialoutline{protected@write@outlinefile{}{defpdfoutline{ORIGpdfoutlinespecial@outlines}}}
  178. g@addto@macroappendix{specialoutline}
  179. fi
  180. defdefspecial@toc#1#2#3{longdef#1{%
  181. ifpdfphantomsectionspecialoutlinepdfbookmark[1]{#2}{#3}normaloutlinefi
  182. section*{#2}@mkboth{textls*[60]{MakeUppercase{#2}}}{}%
  183. @starttoc{#3}}}
  184. defspecial@toctableofcontentscontentsname{toc}
  185. defspecial@toclistoftableslisttablename{lot}
  186. % bibliography
  187. def@cite#1#2{#1if@tempswa, #2fi}
  188. defthebibliography#1{%
  189. section{refname}%
  190. list{}{leftmargin 0pt}%
  191. sloppy
  192. clubpenalty 4000
  193. @clubpenalty clubpenalty
  194. widowpenalty 4000}
  195. def@biblabel#1{}
  196. % footnotes
  197. longdef@makefntext#1{%
  198. leftskip 0pt
  199. parindent 0pt
  200. everypar{parindent 0pt}%
  201. leavevmodellap{@thefnmarkhskipmarginparsep}#1}
  202. renewcommandfootnoterule{%
  203. kern-3p@
  204. hrule@width columnwidth
  205. kern2.6p@}
  206. skip@mpfootins=4pt
  207. % lists
  208. setlengthleftmargini{15pt}
  209. setlengthleftmarginii{12.5pt}
  210. setlengthleftmarginiii{10pt}
  211. def@listi{leftmargin leftmargini
  212. parsep 4.5pt plus 1pt minus 1pt
  213. topsep 4.5pt plus 1pt minus 1pt
  214. itemsep 0pt}
  215. let@listI@listi
  216. defdescriptionlabel#1{hspacelabelsepnormalfont#1:}
  217. renewenvironment{itemize}
  218. {ifnum @itemdepth >thr@@@toodeepelse
  219. advance@itemdepth@ne
  220. edef@itemitem{labelitemromannumeralthe@itemdepth}%
  221. expandafterlist
  222. csname@itemitemendcsname
  223. {ifnum@itemdepth=@neleftmargin 0ptfi
  224. defmakelabel##1{hssllap{##1}}}%
  225. fi}
  226. {endlist}
  227. newenvironment{enum}[1][0]
  228. {listlabelenumi
  229. {usecounter{enumi}setcounter{enumi}{#1}addtocounter{enumi}{-1}%
  230. renewcommandlabelenumi{texttt{theenumi}:}%
  231. leftmargin 30pt
  232. itemindent-15pt
  233. labelwidth 15pt
  234. labelsep 0pt
  235. defmakelabel##1{##1hss}}}
  236. {endlist}
  237. newenvironment{options}
  238. {list{}
  239. {leftmargin 0pt
  240. labelwidth 0pt
  241. labelsep 1em
  242. itemindent labelsep
  243. lstset{belowskip=0pt}}}
  244. {endlist}
  245. % boxes (for some reason, mathdesign changes these values) % still?
  246. setlengthfboxrule{0.4pt}
  247. setlengthfboxsep{3pt}
  248. setlengtharrayrulewidth{0.4pt}
  249. % tables
  250. setlengthtabcolsep{2pt}
  251. longdef@makecaption#1#2{%
  252. setboxmt@boxvbox{llap{vbox{% fboxsep = 4pt
  253. vskipdimexprfloatsep-4pt+fboxrulerelax
  254. hsizedimexprmarginparwidth-marginparsep-4pt-fboxrulerelax
  255. rightskipdimexprmarginparsep+4pt+fboxrulerelax plus 2.5em
  256. footnotesize {sffamily#1:}\[-dimexpraboverulesep+cmidrulewidth+3.5fboxrule]
  257. textcolor{theframe}{vrule width hsize heightfboxrule}\[.3baselineskip]sffamily#2}}}
  258. mt@unvdimendimexprhtmt@box+dpmt@boxrelax
  259. unvboxmt@box
  260. vskip-mt@unvdimen}
  261. % index and change log
  262. %dpcIndexPrologue{section{Index}%
  263. %dpc Links (in blue) refer to the page where the corresponding entry is described
  264. %dpc (bold face) resp. occurs. Plain numbers (in black) refer to the code line
  265. %dpc where the corresponding entry is defined (underlined) resp. used.}
  266. %dpcGlossaryPrologue{section{Change history}label{sec:changes}vspace*{-multicolsep}}
  267. %dpc %setcounter{finalcolumnbadness}{100}
  268. %raggedcolumns
  269. %dpcsetcounter{IndexColumns}{2}
  270. %dpcdefIndexMin{12baselineskip}
  271. %dpcg@addto@macroIndexParms{%
  272. %dpc...}
  273. % macro code
  274. %dpcMacroTopsep=0pt
  275. %dpcMacrocodeTopsep=3pt
  276. %dpcsetlengthMacroIndent{0pt}
  277. deftheCodelineNo{reset@fontsffamilycolor{thegrey}scriptsize
  278. textoractual{arabic{CodelineNo} }{}}% don't copy line numbers
  279. defMacroFont{ttfamilysmall}
  280. defAltMacroFont{ttfamilyfootnotesize}
  281. defPrintMacroName#1{strutMacroFontstring #1hskip15pt}
  282. defImplementationSettings{%
  283. linespread{1}%
  284. hfuzz=10pt
  285. defMacroFont{ttfamilyfootnotesize}%
  286. letmacro@fontMacroFont}
  287. % additional bells ...
  288. defDescribe#1#2#3{noindentcsname Describe#1endcsname{#2}%
  289. DescribeValues{#1}{#3}}
  290. defDescribeOption{leavevmode@bsphack
  291. begingroupMakePrivateLettersDescribe@Option}
  292. defDescribe@Option#1{endgroup
  293. marginpar{raggedleftPrintDescribeOption{#1}}%
  294. SpecialOptionIndex{#1}@esphackignorespaces}
  295. defDescribePackage{leavevmode@bsphack
  296. begingroupMakePrivateLettersDescribe@Package}
  297. defDescribe@Package#1{endgroup
  298. marginpar{raggedleftPrintDescribeOption{#1.sty}}%
  299. CatIndex{#1}{package}@esphackignorespaces}
  300. defDescribeValues#1#2{%
  301. let@tempa@empty letOption@default@empty
  302. @for@tempb:=#2do{%
  303. csname Special#1Valueexpandafterendcsname@tempb@nil
  304. expandafterg@addto@macroexpandafter@tempa
  305. expandafter{csname #1Sependcsname}%
  306. expandafterg@addto@macroexpandafter@tempa
  307. expandafter{@tempb}}%
  308. @ifnextchar[PrintValues{PrintValues[Option@default]}}
  309. defSpecialOptionValue#1#2@nil{%
  310. if#1:def@tempb{Variable{#2}}else % : = variable
  311. if#1!def@tempb{#2}defOption@default{#2}else % ! = default
  312. if#1*def@tempb{#2}defOption@default{MaybeDefault{#2}}% * = default (maybe)
  313. fififi}
  314. defSpecialMacroValue#1#2@nil{%
  315. if#1?def@tempb{normalsize[Variable{#2}]}% % ? = optional
  316. elsedef@tempb{normalsize{Variable{#1#2}}}fi}
  317. letSpecialEnvValueSpecialMacroValue
  318. DeclareRobustCommandlanglechar{<} % for makeindex
  319. DeclareRobustCommandranglechar{>}
  320. defVariable#1{%
  321. textoractual{$langle$}{langlechar}%
  322. {rmfamilyitshapesmall#1}%
  323. textoractual{$rangle$}{ranglechar}}
  324. letm@ameta defmeta#1{textoractual{m@a{#1}}{langlechar#1ranglechar}}
  325. defMaybeDefault#1{textrm{*},#1}
  326. defOptionSep{{rmfamily, }} defMacroSep{,} defEnvironmentSep{,}
  327. defPrintValues[#1]{{MacroFontexpandafter@gobble@tempahfill #1}\*[.25baselineskip]}
  328. defCatIndex#1#2{index{#1actualchar{protectttfamily #1} (#2)encapchar hyperpage}}
  329. defSpecialOptionIndex#1{@bsphackCatIndex{#1}{option}%
  330. index{quotechar!Options % the `!' will be sorted first
  331. actualchar{protectbfseries Options:}%
  332. levelchar{protectttfamily#1}encapchar usage}@esphack}
  333. defSpecialUsageIndex#1{@bsphack{index{quotechar!User Commands
  334. actualchar{protectbfseries User Commands:}%
  335. levelcharexpandafter@gobblestring#1actualcharstringverb
  336. quotechar*verbatimcharstring#1verbatimcharencapchar usage}%
  337. letspecial@indexindexSpecialIndex@{#1}{encapchar usage}}@esphack}
  338. defSpecialEnvIndex#1{CatIndex{#1}{environment}}
  339. defPrintDescribeMacro#1{strutMacroFontcolor{thegreen}string #1}
  340. defPrintDescribeEnv#1{strutMacroFontbslash begin{{color{thegreen}#1}}%
  341. \*[.25baselineskip]strutbslash end{{color{thegreen}#1}}}
  342. defPrintDescribeOption#1{strutMacroFontcolor{thered}#1}
  343. defIndexing{letspecial@indexcodeline@wrindex}
  344. defNoIndexing{letspecial@index@gobble}
  345. defGeneralChanges#1{edefgeneralname{if*#1 Generalelse#1fi}}% mind the space!
  346. DeclareRobustCommandkey[1]{textcolor{thered}{ttfamily#1}}
  347. DeclareRobustCommandpkg[1]{{PackageFont#1}@bsphackCatIndex{#1}{package}@esphack}
  348. DeclareRobustCommandopt[1]{{ttfamily#1}@bsphackCatIndex{#1}{option}@esphack}
  349. DeclareRobustCommandfile[1]{{ttfamily#1}}
  350. defRequiresSep{ textbar }
  351. defrequires#1{let@tempa@empty
  352. @for@tempb:=#1do{%
  353. g@addto@macro@tempaRequiresSep
  354. expandafterg@addto@macroexpandafter@tempaexpandafter{@tempb}}%
  355. hfill{setlengthfboxsep{2pt}%
  356. fcolorbox{theframe}{white}{mdseriessmallstrutcolor{sectioning}%
  357. ,expandafter@gobble@tempa,}}}
  358. % ... and whistles
  359. {catcode`"active
  360. gdefverbatim#1
  361. {catcode`"active def"##1"{colorbox{theshade}{%
  362. textrm{Text lost! Please install the pkg{listings} package.}}}%
  363. @beginparpenaltypredisplaypenalty@verbatimMacroFont
  364. frenchspacing@vobeyspacesexpandafter@xverbatim@gobble}}
  365. IfFileExists{listings.sty}{
  366. usepackage{listings}
  367. lstset{
  368. gobble=1,columns=flexible,keepspaces,upquote,escapechar=",
  369. basicstyle=MacroFont,
  370. keywords=[0]{microtypesetup,DeclareMicrotypeSet,UseMicrotypeSet,
  371. DeclareMicrotypeSetDefault,SetProtrusion,SetExpansion,SetTracking,
  372. SetExtraKerning,SetExtraSpacing,DisableLigatures,DeclareCharacterInheritance,
  373. DeclareMicrotypeVariants,DeclareMicrotypeAlias,DeclareMicrotypeBabelHook,
  374. LoadMicrotypeFile,microtypecontext,textmicrotypecontext,
  375. textls,lsstyle,lslig,Microtype@Hook},
  376. keywordstyle=[0]color{thegreen},
  377. keywords=[1]{protrusion,expansion,activate,DVIoutput,draft,final,verbose,
  378. config,factor,auto,stretch,shrink,step,selected,unit,tracking,kerning,
  379. spacing,letterspace,babel,context,%defersetup,copyfonts, % undocumented
  380. no ligatures,outer spacing,outer kerning}, % there are three nobreakspace in this line
  381. keywordstyle=[1]color{thered},
  382. comment=[l]%,
  383. commentstyle=color{thegrey}itshape,
  384. alsoother={0123456789_},
  385. frame=single,backgroundcolor=color{theshade},rulecolor=color{theframe},
  386. framerule=fboxrule,xleftmargin=3.4pt,xrightmargin=3.4pt,belowskip=smallskipamount
  387. }
  388. letverbatimrelax
  389. lstnewenvironment{verbatim}[1][]{lstset{##1}}{}
  390. ifpdf IfFileExists{dummy-space.pfb}{%
  391. pdfmapline{+dummy-space <dummy-space.pfb}
  392. fontdummyspace=dummy-space
  393. deflst@outputspace{% copy spaces (from a font that really has a space at x20)
  394. setbox0hbox{ }@tempdimawd0
  395. setbox0hbox{dummyspacechar"20}advance@tempdima-wd0
  396. unhbox0 kern@tempdima}
  397. }relax fi
  398. }{
  399. letlstset@gobble
  400. }
  401. %deftodo{changes{zTo Do}{0000/00/00}}
  402. lettodo@gobble
  403. newcommandmicrotypesample[1]{begin{quote}#1end{quote}}
  404. letemptypdfpageresourcesrelax
  405. % fancy PDF document
  406. ifpdf
  407. ifxeTeXversion@undefined else % errors when not using etex (conflict with multicol)
  408. ifxpdfcolorstack@undefined % no longer required with pdftex 1.40
  409. usepackage{pdfcolmk}
  410. fifi
  411. usepackage[bookmarks,bookmarksopen,pdfdisplaydoctitle,
  412. colorlinks,linkcolor=theblue,citecolor=theblue,urlcolor=thered,
  413. hyperindex=false,hyperfootnotes=false]
  414. {hyperref}
  415. usepackage{hyperxmp}
  416. usepackage{attachfile}
  417. %usepackage{pdfpages}
  418. hypersetup{
  419. pdftitle={The microtype package},
  420. pdfauthor={R Schlicht <w.m.l@gmx.net>},
  421. pdfsubject={Subliminal refinements towards typographical perfection},
  422. pdfkeywords={TeX, LaTeX, pdfTeX, LuaTeX, XeTeX, typography, micro-typography,
  423. character protrusion, margin kerning, optical alignment, font expansion,
  424. font scaling, hz, kerning, spacing, glue, letterspacing, tracking, ligatures}
  425. pdfcopyright={textcopyright 2004--2013 R Schlicht12%
  426. This work may be distributed and/or modified under the conditions
  427. of the LaTeX Project Public License, either version 1.3c of this
  428. license or (at your option) any later version.&#xA;%
  429. This work has the LPPL maintenance status `author-maintained'.},
  430. pdflicenseurl={http://www.latex-project.org/lppl/}
  431. }
  432. pdfcatalog{/Lang(en-GB)}
  433. ifnumpdftexversion < 130 else
  434. IfFileExists{hypdestopt.sty}{usepackage{hypdestopt}}relaxfi
  435. defusage#1{textbf{hyperpage{#1}}}% for indexing of DescribeMacro ...
  436. defchanges@#1#2#3{% ... the changes ...
  437. protected@edef@tempa{noexpandglossary{#1levelchar
  438. ifxsaved@macroname@empty spaceactualchargeneralname
  439. elseexpandafter@gobblesaved@macronameactualchar
  440. stringverbquotechar*verbatimcharsaved@macronameverbatimcharfi
  441. :levelchar #3encapchar hyperpage}}%
  442. @tempaendgroup@esphack}
  443. %deftheCodelineNo{% % ... and everything else (would double the pdf file size)
  444. % reset@fontcolor{thegrey}scriptsize
  445. % @tempcntaarabic{CodelineNo}advance@tempcnta by@ne
  446. % hypertarget{L:number@tempcnta}{arabic{CodelineNo}}}
  447. %defmain#1{underline{hyperlink{L:#1}{#1}}}
  448. %defcodeline#1{link@sanitize#1-@nil{#1}}
  449. %deflink@sanitize#1-#2@nil{link@@sanitize#1,@nil}
  450. %deflink@@sanitize#1,#2@nil{hyperlink{L:#1}}
  451. %defSpecialIndex#1{@bsphackspecial@index{expandafter@gobble
  452. % string#1actualchar
  453. % stringverbquotechar*verbatimcharstring#1verbatimchar
  454. % encapchar codeline}%
  455. % @esphack}
  456. defctanurl#1{Available from acronym{CTAN} at
  457. href{http://mirror.ctan.org/#1}{nolinkurl{/#1}}}
  458. DeclareRobustCommandmailto[1]{href{mailto:#1}{nolinkurl{#1}}}
  459. defmailtoRS{href % some PDF viewers don't like spaces:
  460. {mailto:<w.m.l@gmx.net>%20Robert%20Schlicht?subject=[microtype%20fileversion]}
  461. {texttt{w.m.l@gmx.net}}}
  462. % the samples in the introduction, utilising nested optional content groups (aka. layers):
  463. ifnumpdftexversion<140 else
  464. defmt@layer#1#2{pdfliteral direct{/OC/#1 BDC}#2pdfliteral direct{EMC}}
  465. ifxmt@objects@undefinedletmt@objects@emptyfi
  466. ifxmt@order @undefinedletmt@order @emptyfi
  467. letmt@resources@empty
  468. defmt@register#1#2{%
  469. immediatepdfobj{<< /Type/OCG /Name(#1:#2) >>}
  470. expandafterxdefcsname mt@#1@#2endcsname{thepdflastobjspace 0 R }
  471. xdefmt@objects {mt@objects csname mt@#1@#2endcsname}
  472. xdefmt@order {mt@order csname mt@#1@#2endcsname}
  473. xdefmt@resources{mt@resources/#1#2 csname mt@#1@#2endcsname}}
  474. xdefmt@order{mt@order[(Sample)}
  475. mt@register{Protrusion}{true} mt@register{Protrusion}{false}
  476. mt@register{Expansion} {true} mt@register{Expansion} {false}
  477. mt@register{_compatibility}{}
  478. xdefmt@order{mt@order]}
  479. pdfcatalog{/OCProperties <<
  480. /OCGs [mt@objects]
  481. /D << /Order [mt@order]
  482. /BaseState/OFF
  483. /ON [mt@Protrusion@false mt@Expansion@false
  484. ifxmtl@objects@undefinedelsemtl@objectsfi] >> >> }
  485. newboxmt@box
  486. newdimenmt@unvdimen
  487. defmt@place#1{%
  488. vskip-mt@unvdimen
  489. setboxmt@boxvbox{#1}%
  490. mt@unvdimendimexprhtmt@box+dpmt@boxrelax
  491. unvboxmt@box}
  492. defmt@pseudo@marg#1{%
  493. mt@place{llap{vbox{%
  494. hsizemarginparwidth
  495. rightskip marginparsep plus 1em
  496. leavevmodeitshapefootnotesize #1}}}}
  497. defmt@show@sample#1#2{%
  498. mt@layer{Protrusion#1}{%
  499. mt@layer{Expansion#2}{%
  500. mt@place{microtypesetup{protrusion=#1,expansion=#2}%
  501. mt@sample@text}}}}
  502. defmt@toggle@sample#1{%
  503. pdfstartlink user{/Subtype/Link
  504. /BS << /Type/Border/W 1 /S/D /D[4 1] >>
  505. /H/O /C[0.65 0.04 0.07] /Contents(Click to Toggle #1!)
  506. %/OC << /Type/OCMD /VE[/Not csname mt@_compatibility@endcsname] >> % not honoured by older viewers anyway
  507. /A << /S/SetOCGState /State[/Toggle csname mt@#1@trueendcsname
  508. csname mt@#1@falseendcsname] >>}
  509. #1 hfillpdfendlink & mt@layer{#1true}{rlap{on}}mt@layer{#1false}{off}}
  510. renewcommandmicrotypesample[1]{%
  511. begingroup
  512. leftskip 15pt rightskip 15pt
  513. parskip 4pt parindent 0pt
  514. vskip 8pt % = topsep without vertical stretchability
  515. longdefmt@sample@text{#1}
  516. mt@pseudo@marg{color{theblue}%
  517. After you have read the text on the right, you can view the effect of
  518. the features it describes by clicking on the links:strut\
  519. colorbox{theshade}{%
  520. begin{tabular}{@{}>{upshape}l@{quad}l}
  521. mt@toggle@sample{Protrusion}\addlinespace
  522. mt@toggle@sample{Expansion}
  523. end{tabular}}\[0.3baselineskip]
  524. Both features are enabled throughout this document.}
  525. mt@show@sample{false}{false}
  526. mt@show@sample{false}{true}
  527. mt@show@sample{true} {false}
  528. mt@layer{_compatibility}{%
  529. % for compatibility with older PDF viewers that don't support OCGs, we
  530. % add a layer that contains a white box, which will hide the underlying
  531. % layers for older viewers, and will be ignored by PDF 1.5 capable viewers.
  532. mt@place{rlap{hskip-marginparwidth color{white}%
  533. vrule widthdimexprhsize+marginparwidthrelax heightmt@unvdimen}}
  534. mt@pseudo@marg{color{thered}%
  535. If you had a acronym{PDF} viewer that understands
  536. acronym{PDF},{smaller1.5}, you could view the effect of the
  537. micro-typographic features by clicking on the links.strut
  538. \vphantom{colorbox{white}{tabular l\addlinespace\endtabular}}%
  539. \[0.3baselineskip] Both features are enabled throughout this document.}}
  540. mt@show@sample{true}{true}
  541. vskip 4pt
  542. endgroup
  543. edefx{pdfpageresources{/Properties <<mt@resources>>}}x}
  544. defemptypdfpageresources{pdfpageresources{}}
  545. fi
  546. else
  547. usepackage{url}
  548. newcommandhyperref[2][]{#2}
  549. lethyperpage@firstofone
  550. lettexorpdfstring@firstoftwo
  551. defctanurl{Available from acronym{CTAN} at url}
  552. letnolinkurlurl
  553. letmailtotexttt
  554. defmailtoRS{mailto{w.m.l@gmx.net}}
  555. fi
  556. ifxl@ukenglish@undefined
  557. hyphenation{let-ter-spac-ing let-ter-spaced let-ter-space}
  558. else
  559. language=l@ukenglish
  560. fi
  561. hyphenation{An-dre-as Ber-nard Ha-rald Mi-cha-el Pe-ter Ste-phan Wolf-ram
  562. Har-ders Hop-pe Jac-kow-ski Ku-char-czyk Mei-er Mu-the-si-us Zed-ler
  563. Die-te-rich
  564. Sveinung % ?
  565. Marcin % ?
  566. RazorXsr
  567. with-out
  568. Pa-la-ti-no}
  569. deffallbacktext#1{{centeringitshape[#1]par}}
  570. % abbreviations
  571. DeclareRobustCommandthanh{H`an Th^e%
  572. ifxeTeXversionundefined llap{raisebox{0.5ex}{'{}}}
  573. else llap{raisebox{0.45ex}{'{}kerndimexpr.05em-2fontdimen1fontrelax}}
  574. fi Th`anh}
  575. defpdftex{texorpdfstring{pdfkern.05emTeX}{pdfTeX}}
  576. defluatex{texorpdfstring{Luakern-.05emTeX}{LuaTeX}}
  577. defetex{mbox{e-TeX}}
  578. defnonetex{mbox{rlap{kern.05em/}e-TeX}} % aka. TeX
  579. def@reflect#1{ifdimfontdimen1font=0pt reflectbox{#1}%
  580. else rotatebox[origin=c]{180}{#1}fi}
  581. DeclareRobustCommandxetex{% also reflect the initial `X'?
  582. textoractual{@reflect{X}lower.4exhbox{kern-.12em@reflect{E}}}{Xe}%
  583. kern-.16emTeX}
  584. deftexlive{TeX~Live}
  585. defmicrotype{{PackageFont microtype}}
  586. defletterspace{pkg{letterspace}}
  587. deffontdim{cmdfontdimen,}
  588. defeg{e.g.}
  589. defie{i.e.}
  590. defEM#1{#1kern.1emem}
  591. DeclareRobustCommandsmaller{setboxz@hbox{@tempcnta=f@size
  592. edefx{@tempcnta=the@tempcnta}expandafter}x
  593. advance@tempcnta-7 ifcase@tempcntatinyorscriptsizeor
  594. footnotesizeorsmallorornormalsizeororlargeorororLargefi}
  595. DeclareRobustCommandacronym[1]{texorpdfstring{{smallertextls[60]{#1}}}{#1}}
  596. letless=<
  597. {catcode`<=active
  598. AtBeginDocument{catcode`<=active
  599. def<#1>{acronym{#1}}
  600. defcontributor#1 <#2at#3>{@contributor{#1}{#2@#3}}
  601. DeclareRobustCommand@contributor[2]{textit{#1}}
  602. %DeclareRobustCommand@contributor[2]{href{mailto:#2}{textit{#1}}}
  603. }}
  604. %<*driver>
  605. %dpcCodelineIndex
  606. %dpcEnableCrossrefs
  607. %dpcRecordChanges
  608. %OnlyDescription
  609. begin{document}
  610.  
  611. title{Just a test}
  612. author{me}
  613. maketitle
  614.  
  615. tableofcontents
  616.  
  617. section{Something}
  618. some text
  619.  
  620. end{document}
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement