progress of fontspec and unicode math
play

Progress of fontspec and unicode-math Will Robertson July 22, 2018 - PowerPoint PPT Presentation

1/52 Progress of fontspec and unicode-math Will Robertson July 22, 2018 2/52 Setting the scene 2/52 Setting the scene 3/52 How long has it been?? [XeTeX] Package for font loading Will Robertson will at guerilla.net.au Fri Oct 15


  1. 1/52 Progress of fontspec and unicode-math Will Robertson July 22, 2018

  2. 2/52 Setting the scene

  3. 2/52 Setting the scene

  4. 3/52 How long has it been?? [XeTeX] Package for font loading Will Robertson will at guerilla.net.au Fri Oct 15 12:04:24 CEST 2004 Hi all I've got a first release ready of a package for XeLaTeX that allows dynamic font loading, supporting all of the rich font features in AAT. It doesn't yet support OpenType, but that's coming. It allows you to use a commands like \typespec[NumberCase=OldStyle, NumberSpacing=Monospaced]{Hoefler Text} or \typespec[Variant=5]{Zapfino} to select a very broad selection of fonts. It's only new, so it will definitely be improved!

  5. 4/52 Introduction unicode-math – modern expl3 package development Code structure CHANGES file expl3 conventions Git branches Test suite Release checklist fontspec – selecting fonts Font loading The interface for font features Typical example ‘Strong’ emphasis Custom encodings Conclusion

  6. 5/52 Introduction Evolution A T EX was my introduction to software engineering — scarily enough data-structures and algorithms • L • fontspec and unicode-math were initially released pre- expl3 • expl3 was needed to advance them beyond crude • Their programming styles evolved with expl3 • Has taken quite some time to become ‘respectable’ !

  7. 6/52 Introduction To discuss practices for T EX software development • fontspec – selecting fonts • unicode-math – learning from my mistakes in best

  8. 7/52 Release checklist Custom encodings ‘Strong’ emphasis Typical example The interface for font features Font loading fontspec – selecting fonts Test suite unicode-math – modern expl3 package development Git branches expl3 conventions CHANGES file Code structure unicode-math – modern expl3 package development Introduction Conclusion

  9. 8/52 unicode-math – modern expl3 package development ( Live demo to re-introduce the package. )

  10. 9/52 Release checklist Custom encodings ‘Strong’ emphasis Typical example The interface for font features Font loading fontspec – selecting fonts Test suite unicode-math – modern expl3 package development Git branches expl3 conventions CHANGES file Code structure unicode-math – modern expl3 package development Introduction Code structure Conclusion

  11. • ⟨ pkg ⟩ -code- ⟨ module ⟩ .dtx • ⟨ pkg ⟩ .ins : the standard Docstrip driver • ⟨ pkg ⟩ -code.ltx : typeset code implementation • ⟨ pkg ⟩ .ltx : typeset user documentation • ⟨ pkg ⟩ -doc- ⟨ chapter ⟩ .tex 10/52 unicode-math – modern expl3 package development Code structure • Once upon a time: monolithic dtx files • Now: (thanks Joseph!) • ⟨ pkg ⟩ .dtx : provide metadata

  12. • ⟨ pkg ⟩ .ins : the standard Docstrip driver • ⟨ pkg ⟩ -code.ltx : typeset code implementation • ⟨ pkg ⟩ .ltx : typeset user documentation • ⟨ pkg ⟩ -doc- ⟨ chapter ⟩ .tex 10/52 unicode-math – modern expl3 package development Code structure • Once upon a time: monolithic dtx files • Now: (thanks Joseph!) • ⟨ pkg ⟩ .dtx : provide metadata • ⟨ pkg ⟩ -code- ⟨ module ⟩ .dtx

  13. • ⟨ pkg ⟩ -code.ltx : typeset code implementation • ⟨ pkg ⟩ .ltx : typeset user documentation • ⟨ pkg ⟩ -doc- ⟨ chapter ⟩ .tex 10/52 unicode-math – modern expl3 package development Code structure • Once upon a time: monolithic dtx files • Now: (thanks Joseph!) • ⟨ pkg ⟩ .dtx : provide metadata • ⟨ pkg ⟩ -code- ⟨ module ⟩ .dtx • ⟨ pkg ⟩ .ins : the standard Docstrip driver

  14. • ⟨ pkg ⟩ .ltx : typeset user documentation • ⟨ pkg ⟩ -doc- ⟨ chapter ⟩ .tex 10/52 unicode-math – modern expl3 package development Code structure • Once upon a time: monolithic dtx files • Now: (thanks Joseph!) • ⟨ pkg ⟩ .dtx : provide metadata • ⟨ pkg ⟩ -code- ⟨ module ⟩ .dtx • ⟨ pkg ⟩ .ins : the standard Docstrip driver • ⟨ pkg ⟩ -code.ltx : typeset code implementation

  15. • ⟨ pkg ⟩ -doc- ⟨ chapter ⟩ .tex 10/52 unicode-math – modern expl3 package development Code structure • Once upon a time: monolithic dtx files • Now: (thanks Joseph!) • ⟨ pkg ⟩ .dtx : provide metadata • ⟨ pkg ⟩ -code- ⟨ module ⟩ .dtx • ⟨ pkg ⟩ .ins : the standard Docstrip driver • ⟨ pkg ⟩ -code.ltx : typeset code implementation • ⟨ pkg ⟩ .ltx : typeset user documentation

  16. 10/52 unicode-math – modern expl3 package development Code structure • Once upon a time: monolithic dtx files • Now: (thanks Joseph!) • ⟨ pkg ⟩ .dtx : provide metadata • ⟨ pkg ⟩ -code- ⟨ module ⟩ .dtx • ⟨ pkg ⟩ .ins : the standard Docstrip driver • ⟨ pkg ⟩ -code.ltx : typeset code implementation • ⟨ pkg ⟩ .ltx : typeset user documentation • ⟨ pkg ⟩ -doc- ⟨ chapter ⟩ .tex

  17. 11/52 Release checklist Custom encodings ‘Strong’ emphasis Typical example The interface for font features Font loading fontspec – selecting fonts Test suite unicode-math – modern expl3 package development Git branches expl3 conventions CHANGES file Code structure unicode-math – modern expl3 package development Introduction CHANGES file Conclusion

  18. 12/52 unicode-math – modern expl3 package development CHANGES file CHANGE HISTORY ============== ## v0.8m () * Restore behaviour of legacy syntax `x_\mathrm{x}` (i.e., with no braces). While strictly ‘incorrectly’, this usage is widely used. ## v0.8l (2018/02/02) * Issue an error message if `\setmathfont{...}[range=...]` is used first; a `range` declaration inherently implies a subset, so a ‘main’ math font needs to be set up first. * Fix issue when nesting `\mathXX` and `\symZZ` commands. (#356, #435, #438) * ...

  19. 13/52 Release checklist Custom encodings ‘Strong’ emphasis Typical example The interface for font features Font loading fontspec – selecting fonts Test suite unicode-math – modern expl3 package development Git branches expl3 conventions CHANGES file Code structure unicode-math – modern expl3 package development Introduction expl3 conventions Conclusion

  20. 14/52 unicode-math – modern expl3 package development expl3 conventions \usepackage[enable-debug]{expl3} \ExplSyntaxOn \debug_on:n { check-declarations, check-expressions, deprecation } \ExplSyntaxOff • ‘Auto-checking’: • Indentation • Variables defined up front • Separation between internal and user-facing commands • …

  21. 15/52 Release checklist Custom encodings ‘Strong’ emphasis Typical example The interface for font features Font loading fontspec – selecting fonts Test suite unicode-math – modern expl3 package development Git branches expl3 conventions CHANGES file Code structure unicode-math – modern expl3 package development Introduction Git branches Conclusion

  22. 16/52 unicode-math – modern expl3 package development Git branches Branches

  23. 17/52 Release checklist Custom encodings ‘Strong’ emphasis Typical example The interface for font features Font loading fontspec – selecting fonts Test suite unicode-math – modern expl3 package development Git branches expl3 conventions CHANGES file Code structure unicode-math – modern expl3 package development Introduction Test suite Conclusion

  24. 18/52 unicode-math – modern expl3 package development Test suite Early days of the test suite: E L A T EX → pdf → png → ImageMagick • X • A horribly-fragile and hard-to-read Makefile • Pixel by pixel comparisons • Slow, lots of false negatives • Nonetheless, a large number of tests produced

  25. • It is really not fine. • Slowly re-write all tests with custom, minimal, logging. 19/52 unicode-math – modern expl3 package development Test suite l3build brought automated unit testing to the masses: • Just wrap \loggingoutout around everything is fine?

  26. • Slowly re-write all tests with custom, minimal, logging. 19/52 unicode-math – modern expl3 package development Test suite l3build brought automated unit testing to the masses: • Just wrap \loggingoutout around everything is fine? • It is really not fine.

  27. 19/52 unicode-math – modern expl3 package development Test suite l3build brought automated unit testing to the masses: • Just wrap \loggingoutout around everything is fine? • It is really not fine. • Slowly re-write all tests with custom, minimal, logging.

  28. 20/52 unicode-math – modern expl3 package development Test suite Example test input \input{umtest-preamble} \usepackage{fontspec} \setmathsf{texgyrecursor-regular.otf} \usepackage{unicode-math} \begin{document} \START \TESTBOX{$\mathsf{X}=X$} \end{document}

  29. 21/52 .\glue(\thickmuskip) 2.77779 plus 2.77779 *************** l. ...\TESTBOX{$\mathsf{X}=X$} \relax <to be read again> ! OK. .\mathoff .\kern0.51 .\TU/latinmodern-math.otf(1)/m/n/10 glyph#1293 .\TU/latinmodern-math.otf(1)/m/n/10 glyph#30 unicode-math – modern expl3 package development .\glue(\thickmuskip) 2.77779 plus 2.77779 .\TU/texgyrecursor-regular.otf(0)/m/n/10 glyph#116 .\mathon \hbox(0.0+0.0)x0.0 > \box...= Don't change this file in any respect. This is a generated file for the l3build validation system. Example test output Test suite Compilation 1 of test file completed with exit status 256

Download Presentation
Download Policy: The content available on the website is offered to you 'AS IS' for your personal information and use only. It cannot be commercialized, licensed, or distributed on other websites without prior consent from the author. To download a presentation, simply click this link. If you encounter any difficulties during the download process, it's possible that the publisher has removed the file from their server.

Recommend


More recommend