From: Makarius <makarius@sketis.net>
On Tue, 12 Aug 2014, Alexander Kurz wrote:
On 6 Aug 2014, at 10:35, Makarius <makarius@sketis.net> wrote:
A simple way to change the style for 'text' blocks is this:
\usepackage{color}
\renewenvironment{isamarkuptext}{\par\isastyletext\color{red}\begin{isapar}}{\end{isapar}}Thanks a lot, that works.
**) What if I want to change the color of the Isabelle code (instead of
the color of the text)?
The isabelle.sty file defines various \isastyle macros near the start, but
note that certain high-level macros like \isabellestyle redefine them
again later. You can have the last word in redefinition like this:
\renewcommand{\isastyle}{\small\it\color{blue}}
\renewcommand{\isastyletext}{\normalsize\rm\color{black}}
\renewcommand{\isastyletxt}{\rm\color{black}}
\renewcommand{\isastylecmt}{\rm\color{black}}
**) The command "isabelle build -D …” takes a lot of time (approx a
minute) to produce the pdf. If I look at the log there seems to be going
a lot before pdflatex starts. Is all of this needed if I just want to
get a quick pdf? Is there an option that would shorten the time needed
to produce the pdf?
It depends on the base session of your Isabelle document. The "isabelle
build" invokation is slowed down by JVM warmup and the size of the total
source dependencies, before actually starting the build. The startup can
be accelarated by running the build tool directly from the Isabelle/Scala
shell that is available in Isabelle/jEdit via the Console/Scala
sub-plugin.
Here is an example for Isabelle2014-RC3:
Build.build(PIDE.options.value, new Build.Console_Progress, select_dirs = List(Path.explode("~/tmp/Test")))
This corresponds to the following bash command line:
isabelle build -D ~/tmp/Test
Makarius
From: Alexander Kurz <axhkrz@gmail.com>
Hello,
I have a question on the Isabelle document preparation using the command
isabelle build -D MySession
Is there an elegant way of outputting different colours? Eg Isabelle code in black and the latex text in between in blue?
At the moment I am doing this by explicitly changing the colour inside the text{…} but that is tedious and, moreover, does not allow me to change the colour of the Isabelle code.
Any help?
Best wishes,
Alexander
From: Makarius <makarius@sketis.net>
Isabelle document preparation is a fine art, and many more tricks have
accumulated over the years. Ultimately the generated tex source determines
the meaning within the typesetting system. I recommend to study the
generated .tex sources from the .thy and the isabelle sty files -- it all
accumulates in the document_output directory.
A simple way to change the style for 'text' blocks is this:
\usepackage{color}
\renewenvironment{isamarkuptext}{\par\isastyletext\color{red}\begin{isapar}}{\end{isapar}}
You can also use semi-formal "tags" of document elements. Some commands
already have an implicit tag, e.g. theory begin/end and proof commands.
Their style can be changed like this:
\renewcommand{\isatagtheory}{\begingroup\color{blue}}
\renewcommand{\endisatagtheory}{\endgroup}
\renewcommand{\isatagproof}{\begingroup\color{green}}
\renewcommand{\endisatagproof}{\endgroup}
The notation %mytag after some command changes the default tag on the spot
and inserts isatag macros accordingly, which can then be defined in latex.
Makarius
Last updated: Nov 21 2024 at 12:39 UTC