# HG changeset patch # User wenzelm # Date 1667769448 -3600 # Node ID d84568379f3f4290d86681e4289b3a69eb70b734 # Parent 6e68ec0fdc481cca2545cef5436bd567c9138c9a support for EPTCS style with demo document; diff -r 6e68ec0fdc48 -r d84568379f3f Admin/components/components.sha1 --- a/Admin/components/components.sha1 Sun Nov 06 21:45:06 2022 +0100 +++ b/Admin/components/components.sha1 Sun Nov 06 22:17:28 2022 +0100 @@ -91,6 +91,7 @@ 6e63f9f354b8c06035952845b987080699a12d55 e-2.6-1.tar.gz a3bebab5df4294dac2dd7fd2065a94df00e0b3ff e-2.6.tar.gz 239e7b8bebbfc29a1c5151e8fb261ffad44877f1 easychair-3.5.tar.gz +4a3b4b4e0441c4498a0c71dc348f3538be589a15 eptcs-1.7.0.tar.gz 6d34b18ca0aa1e10bab6413045d079188c0e2dfb exec_process-1.0.1.tar.gz 8b9bffd10e396d965e815418295f2ee2849bea75 exec_process-1.0.2.tar.gz e6aada354da11e533af2dee3dcdd96c06479b053 exec_process-1.0.3.tar.gz diff -r 6e68ec0fdc48 -r d84568379f3f Admin/components/main --- a/Admin/components/main Sun Nov 06 21:45:06 2022 +0100 +++ b/Admin/components/main Sun Nov 06 22:17:28 2022 +0100 @@ -7,6 +7,7 @@ cvc4-1.8 e-2.6-1 easychair-3.5 +eptcs-1.7.0 flatlaf-2.4 foiltex-2.1.4b idea-icons-20210508 diff -r 6e68ec0fdc48 -r d84568379f3f NEWS --- a/NEWS Sun Nov 06 21:45:06 2022 +0100 +++ b/NEWS Sun Nov 06 22:17:28 2022 +0100 @@ -13,6 +13,7 @@ with demo documents in the regular Isabelle "doc" space: - Easychair as session "Demo_Easychair" / doc "demo_easychair" + - EPTCS as session "Demo_EPTCS" / doc "demo_eptcs" - FoilTeX as session "Demo_FoilTeX" / doc "demo_foiltex" - Dagstuhl LIPIcs style as session "Demo_LIPIcs" / doc "demo_lipics" - Springer LaTeX LNCS style as session "Demo_LLNCS" / doc "demo_llncs" diff -r 6e68ec0fdc48 -r d84568379f3f doc/Contents --- a/doc/Contents Sun Nov 06 21:45:06 2022 +0100 +++ b/doc/Contents Sun Nov 06 22:17:28 2022 +0100 @@ -20,6 +20,7 @@ Demo Documents demo_easychair Demo for Easychair style + demo_eptcs Demo for EPTCS style demo_foiltex Demo for FoilTeX: slides in LaTeX demo_lipics Demo for Dagstuhl LIPIcs style demo_llncs Demo for Springer LaTeX LNCS style diff -r 6e68ec0fdc48 -r d84568379f3f etc/build.props --- a/etc/build.props Sun Nov 06 21:45:06 2022 +0100 +++ b/etc/build.props Sun Nov 06 22:17:28 2022 +0100 @@ -17,6 +17,7 @@ src/Pure/Admin/build_doc.scala \ src/Pure/Admin/build_e.scala \ src/Pure/Admin/build_easychair.scala \ + src/Pure/Admin/build_eptcs.scala \ src/Pure/Admin/build_foiltex.scala \ src/Pure/Admin/build_fonts.scala \ src/Pure/Admin/build_history.scala \ diff -r 6e68ec0fdc48 -r d84568379f3f src/Doc/Demo_EPTCS/Document.thy --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/src/Doc/Demo_EPTCS/Document.thy Sun Nov 06 22:17:28 2022 +0100 @@ -0,0 +1,64 @@ +theory Document + imports Main +begin + +section \Some section\ + +subsection \Some subsection\ + +subsection \Some subsubsection\ + +subsubsection \Some subsubsubsection\ + +paragraph \A paragraph.\ + +text \Informal bla bla.\ + +definition "foo = True" \ \side remark on \<^const>\foo\\ + +definition "bar = False" \ \side remark on \<^const>\bar\\ + +lemma foo unfolding foo_def .. + + +paragraph \Another paragraph.\ + +text \See also @{cite \\S3\ "isabelle-system"}.\ + + +section \Formal proof of Cantor's theorem\ + +text_raw \\isakeeptag{proof}\ +text \ + Cantor's Theorem states that there is no surjection from + a set to its powerset. The proof works by diagonalization. E.g.\ see + \<^item> \<^url>\http://mathworld.wolfram.com/CantorDiagonalMethod.html\ + \<^item> \<^url>\https://en.wikipedia.org/wiki/Cantor's_diagonal_argument\ +\ + +theorem Cantor: "\f :: 'a \ 'a set. \A. \x. A = f x" +proof + assume "\f :: 'a \ 'a set. \A. \x. A = f x" + then obtain f :: "'a \ 'a set" where *: "\A. \x. A = f x" .. + let ?D = "{x. x \ f x}" + from * obtain a where "?D = f a" by blast + moreover have "a \ ?D \ a \ f a" by blast + ultimately show False by blast +qed + + +subsection \Lorem ipsum dolor\ + +text \ + Lorem ipsum dolor sit amet, consectetur adipiscing elit. Donec id ipsum + sapien. Vivamus malesuada enim nibh, a tristique nisi sodales ac. Praesent + ut sem consectetur, interdum tellus ac, sodales nulla. Quisque vel diam at + risus tempus tempor eget a tortor. Suspendisse potenti. Nulla erat lacus, + dignissim sed volutpat nec, feugiat non leo. Nunc blandit et justo sed + venenatis. Donec scelerisque placerat magna, et congue nulla convallis vel. + Cras tristique dolor consequat dolor tristique rutrum. Suspendisse ultrices + sem nibh, et suscipit felis ultricies at. Aliquam venenatis est vel nulla + efficitur ornare. Lorem ipsum dolor sit amet, consectetur adipiscing elit. +\ + +end diff -r 6e68ec0fdc48 -r d84568379f3f src/Doc/Demo_EPTCS/ROOT --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/src/Doc/Demo_EPTCS/ROOT Sun Nov 06 22:17:28 2022 +0100 @@ -0,0 +1,15 @@ +chapter Doc (*Isabelle documentation*) + +session Demo_EPTCS (doc) = HOL + + options [ + document_variants = "demo_eptcs", (*Isabelle documentation*) + document_build = "pdflatex" (*or: omit option for LuaLaTeX*) + ] + theories + Document + document_files (in "$ISABELLE_EPTCS_HOME") + "eptcs.bst" + "eptcs.cls" + document_files + "root.bib" + "root.tex" diff -r 6e68ec0fdc48 -r d84568379f3f src/Doc/Demo_EPTCS/document/root.bib --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/src/Doc/Demo_EPTCS/document/root.bib Sun Nov 06 22:17:28 2022 +0100 @@ -0,0 +1,4 @@ +@manual{isabelle-system, + author = {Makarius Wenzel}, + title = {The {Isabelle} System Manual}, + note = {\url{https://isabelle.in.tum.de/doc/system.pdf}}} diff -r 6e68ec0fdc48 -r d84568379f3f src/Doc/Demo_EPTCS/document/root.tex --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/src/Doc/Demo_EPTCS/document/root.tex Sun Nov 06 22:17:28 2022 +0100 @@ -0,0 +1,37 @@ +\documentclass[submission,copyright,creativecommons]{eptcs} +\usepackage[utf8]{inputenc} +\usepackage{underscore} +\usepackage[T1]{fontenc} + +\hypersetup{colorlinks=true,linkcolor=black,citecolor=black,filecolor=black,urlcolor=black,pdfpagelabels} + +\usepackage{amssymb} +\usepackage{isabelle,isabellesym}\isabellestyle{it} + +\isadroptag{theory} +\isafoldtag{proof} + +\providecommand{\event}{Isabelle} + + +\begin{document} + +\title{Isabelle document preparation with EPTCS {\LaTeX} style} +\def\titlerunning{Easychair style} +\author{Makarius Wenzel + \institute{Augsburg, Germany \\ \url{https://sketis.net}}} +\def\authorrunning{M. Wenzel} +\maketitle + +\begin{abstract} +Isabelle is a formal document preparation system. This example shows how to +use it together with the Easychair style. See \url{http://style.eptcs.org} for +further information. +\end{abstract} + +\input{session} + +\bibliographystyle{eptcs} +\bibliography{root} + +\end{document} diff -r 6e68ec0fdc48 -r d84568379f3f src/Doc/ROOTS --- a/src/Doc/ROOTS Sun Nov 06 21:45:06 2022 +0100 +++ b/src/Doc/ROOTS Sun Nov 06 22:17:28 2022 +0100 @@ -1,4 +1,5 @@ Demo_Easychair +Demo_EPTCS Demo_FoilTeX Demo_LIPIcs Demo_LLNCS diff -r 6e68ec0fdc48 -r d84568379f3f src/Pure/Admin/build_eptcs.scala --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/src/Pure/Admin/build_eptcs.scala Sun Nov 06 22:17:28 2022 +0100 @@ -0,0 +1,101 @@ +/* Title: Pure/Admin/build_eptcs.scala + Author: Makarius + +Build Isabelle component for EPTCS style. + +See also: + - http://style.eptcs.org + - https://github.com/EPTCS/style/releases +*/ + +package isabelle + + +object Build_EPTCS { + /* build eptcs component */ + + val default_url = "https://github.com/EPTCS/style/releases/download" + val default_version = "1.7.0" + + def build_eptcs( + base_url: String = default_url, + version: String = default_version, + target_dir: Path = Path.current, + progress: Progress = new Progress + ): Unit = { + Isabelle_System.require_command("unzip", test = "-h") + + + /* component */ + + val component = "eptcs-" + version + val component_dir = Isabelle_System.new_directory(target_dir + Path.basic(component)) + progress.echo("Component " + component_dir) + + + /* download */ + + val download_url = base_url + "/v" + version + "/eptcsstyle.zip" + + Isabelle_System.with_tmp_file("download", ext = "zip") { download_file => + Isabelle_System.download_file(download_url, download_file, progress = progress) + Isabelle_System.bash("unzip -x " + File.bash_path(download_file), + cwd = component_dir.file).check + } + + + /* settings */ + + val etc_dir = Isabelle_System.make_directory(component_dir + Path.basic("etc")) + File.write(etc_dir + Path.basic("settings"), + """# -*- shell-script -*- :mode=shellscript: + +ISABELLE_EPTCS_HOME="$COMPONENT" +""") + + + /* README */ + + File.write(component_dir + Path.basic("README"), + """This is the EPTCS style from +""" + download_url + """ + + + Makarius + """ + Date.Format.date(Date.now()) + "\n") + } + + + /* Isabelle tool wrapper */ + + val isabelle_tool = + Isabelle_Tool("build_eptcs", "build component for EPTCS style", + Scala_Project.here, + { args => + var target_dir = Path.current + var base_url = default_url + var version = default_version + + val getopts = Getopts(""" +Usage: isabelle build_eptcs [OPTIONS] + + Options are: + -D DIR target directory (default ".") + -U URL download URL (default: """" + default_url + """") + -V VERSION version (default: """" + default_version + """") + + Build component for EPTCS style. +""", + "D:" -> (arg => target_dir = Path.explode(arg)), + "U:" -> (arg => base_url = arg), + "V:" -> (arg => version = arg)) + + val more_args = getopts(args) + if (more_args.nonEmpty) getopts.usage() + + val progress = new Console_Progress() + + build_eptcs(base_url = base_url, version = version, target_dir = target_dir, + progress = progress) + }) +} diff -r 6e68ec0fdc48 -r d84568379f3f src/Pure/System/isabelle_tool.scala --- a/src/Pure/System/isabelle_tool.scala Sun Nov 06 21:45:06 2022 +0100 +++ b/src/Pure/System/isabelle_tool.scala Sun Nov 06 22:17:28 2022 +0100 @@ -160,6 +160,7 @@ Build_Doc.isabelle_tool, Build_E.isabelle_tool, Build_Easychair.isabelle_tool, + Build_EPTCS.isabelle_tool, Build_Foiltex.isabelle_tool, Build_Fonts.isabelle_tool, Build_JCEF.isabelle_tool,