2019-08-15 14:09:55 +00:00
|
|
|
(*************************************************************************
|
|
|
|
* Copyright (C)
|
|
|
|
* 2019 The University of Exeter
|
|
|
|
* 2018-2019 The University of Paris-Saclay
|
|
|
|
* 2018 The University of Sheffield
|
|
|
|
*
|
|
|
|
* License:
|
|
|
|
* This program can be redistributed and/or modified under the terms
|
|
|
|
* of the 2-clause BSD-style license.
|
|
|
|
*
|
|
|
|
* SPDX-License-Identifier: BSD-2-Clause
|
|
|
|
*************************************************************************)
|
|
|
|
|
2019-07-20 15:08:47 +00:00
|
|
|
section\<open>An example ontology for a scholarly paper\<close>
|
2018-10-23 11:56:18 +00:00
|
|
|
|
|
|
|
theory technical_report
|
2019-07-20 20:12:40 +00:00
|
|
|
imports "../scholarly_paper/scholarly_paper"
|
2020-09-09 14:56:19 +00:00
|
|
|
begin
|
2018-10-23 11:56:18 +00:00
|
|
|
|
2018-11-28 09:49:35 +00:00
|
|
|
(* for reports paper: invariant: level \<ge> -1 *)
|
|
|
|
|
2020-06-23 09:22:33 +00:00
|
|
|
section\<open>More Global Text Elements for Reports\<close>
|
|
|
|
|
2018-11-27 11:53:02 +00:00
|
|
|
doc_class table_of_contents =
|
2018-11-28 09:49:35 +00:00
|
|
|
bookmark_depth :: int <= 3
|
|
|
|
depth :: int <= 3
|
2018-11-27 11:53:02 +00:00
|
|
|
|
|
|
|
doc_class front_matter =
|
2018-11-28 09:49:35 +00:00
|
|
|
front_matter_style :: string (* TODO Achim :::: *)
|
|
|
|
|
|
|
|
doc_class index =
|
|
|
|
kind :: "doc_class"
|
|
|
|
level :: "int option"
|
2018-10-23 11:56:18 +00:00
|
|
|
|
2020-06-23 09:22:33 +00:00
|
|
|
section\<open>Code Statement Elements\<close>
|
|
|
|
|
|
|
|
doc_class "code" = technical +
|
2021-01-02 14:57:28 +00:00
|
|
|
checked :: bool <= "False"
|
2020-06-23 09:22:33 +00:00
|
|
|
caption :: "string" <= "''''"
|
|
|
|
|
|
|
|
|
|
|
|
text\<open>The @{doc_class "code"} is a general stub for free-form and type-checked code-fragments
|
|
|
|
such as:
|
|
|
|
\<^enum> SML code
|
|
|
|
\<^enum> bash code
|
|
|
|
\<^enum> isar code (although this might be an unwanted concurrence to the Isabelle standard cartouche)
|
|
|
|
\<^enum> C code.
|
|
|
|
|
|
|
|
it is intended that later refinements of this "stub" as done in \<^verbatim>\<open>Isabelle_C\<close> which come with their
|
|
|
|
own content checking and, of course, presentation styles.
|
|
|
|
\<close>
|
|
|
|
|
|
|
|
doc_class "SML" = code +
|
|
|
|
checked :: bool <= "False"
|
|
|
|
|
|
|
|
doc_class "ISAR" = code +
|
|
|
|
checked :: bool <= "False"
|
|
|
|
|
|
|
|
doc_class "LATEX" = code +
|
|
|
|
checked :: bool <= "False"
|
|
|
|
|
2020-06-24 11:11:26 +00:00
|
|
|
print_doc_class_template "SML" (* just a sample *)
|
2020-06-23 09:22:33 +00:00
|
|
|
|
|
|
|
|
2018-10-23 11:56:18 +00:00
|
|
|
doc_class report =
|
|
|
|
style_id :: string <= "''LNCS''"
|
|
|
|
version :: "(int \<times> int \<times> int)" <= "(0,0,0)"
|
2018-12-03 10:23:51 +00:00
|
|
|
accepts "(title ~~
|
|
|
|
\<lbrakk>subtitle\<rbrakk> ~~
|
|
|
|
\<lbrace>author\<rbrace>\<^sup>+ ~~
|
|
|
|
\<lbrakk>front_matter\<rbrakk> ~~
|
|
|
|
abstract ~~
|
|
|
|
\<lbrakk>table_of_contents\<rbrakk> ~~
|
|
|
|
\<lbrace>introduction\<rbrace>\<^sup>+ ~~
|
2020-04-23 14:08:05 +00:00
|
|
|
\<lbrace>technical || figure || side_by_side_figure\<rbrace>\<^sup>+ ~~
|
2018-12-03 10:23:51 +00:00
|
|
|
\<lbrace>conclusion\<rbrace>\<^sup>+ ~~
|
2018-12-11 15:03:01 +00:00
|
|
|
\<lbrace>index\<rbrace>\<^sup>* ~~
|
2018-10-23 11:56:18 +00:00
|
|
|
bibliography)"
|
|
|
|
|
2020-06-23 09:22:33 +00:00
|
|
|
|
2018-10-23 11:56:18 +00:00
|
|
|
end
|