Commit Graph

11 Commits

Author SHA1 Message Date
Gerwin Klein 75acf19dcd style: pep8 style for python files 2020-03-25 22:42:27 +11:00
Gerwin Klein a424d55e3e licenses: convert license tags to SPDX 2020-03-13 14:38:24 +08:00
Corey Richardson af60787317
various scripts: use print_function uniformly for python3 compat 2016-01-28 16:11:07 +11:00
Matthew Fernandez 81fe5cbd67 misc/pysymbols: Merge some CAmkES functionality for generating apply-style.
This commit resurrects some bitrotted support for generating apply-style proofs
from Python. It is somewhat incomplete and untested, but can serve to make
template proofs much more readable.
2016-01-08 15:47:14 +11:00
Matthew Fernandez de77df45aa misc/pysymbols: Move IsaSymbolsException to a separate file. 2016-01-08 15:47:04 +11:00
Matthew Fernandez 5294d36438 misc/pysymbols: Support for sub/superscripts in code blocks.
Inline code from a Markdown source (`like this`) is typically translated
without the assistance of Pygments. As a result we don't get automatic
subscript and superscript support, and need to roll our own. This translation
is pretty blunt and fragile. Expect it to fall over in a TeX error if you pass,
e.g., a "\<^bsub>" without a closing "\<^esub>".
2015-10-15 15:02:45 +11:00
Matthew Fernandez 1570e45c80 misc/pysymbols: Add support for encoding to TeX.
You probably do *not* want to use this functionality to go straight from THY
files to TeX. The motivation for this is translating inline code in Markdown
(`like this`) into something TeX-able. In particular, we assume all relevant
Isabelle styles and preamble are already in scope.
2015-10-12 19:37:43 +11:00
Matthew Fernandez 69dfc12cda misc/pysymbols: Don't translate entities like "\<^bsub>" into unicode.
The code points of the xsymbols whose ASCII text begins with "\<^" appear to be
a ruse. Their unicode characters do not correspond to their intent because
they are actually format markers. For example, "\<^bsub>" maps to something
described as "south east double arrow," but is intended to mean "start
subscript."

It turns out we do not need to encode these at all because a sufficiently
clever Pygments can interpret their ASCII representations. One such clever
instance is [0]. This commit removes encoding of all symbols whose ASCII
representation begins with "\<^" under the assumption they will be handled by a
later tool in your pipeline.

  [0]: https://bitbucket.org/lsf37/pygments-main/branch/sub-super
2015-10-12 19:34:15 +11:00
Matthew Fernandez bcf211a3ba misc/pysymbols: Optimise unicode to ASCII translation.
With larger THY snippets, this translation can become a noticeable bottleneck.
2015-10-12 19:32:28 +11:00
Matthew Fernandez 47d5b746fc misc: Support for space translation in etc/symbols decoding.
See 74eddfef841e of Isabelle itself for the changeset that implements it.
2015-10-06 17:17:13 +11:00
Matthew Fernandez ffc7b107e5 misc: Add a Python module for dealing with Isabelle symbols. 2015-10-06 17:15:48 +11:00