Guest User

Untitled

a guest
Feb 25th, 2018
94
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 3.19 KB | None | 0 0
  1. .sty
  2.  
  3. renewcommand{sfdefault}{phv}
  4.  
  5. renewcommand{sfdefault}{PTSansCaption-TLF}
  6.  
  7. renewcommand{rmdefault}{...}
  8. renewcommand{ttdefault}{...}
  9.  
  10. fontfamily{<familyname>}selectfont
  11.  
  12. newcommand*{myfont}{fontfamily{<familyname>}selectfont}
  13.  
  14. {fontfamily{<familyname>}selectfont ...}
  15.  
  16. {myfont ...}
  17.  
  18. begingroup
  19. myfont ...
  20. endgroup
  21.  
  22. newenvironment{myfont}{fontfamily{<familyname>}selectfont}{par}
  23.  
  24. begin{myfont}
  25. Some text in the new font.
  26. end{myfont}
  27.  
  28. DeclareTextFontCommand{textmyfont}{myfont}
  29.  
  30. Text in the default font. textmyfont{Text in the new font.} Again text in the default font.
  31.  
  32. documentclass{article}
  33. usepackage{fontspec}
  34. setmainfont{<any font on your system>}
  35. begin{document}
  36. ...
  37. end{document}
  38.  
  39. setmainfont[<font features>]{<name of font>} % sets the roman font
  40. setsansfont[<font features>]{<name of font>} % sets the sans font
  41. setmonofont[<font features>]{<name of font>} % sets the monospace font
  42.  
  43. newfontfamilymyfont[<font features>]{<name of font>}
  44.  
  45. defaultfontfeatures{Ligatures=TeX} % makes this a feature for all selected fonts
  46.  
  47. setmainfont{Linux Libertine O}
  48. newfontfamilymyfont{Linux Libertine O}
  49.  
  50. {myfont ...}
  51.  
  52. begingroup
  53. myfont ...
  54. endgroup
  55.  
  56. newenvironment{myfont}{myfont}{par}
  57.  
  58. begin{myfont}
  59. Some text in the new font.
  60. end{myfont}
  61.  
  62. DeclareTextFontCommand{textmyfont}{myfont}
  63.  
  64. Text in the default font. textmyfont{Text in the new font.} Again text in the default font.
  65.  
  66. export OSFONTDIR="/usr/local/share/fonts;$HOME/.fonts"
  67.  
  68. mtxrun --script fonts --reload
  69.  
  70. mtxrun --script fonts --list --all
  71.  
  72. ams wncysc10 wncysc10.afm
  73. amsbold wncyb10 wncyb10.afm
  74. amsmedium wncysc10 wncysc10.afm
  75. antpoltbold antpoltbold antpolt-bold.otf
  76. antpoltbolditalic antpoltbolditalic antpolt-bolditalic.otf
  77. antpoltcondbold antpoltcondbold antpoltcond-bold.otf
  78. antpoltcondbolditalic antpoltcondbolditalic antpoltcond-bolditalic.otf
  79. antpoltconditalic antpoltconditalic antpoltcond-italic.otf
  80. antpoltcondregular antpoltcondregular antpoltcond-regular.otf
  81. antpoltexpdbold antpoltexpdbold antpoltexpd-bold.otf
  82.  
  83. mtxrun --script fonts --list --pattern=deli* --all
  84.  
  85. delicious deliciousbold Delicious-Bold.otf
  86. deliciousbold deliciousbold Delicious-Bold.otf
  87. deliciousbolditalic deliciousbolditalic Delicious-BoldItalic.otf
  88. deliciousheavy deliciousheavy Delicious-Heavy.otf
  89. deliciousitalic deliciousitalic Delicious-Italic.otf
  90. deliciousmedium deliciousitalic Delicious-Italic.otf
  91. deliciousnormal deliciousroman Delicious-Roman.otf
  92. deliciousregular deliciousheavy Delicious-Heavy.otf
  93. deliciousroman deliciousroman Delicious-Roman.otf
  94. delicioussmallcaps delicioussmallcaps Delicious-SmallCaps.otf
  95.  
  96. definefont [delicious] [name:deliciousroman]
  97.  
  98. definefont [delicious] [name:deliciousroman]
  99.  
  100. starttext
  101.  
  102. start
  103. delicious
  104. input knuth
  105. stop
  106.  
  107. input knuth
  108.  
  109. stoptext
  110.  
  111. ttfamily http://www.ctan.orgnormalfont
  112.  
  113. {ttfamily http://www.ctan.org}
  114.  
  115. begin{ttfamily}
  116. statement 1;
  117. statement 2;
  118. ...
  119. statement n;
  120. end{ttfamily}
Add Comment
Please, Sign In to add comment