--- a/IsaMakefile Tue Nov 03 07:10:05 2009 +0100
+++ b/IsaMakefile Tue Nov 03 13:57:03 2009 +0100
@@ -27,6 +27,9 @@
$(ISABELLE_TOOL) version > ProgTutorial/generated/version
$(ML_HOME)/poly -v > ProgTutorial/generated/pversion
$(ISABELLE_TOOL) document -o pdf ProgTutorial/generated
+ makeindex -o ProgTutorial/generated/root.stu ProgTutorial/generated/root.str
+ $(ISABELLE_TOOL) document -o pdf ProgTutorial/generated
+## $(ISABELLE_TOOL) document -o pdf ProgTutorial/generated
@cp ProgTutorial/document.pdf progtutorial.pdf
## clean
--- a/ProgTutorial/FirstSteps.thy Tue Nov 03 07:10:05 2009 +0100
+++ b/ProgTutorial/FirstSteps.thy Tue Nov 03 13:57:03 2009 +0100
@@ -404,7 +404,7 @@
comprehension of the code, but after getting familiar with them, they
actually ease the understanding and also the programming.
- The simplest combinator is @{ML_ind I in Basic_Library}, which is just the
+ The simplest combinator is @{ML_ind I in Library}, which is just the
identity function defined as
*}
--- a/ProgTutorial/document/root.tex Tue Nov 03 07:10:05 2009 +0100
+++ b/ProgTutorial/document/root.tex Tue Nov 03 13:57:03 2009 +0100
@@ -14,7 +14,6 @@
\usepackage{boxedminipage}
\usepackage{mathpartir}
\usepackage{flafter}
-\usepackage{makeidx}
\usepackage{index}
\usepackage{tocbibind}
\usepackage{tikz}
@@ -30,7 +29,8 @@
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% indexing
-\makeindex
+\newindex{default}{idx}{ind}{Index}
+\newindex{str}{str}{stu}{Structure Index}
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% For cross references to the other manuals:
@@ -180,7 +180,10 @@
\bibliographystyle{abbrv}
\bibliography{root}
-% index
+% indices
+\setindexname{Structure Index}
+\printindex[str]
+\setindexname{Index}
\printindex
\end{document}
--- a/ProgTutorial/output_tutorial.ML Tue Nov 03 07:10:05 2009 +0100
+++ b/ProgTutorial/output_tutorial.ML Tue Nov 03 13:57:03 2009 +0100
@@ -69,9 +69,15 @@
then implode ["\\index{", get_indstring m, "}"]
else implode ["\\index{", get_indstring m, " (", get_indstring n, ")}"])
+fun get_str_index {main = m, minor = n} =
+ (case n of
+ Struct s => implode ["\\index[str]{{\\tt\\slshape{}", get_word s, "}!", get_indstring m, "}"]
+ | _ => "")
+
fun output_indexed ind txt =
txt |> output
|> prefix (get_index ind)
+ |> prefix (get_str_index ind)
fun boolean "" = true
| boolean "true" = true
Binary file progtutorial.pdf has changed