Skip to content
Snippets Groups Projects
Commit 8a75a899 authored by xo30xoqa's avatar xo30xoqa
Browse files

Prettified PDF manual

closes #91
parent f3241671
No related branches found
No related tags found
No related merge requests found
...@@ -18,6 +18,8 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 ...@@ -18,6 +18,8 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
### Added ### Added
- user manual: documentation is now compiled to PDF (#91)
### Changed ### Changed
- added soil map section to GIS docs - added soil map section to GIS docs
......
...@@ -19,7 +19,9 @@ docs: ...@@ -19,7 +19,9 @@ docs:
# building documentation # building documentation
# include the version, date, and latest commit in the footer of the index page # include the version, date, and latest commit in the footer of the index page
sed -i -e "s/\*This documentation was last updated.*/\*This documentation was last updated on ${date} for \*\*Persefone.jl v${version}\*\* (commit [${commit}](https\:\/\/git\.idiv\.de\/persefone\/persefone\-model\/\-\/commit\/${commit})).\*/" docs/src/index.md sed -i -e "s/\*This documentation was last updated.*/\*This documentation was last updated on ${date} for \*\*Persefone.jl v${version}\*\* (commit [${commit}](https\:\/\/git\.idiv\.de\/persefone\/persefone\-model\/\-\/commit\/${commit})).\*/" docs/src/index.md
sed -i -e "s/v[0-9]\+\.[0-9]\+\.[0-9]\+/v${version}/" docs/src/assets/titlepage.tex
cd docs; julia builddocs.jl cd docs; julia builddocs.jl
mv docs/build/Persefone.jl.pdf docs/manual.pdf
profile: profile:
# run and profile an example simulation # run and profile an example simulation
......
% See documentation here: https://documenter.juliadocs.org/stable/man/other-formats/
% Copied from https://github.com/JuliaDocs/Documenter.jl/blob/master/test/examples/src.cover_page/assets/titlepage.tex
% ref: P65 - http://mirrors.ctan.org/macros/latex/contrib/memoir/memman.pdf
\begin{titlingpage}
\begin{center}
\vspace*{2cm}\noindent
%% ---- Main title
\Huge \textbf{ \DocMainTitle\ User Manual }
\\[0.6cm]
%% ---- Subtitle
{\LARGE \DocAuthors }
\vspace*{3cm}\par\noindent
%% ---- logo
\includegraphics[width=0.4\textwidth]{assets/logo.png}
\\[1.5cm]
\vfill
\Large
\url{http://persefone-model.eu}
\vspace*{0.1cm}\par\noindent
\today
\vspace*{0.1cm}\par\noindent
\textbf{ v0.6.0 }
\end{center}
\end{titlingpage}
<!DOCTYPE html>
<html lang="en"><head><meta charset="UTF-8"/><meta name="viewport" content="width=device-width, initial-scale=1.0"/><title>The Persefone.jl Package · Persefone.jl</title><meta name="title" content="The Persefone.jl Package · Persefone.jl"/><meta property="og:title" content="The Persefone.jl Package · Persefone.jl"/><meta property="twitter:title" content="The Persefone.jl Package · Persefone.jl"/><meta name="description" content="Documentation for Persefone.jl."/><meta property="og:description" content="Documentation for Persefone.jl."/><meta property="twitter:description" content="Documentation for Persefone.jl."/><script data-outdated-warner src="assets/warner.js"></script><link href="https://cdnjs.cloudflare.com/ajax/libs/lato-font/3.0.0/css/lato-font.min.css" rel="stylesheet" type="text/css"/><link href="https://cdnjs.cloudflare.com/ajax/libs/juliamono/0.050/juliamono.min.css" rel="stylesheet" type="text/css"/><link href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/6.4.2/css/fontawesome.min.css" rel="stylesheet" type="text/css"/><link href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/6.4.2/css/solid.min.css" rel="stylesheet" type="text/css"/><link href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/6.4.2/css/brands.min.css" rel="stylesheet" type="text/css"/><link href="https://cdnjs.cloudflare.com/ajax/libs/KaTeX/0.16.8/katex.min.css" rel="stylesheet" type="text/css"/><script>documenterBaseURL="."</script><script src="https://cdnjs.cloudflare.com/ajax/libs/require.js/2.3.6/require.min.js" data-main="assets/documenter.js"></script><script src="search_index.js"></script><script src="siteinfo.js"></script><script src="../versions.js"></script><link class="docs-theme-link" rel="stylesheet" type="text/css" href="assets/themes/documenter-dark.css" data-theme-name="documenter-dark" data-theme-primary-dark/><link class="docs-theme-link" rel="stylesheet" type="text/css" href="assets/themes/documenter-light.css" data-theme-name="documenter-light" data-theme-primary/><script src="assets/themeswap.js"></script></head><body><div id="documenter"><nav class="docs-sidebar"><a class="docs-logo" href="index.html"><img src="assets/logo.png" alt="Persefone.jl logo"/></a><div class="docs-package-name"><span class="docs-autofit"><a href="index.html">Persefone.jl</a></span></div><button class="docs-search-query input is-rounded is-small is-clickable my-2 mx-auto py-1 px-2" id="documenter-search-query">Search docs (Ctrl + /)</button><ul class="docs-menu"><li><a class="tocitem" href="index.html">Introduction</a></li><li><span class="tocitem">User guide</span><ul><li class="is-active"><a class="tocitem" href="using.html">The Persefone.jl Package</a><ul class="internal"><li><a class="tocitem" href="#Installation"><span>Installation</span></a></li><li><a class="tocitem" href="#Running-from-the-command-line"><span>Running from the command line</span></a></li><li><a class="tocitem" href="#Running-from-within-Julia"><span>Running from within Julia</span></a></li></ul></li><li><a class="tocitem" href="gui.html">Graphical User Interface</a></li><li><a class="tocitem" href="config.html">Configuration</a></li></ul></li><li><span class="tocitem">Scientific documentation</span><ul><li><a class="tocitem" href="management.html">Farm management</a></li><li><a class="tocitem" href="crop-models.html">Crop models</a></li><li><a class="tocitem" href="skylark.html">Skylark</a></li></ul></li><li><span class="tocitem">Developer guide</span><ul><li><a class="tocitem" href="developing.html">Developing Persefone</a></li><li><a class="tocitem" href="adapting.html">Adapting Persefone</a></li><li><a class="tocitem" href="architecture.html">Source code architecture</a></li><li><a class="tocitem" href="gis.html">Maps and weather data</a></li><li><a class="tocitem" href="species-dsl.html">Defining new species</a></li><li><a class="tocitem" href="CHANGELOG.html">Changelog</a></li></ul></li><li><span class="tocitem">Software API</span><ul><li><a class="tocitem" href="simulation.html">Simulation</a></li><li><a class="tocitem" href="io.html">Input and Output</a></li><li><a class="tocitem" href="nature.html">Nature submodel</a></li><li><a class="tocitem" href="species.html">Species models</a></li><li><a class="tocitem" href="crops.html">Crop submodel</a></li><li><a class="tocitem" href="farm.html">Farm submodel</a></li></ul></li></ul><div class="docs-version-selector field has-addons"><div class="control"><span class="docs-label button is-static is-size-7">Version</span></div><div class="docs-selector control is-expanded"><div class="select is-fullwidth is-size-7"><select id="documenter-version-selector"></select></div></div></div></nav><div class="docs-main"><header class="docs-navbar"><a class="docs-sidebar-button docs-navbar-link fa-solid fa-bars is-hidden-desktop" id="documenter-sidebar-button" href="#"></a><nav class="breadcrumb"><ul class="is-hidden-mobile"><li><a class="is-disabled">User guide</a></li><li class="is-active"><a href="using.html">The Persefone.jl Package</a></li></ul><ul class="is-hidden-tablet"><li class="is-active"><a href="using.html">The Persefone.jl Package</a></li></ul></nav><div class="docs-right"><a class="docs-navbar-link" href="https://git.idiv.de/persefone/persefone-model" title="View the repository"><span class="docs-icon fa-brands"></span><span class="docs-label is-hidden-touch">Repository</span></a><a class="docs-navbar-link" href="https://git.idiv.de/persefone/persefone-model/-/tree/master/docs/src/using.md" title="Edit source"><span class="docs-icon fa-solid"></span></a><a class="docs-settings-button docs-navbar-link fa-solid fa-gear" id="documenter-settings-button" href="#" title="Settings"></a><a class="docs-article-toggle-button fa-solid fa-chevron-up" id="documenter-article-toggle-button" href="javascript:;" title="Collapse all docstrings"></a></div></header><article class="content" id="documenter-page"><h1 id="The-Persefone.jl-Package"><a class="docs-heading-anchor" href="#The-Persefone.jl-Package">The Persefone.jl Package</a><a id="The-Persefone.jl-Package-1"></a><a class="docs-heading-anchor-permalink" href="#The-Persefone.jl-Package" title="Permalink"></a></h1><p><em>This page describes how to run Persefone.jl as a command line application or Julia package, which is the default mode. To use the model with a graphical user interface, see <a href="gui.html">here</a>.</em></p><h2 id="Installation"><a class="docs-heading-anchor" href="#Installation">Installation</a><a id="Installation-1"></a><a class="docs-heading-anchor-permalink" href="#Installation" title="Permalink"></a></h2><p><em>For more detailed installation instructions, see <a href="developing.html">here</a>.</em></p><p>Install the latest version of the <a href="https://julialang.org/downloads/">Julia</a> programming language (1.10+). The recommended editors are <a href="https://www.julia-vscode.org/">VSCode</a> or <a href="https://www.emacswiki.org/emacs/JuliaProgrammingLanguage">Emacs</a>. To install the package dependencies, open a Julia REPL in this folder and run:</p><pre><code class="language-julia hljs">using Pkg
Pkg.activate(&quot;.&quot;)
Pkg.instantiate()</code></pre><h2 id="Running-from-the-command-line"><a class="docs-heading-anchor" href="#Running-from-the-command-line">Running from the command line</a><a id="Running-from-the-command-line-1"></a><a class="docs-heading-anchor-permalink" href="#Running-from-the-command-line" title="Permalink"></a></h2><p>This is the normal mode of operation. Simply execute <code>run.jl</code> in a terminal, typically like so (in Linux):</p><pre><code class="nohighlight hljs">&gt; julia run.jl -c &lt;config&gt;</code></pre><p>where <code>&lt;config&gt;</code> specifies the configuration file to use. The recommended workflow is to copy <code>scr/parameters.toml</code> to a location of your choice and edit the copy to suit your requirements. The adapted config file can then be passed to <code>run.jl</code>. (If no configuration file is specified, Persefone will run with its default settings.)</p><p>The full list of commandline arguments is:</p><pre><code class="nohighlight hljs">usage: run.jl [-c CONFIGFILE] [-s SEED] [-o OUTDIR] [-l LOGLEVEL]
[--version] [-h]
optional arguments:
-c, --configfile CONFIGFILE
name of the configuration file
-s, --seed SEED inital random seed (type: Int64)
-o, --outdir OUTDIR location of the output directory
-l, --loglevel LOGLEVEL
verbosity: &quot;debug&quot;, &quot;info&quot;, or &quot;quiet&quot;
--version show version information and exit
-h, --help show this help message and exit</code></pre><p>To run the test suite, switch to the <code>test</code> directory and execute <code>runtests.jl</code>.</p><p>If you are on Linux or MacOS, you can also use <code>make</code>:</p><pre><code class="nohighlight hljs">&gt; make run # run a simulation with default values
&gt; make test # run the test suite
&gt; make profile # run and profile a default simulation
&gt; make docs # build the documentation
&gt; make release # create a release</code></pre><h2 id="Running-from-within-Julia"><a class="docs-heading-anchor" href="#Running-from-within-Julia">Running from within Julia</a><a id="Running-from-within-Julia-1"></a><a class="docs-heading-anchor-permalink" href="#Running-from-within-Julia" title="Permalink"></a></h2><p>To use the model from within Julia (either inside an interactive REPL or if you want to import it from your own software), do the following:</p><pre><code class="language-julia hljs">using Pkg
Pkg.activate(&quot;.&quot;) # assuming you&#39;re in the Persefone root folder
using Persefone</code></pre><p>You can then access all Persefone functions, such as <a href="simulation.html#Persefone.simulate-Tuple{}"><code>simulate</code></a>, <a href="simulation.html#Persefone.initialise-Tuple{}"><code>initialise</code></a>, <a href="simulation.html#Persefone.stepsimulation!-Tuple{SimulationModel}"><code>stepsimulation!</code></a>, <a href="simulation.html#Persefone.simulate!-Tuple{SimulationModel}"><code>simulate!</code></a>, or <a href="io.html#Persefone.visualiseoutput-Tuple{SimulationModel}"><code>visualiseoutput</code></a>. (See <code>src/Persefone.jl</code> for a list of exported functions.)</p></article><nav class="docs-footer"><a class="docs-footer-prevpage" href="index.html">« Introduction</a><a class="docs-footer-nextpage" href="gui.html">Graphical User Interface »</a><div class="flexbox-break"></div><p class="footer-message">Powered by <a href="https://github.com/JuliaDocs/Documenter.jl">Documenter.jl</a> and the <a href="https://julialang.org/">Julia Programming Language</a>.</p></nav></div><div class="modal" id="documenter-settings"><div class="modal-background"></div><div class="modal-card"><header class="modal-card-head"><p class="modal-card-title">Settings</p><button class="delete"></button></header><section class="modal-card-body"><p><label class="label">Theme</label><div class="select"><select id="documenter-themepicker"><option value="documenter-light">documenter-light</option><option value="documenter-dark">documenter-dark</option><option value="auto">Automatic (OS)</option></select></div></p><hr/><p>This document was generated with <a href="https://github.com/JuliaDocs/Documenter.jl">Documenter.jl</a> version 1.1.2 on <span class="colophon-date" title="Wednesday 11 September 2024 16:19">Wednesday 11 September 2024</span>. Using Julia version 1.10.4.</p></section><footer class="modal-card-foot"></footer></div></div></div></body></html>
File added
% See documentation here: https://documenter.juliadocs.org/stable/man/other-formats/
% Copied from https://github.com/JuliaDocs/Documenter.jl/blob/master/test/examples/src.cover_page/assets/preamble.tex
\documentclass[oneside]{memoir}
\usepackage{./documenter}
\usepackage{./custom}
%% Main document begin
\begin{document}
\input{assets/titlepage.tex}
\frontmatter
% \maketitle
\clearpage
\tableofcontents
\mainmatter
docs/src/assets/screenshot4.png

464 KiB

% See documentation here: https://documenter.juliadocs.org/stable/man/other-formats/
% Copied from https://github.com/JuliaDocs/Documenter.jl/blob/master/test/examples/src.cover_page/assets/titlepage.tex
% ref: P65 - http://mirrors.ctan.org/macros/latex/contrib/memoir/memman.pdf
\begin{titlingpage}
\begin{center}
\vspace*{2cm}\noindent
%% ---- Main title
\Huge \textbf{ \DocMainTitle\ User Manual }
\\[0.6cm]
%% ---- Subtitle
{\LARGE \DocAuthors }
\vspace*{3cm}\par\noindent
%% ---- logo
\includegraphics[width=0.4\textwidth]{assets/logo.png}
\\[1.5cm]
\vfill
\Large
\url{http://persefone-model.eu}
\vspace*{0.1cm}\par\noindent
\today
\vspace*{0.1cm}\par\noindent
\textbf{ v0.6.0 }
\end{center}
\end{titlingpage}
...@@ -2,10 +2,10 @@ ...@@ -2,10 +2,10 @@
CurrentModule = Persefone CurrentModule = Persefone
``` ```
[![Persefone.jl splash screen](assets/persefonejl_logo_v3_splash.png)](https://persefone-model.eu)
# Introduction # Introduction
[![Persefone.jl splash screen](assets/persefonejl_logo_v3_splash.png)](https://persefone-model.eu)
[Persefone.jl](https://persefone-model.eu) models agricultural practice and how it impacts [Persefone.jl](https://persefone-model.eu) models agricultural practice and how it impacts
animal species at a landscape scale. It includes a farm submodel, a crop growth submodel, animal species at a landscape scale. It includes a farm submodel, a crop growth submodel,
and individual-based models of multiple indicator species. Its aim is to investigate how and individual-based models of multiple indicator species. Its aim is to investigate how
...@@ -14,4 +14,4 @@ changes in farm operations (e.g. through policy changes in the CAP) influence bi ...@@ -14,4 +14,4 @@ changes in farm operations (e.g. through policy changes in the CAP) influence bi
The model is open-source software available on The model is open-source software available on
[Gitlab](https://git.idiv.de/persefone/persefone-model). [Gitlab](https://git.idiv.de/persefone/persefone-model).
*This documentation was last updated on 2025-01-14 for **Persefone.jl v0.6.0** (commit [479afb4](https://git.idiv.de/persefone/persefone-model/-/commit/479afb4)).* *This documentation was last updated on 2025-01-15 for **Persefone.jl v0.6.0** (commit [f324167](https://git.idiv.de/persefone/persefone-model/-/commit/f324167)).*
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment