The RustyPhoenixLecture is the next version developed in Rust or the previous PhoenixTex2Html developed previously in C++.
A lot of functionalities were added to this new project.
# Introduction
#secIntroduction
Let's introduce the topic of this lecture. The idea is just to test if the rustyphoenixlecture program does it job well.
RustyPhoenixLecture is the next version of the already well used [PhoenixTex2Html](https://cta-lapp.pages.in2p3.fr/PHOENIX_LIBS2/static-site-generator/PhoenixTex2Html/).
The main idea is to keep all good ideas of PhoenixTex2Html but with markdown as main language and not latex and also to make sure all black magic with cmake is no longer mandatory and can be integrated smoothly in markdown.
You can see the Reference and label at section @secReferenceAndLabel for more information. And you can jump directly to see the conclusion in section @secConclusion.
## Managing
#secManaging
First rustyphoenixlecture is completely autonomous and do not rely on cmake and stays in markdown for simplicity of use.
Just a small example of C++ :
```cpp
#include <iostream>
int main(int argc, char** argv){
int value = 4;
std::cout << "Hello world !" << std::endl;
return 0;
}
```
And if we want to compile :
```cmake
cmake_minimum_required(VERSION 3.20)
project(SimpleCpp)
add_executable(my_awsome_program main.cpp)
```
You probably realize that, all programs such as cmake or language such as C++ are automatically highlighted.
No need to call extra commands and forget if you want to treat of a program, a language, or a library such as libhdf5.
Indeed we can use `code snipet` to highlight some parameters, options or commands
# Lecture Configuration
#secLectureConfiguration
The lecture is create with a toml configuration which is :
```toml
# Vector of files in the lecture
vec_file = ["index.md"]
# Title of the lecture
title = "A great lecture"
# Name of the lecture (other lectures will reference this one with that name)
name = "TestLecture"
# Url of the lecture
project_url = "https://gitlab.in2p3.fr/CTA-LAPP/PHOENIX_LIBS2/static-site-generator/RustyPhoenixLecture"
# Url where to find the documentation of the project or the generated lecture
documentation_url = "https://cta-lapp.pages.in2p3.fr/PHOENIX_LIBS2/static-site-generator/RustyPhoenixLecture"
# If the lecture is part of a mater project
master_project = "https://paubert.pages.in2p3.fr/Lectures/"
# Email contact for suggestions
contact_mail = "pierre.aubert@lapp.in2p3.fr"
# Vector of authors of the lecture
vec_author = ["Pierre Aubert"]
#Relative to the current configuration location
theme_path = "../themes/book"
# Vector of parser directories which contains all toml configuration for languages highlighting
vec_parser = ["parser"]
# Vector of environment directories which contains all toml configuration for extra environment
vec_environment = ["environment"]
[dependencies]
```
Where :
- **vec_file** is the vector of input markdown files of the lecture
- **title** is the title of the lecture
- **name** is the name of the lecture to allows remote citation from other lectures
- **project_url** is the url of the lecture project
- **documentation_url** is the url where the lecture is published (i.e. pages for gitlab)
- **master_project** is the url of a larger projet if the current lecture is in a constellation of lectures
- **contact_mail** is the email of the main authors
- **vec_author** is the list of authors
- **theme_path** is a path to the theme directory. You can use `${PREFIX_SHARE}` in the name to use installed theme
- **vec_parser** is list of paths to parser directories. You can use `${PREFIX_SHARE}` in the name to use installed theme
- **vec_environment** is list of paths to environments directories. You can use `${PREFIX_SHARE}` in the name to use installed theme
- **dependencies** section section allows to add extra lecture from which we can cite labels (see section @secReferenceAndLabel)
If you use `${PREFIX_SHARE}` in **theme_path**, **vec_parser**, **vec_environment**, you have to specify the path to the theme package you choose. Example :
```toml
# Vector of files in the lecture
vec_file = ["index.md"]
# Title of the lecture
title = "A great lecture"
# Name of the lecture (other lectures will reference this one with that name)
name = "TestLecture"
# Url of the lecture
project_url = "https://gitlab.in2p3.fr/CTA-LAPP/PHOENIX_LIBS2/static-site-generator/RustyPhoenixLecture"
# Url where to find the documentation of the project or the generated lecture
documentation_url = "https://cta-lapp.pages.in2p3.fr/PHOENIX_LIBS2/static-site-generator/RustyPhoenixLecture"
# If the lecture is part of a mater project
master_project = "https://paubert.pages.in2p3.fr/Lectures/"
# Email contact for suggestions
contact_mail = "pierre.aubert@lapp.in2p3.fr"
# Vector of authors of the lecture
vec_author = ["Pierre Aubert"]
#Relative to the current configuration location
theme_path = "${PREFIX_SHARE}/RustyPhoenixLectureThemeBook/book"
# Vector of parser directories which contains all toml configuration for languages highlighting
vec_parser = ["${PREFIX_SHARE}/RustyPhoenixLectureThemeBook/parser"]
# Vector of environment directories which contains all toml configuration for extra environment
vec_environment = ["${PREFIX_SHARE}/RustyPhoenixLectureThemeBook/environment"]
[dependencies]
```
Example of **dependencies**:
```toml
[dependencies]
lecture_name = "https://pages.gitlab.com/url/to/this/lecture/"
```
# Lecture components
#secLectureComponent
The lecture is composed of several components :
- **Title** see section @secLectureComponentTitle
- **Images** and **Figures** see section @secLectureComponentImages
- **List** see section @secLectureComponentList
- **Table** see section @secLectureComponentTable
- **Detail** see section @secLectureComponentDetail
- **Environments** see section @secLectureComponentEnvironment
- **Parser** see section @secLanguageHighlighting
- **Mathematic formulae** see section @secMathematicFormulae
## Title
#secLectureComponentTitle
Titles are define as follow :
```markdown
# Title
## Chapter
### Section
#### Sub section
##### Sub sub section
```
And titles can be embeded in environments (see section @secLectureComponentEnvironment) :

```resumeBox
# First point
Text in this environment for the first point
# Second point
Text in this environment for the second point
```
## Images
#secLectureComponentImages
In the long tradition of the PhoenixTex2Html, we need to test the images of the new RustyPhoenixLecture with Tweety in the text  or a figure :

#figTweety
But we have to call
```markdown

```
with the **figure** keyword.
And we can cite the image too if is has a label (see section @secReferenceAndLabel).
```noteBox
**Note** : you don't have to define a caption inside the figure because this is more convenient to cite the figure and explain it in the next paragraph.
```
## List
#secLectureComponentList
List can be defined with :
```markdown
- Some item
- Sub item
- An other item
- Other sub item
```
Which gives :
- Some item
- Sub item
- An other item
- Other sub item
## Table
#secLectureComponentTable
Tables can be defined with :
```markdown
```
Which gives :
```noteBox
**Note** : every cell is centered by default because everyone wants text to be centered in a table by default.
```
## Detail
#secLectureComponentDetail
The **detail** environment allows to collapse a long content and showing only the beginning. Then is can be opened by clicking on its title.
If you write :

You will get :
```detail
Some title
Some content
```
## Environments
#secLectureComponentEnvironment
As in the previous PhoenixTex2Html, RustyPhoenixLecture allows to use extra environments defined in toml configuration files.
An environment **envname** can be used as any markdown environment :

We can ask some questions :
```question
What I am doing here ?
```
And some answer :
```answer
Reading the documentation.
```
Some advise :
```advise
You should read the documentation.
```
### Nested environments
#secLectureComponentEnvironmentNested
And environments can be nested :
```idea
Should be great if the environments could be nested.
```trouble
Ok but we have to make sure the parsing do not break
```
```warning
Should be nice, but the markdown highlighter of your favorite editor will probably break, even if the lecture will be fine.
```
```answer
Ok, we so have to force all environments to have a name. There is no more default environment with vanilla triple backquotes,
otherwise this would not be possible.
```
```
Here is the corresponding markdown :

```noteBox
**Note** : the trick here is to indent with one tabulation the closing triple backquotes of the main environment - **idea** in our case - to make sure your favorite highlighter will not ruine the highlighting of what is following until the next.
```
```noteBox
**Note** : you can also include code to highlight as mentionned in section @secDevelopment. In this case, your favorite IDE will not break the highlighting or your markdown.
```
Ok, I agree that this is wiered and I do not really get how I found it but this trick is working on zed and kate.
### Environments config
#secLectureComponentEnvironmentConfig
All environments are defined in **environment** directory as toml configuration such as **environment/environment.toml**. Here multiple environments can be defined per files :
```toml
[[environment]]
name = "question"
balise = "div"
is_paragraph_allowed = true
image = "book/images/wip.png"
style = """
color: white;background-color: #4c5f82;
border: 2px solid blue;
border-radius: 10px;
padding: 10px;
margin-top: 30px;
margin-bottom: 30px;
"""
```
Where :
- **name** is the name of the environment (**envname** in section @secLectureComponentEnvironment)
- **balise** is the name of html marker to use (**div**, **pre**, **span**, etc)
- **is_paragraph_allowed** tells if paragraphs can be created inside the environment (this changes the layout but simplifies a lot the environment)
- **image** which illustrates the environment. Its path should be relative to the generated html, and having them in **book/images** prevent to make a mess of the output directory. If **image** is empty, no image will be displayed in the environment.
- **style** is the css style to define this environment
### All environments
#secLectureComponentEnvironmentAll
And since I am lazy, I will not write you all the examples of all environments myself. Moreover, you can all some dedicated environments for yourself and also you won't test them by hand.
Ok, let's pretend, we aren't lazy but we want to spend our time on the things which matter. So, if you are using this markdown :
```markdown
__all_environment_example__
```
You will get this :
__all_environment_example__
### List env by name
#secLectureComponentEnvironmentByName
It is also possible to list environments by name.
The most common usage is to list the **work in progress** environments which is **wip** but of course we do not want to be limited and we can list all the environments which are defined for the lecture (see section @secLectureComponentEnvironmentConfig).
It will not create any section so you have the control on it and you can call this command in all the section you want.
```warning
**Warning** : this function can be called only once in the whole lecture to avoid dupplication of information. And you will get an error if you call it several times.
```
```noteBox
**Note** : if you list all possible environments (see section @secLectureComponentEnvironmentAll), the corresponding one will be listed too.
```
You can list all the **wip** environments of your lecture with :
```markdown

```
And this will give :

## Clipboard copy
#secLectureClipboardCopy
In a lecture or a documentation, it is quite powerfull to give ready to use commands to the reader.
```markdown


```
Here is and example . Or hidden text .
Once you write a lecture or documentation, at some point you will have to give some long command which are also tedious to copy, such as a command to run a container with podman from a given container url.
```markdown

```
You can try to start the container with podman : 
Which will give you the command :
```terminal
podman pull gitlab-registry.in2p3.fr/cta-lapp/cours/performancewithstencil/performancewithstencil_cpu_interactive_code_server:1.0.2@sha256:cc8a657107c3d6bb9ea30de7471962966cc9f57cd3fecb64533760ee2fca4e91
podman run -it --rm --net=host gitlab-registry.in2p3.fr/cta-lapp/cours/performancewithstencil/performancewithstencil_cpu_interactive_code_server:1.0.2@sha256:cc8a657107c3d6bb9ea30de7471962966cc9f57cd3fecb64533760ee2fca4e91
# And you don't have to copy it manually
```
Of course, you can do the same with docker :
```markdown

```
You can try to start the container with docker : 
```terminal
docker pull gitlab-registry.in2p3.fr/cta-lapp/cours/performancewithstencil/performancewithstencil_cpu_interactive_code_server:1.0.2@sha256:cc8a657107c3d6bb9ea30de7471962966cc9f57cd3fecb64533760ee2fca4e91
docker run -it --rm --net=host gitlab-registry.in2p3.fr/cta-lapp/cours/performancewithstencil/performancewithstencil_cpu_interactive_code_server:1.0.2@sha256:cc8a657107c3d6bb9ea30de7471962966cc9f57cd3fecb64533760ee2fca4e91
# And you don't have to copy it manually
```
Of course, you can do the same with apptainer :
```markdown

```
You can try to start the container with apptainer : 
And you will get
```terminal
apptainer pull gitlab-registry.in2p3.fr/cta-lapp/cours/performancewithstencil/performancewithstencil_cpu_interactive_code_server:1.0.2
apptainer run --bind build:/build --writable-tmpfs performancewithstencil_cpu_interactive_code_server_1.0.2.sif
# And you don't have to copy it manually
```
Of course, apptainer needs a lot of disk space to pull images this is also why we split the two commands which is not mandatory for podmand and docker but makes it coherent.
Since, it helps but this will remain tedious if you want to get all possible command for podman, apptainer and docker, you can use this :
```markdown

```
And you will get : 
for all container you want and you still can copy the raw url if you prefer.
# Development
#secDevelopment
When writing a lecture, we generally need to incorporate snipet of C++ or CMakeLists.txt. And we have to ensure these snipets do compile and do not contains errors.
Let's use the example of the chapter @secManaging but with files.
So, here is the main.cpp :

And the CMakeLists.txt :

To get with we just use :
```markdown
So, here is the main.cpp :

And the CMakeLists.txt :

```
And these C++ and cmake files are automatically parsed by rustyphoenixlecture to extract the lecture comments inside them which can produce entire parts, chapters or sections whithin a single line.
With this trick, you ensure your examples are always aligned with your lecture and do compile and produce relevant results without any copy-paste or synchronisation needed from your side.
Basically, a lecture comment starts as a comment but with a brace. For C++ it is **//{** for single line comment.
You can get these files to have the full example.
```cpp
//{We have to include I/O includes :
#include <iostream>
//{Then, we can define the main function :
int main(int argc, char** argv){
int value = 4;
//{Some printing :
std::cout << "Hello world ! " << value << std::endl;
//{The end of the function
return 0;
}
```
```noteBox
**Note** : all paths are relative to the location of the **lecture configuration**.
```
# Reference and label
#secReferenceAndLabel
Reference and label are a key point in writing lectures.
You can declare a label with
```markdown
#someName
```
and refer to it with
```markdown
@someName
```
To make a figure with a label as in section @secLectureComponentImages we do :
```markdown

#figTweety
```
And we get this :

#figTweety2
And we can explain that, @figTweety2 is very interesting because...
```noteBox
**Note** : if any element of the lecture has a label, it will be displayed with a following **paperclip icon**. So you can refer to it with an automatic redirection and make sure the link from this paperclip will be available if the label has the same name.
```
You can also refer to a label in an other lecture. To do so, you have to add a **dependency** in the **lecture.toml** configuration (see section @secLectureConfiguration) with the desired lecture name and documentation url which is the url where this particular lecture is published. Example :
```toml
[dependencies]
lecture_name = "https://pages.gitlab.com/url/to/this/lecture/"
```
Then, you can refer to all labels defined in this lecture - all all lectures in the **dependencies** section with :
```markdown
@lecture_name::some_label
```
From, this, it works, and it is solved as a label, and you get an error if the label, or the lecture does not exist.
```noteBox
**Note** : to ensure this mechamism is working, each lecture produces a **lecture_citation.toml** which will be searched automatically by your current lecture if you add some **dependencies** and the their configuration files are not in the **dependencies** directory next to your **lecture.toml** lecture configuration. In our example, we should have a **dependencies/lecture_name.toml** downloaded automatically from the other lecture if the file does not exist.
```
# Language Highlighing
#secLanguageHighlighting
What would be a lecture compiler wihtout a way to highlight all the programming languages you want, all configuration, all scripts and all terminal output just to bring clarity in your lecture or documentation.
All highlighting configuration start with :
```toml
[highlighting]
# Do we want line numbers
is_line_number = true
# Plain text identifier
token_charset = "abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789_"
# Vector of accepted extensions
vec_extention = ["c", "cpp", "c++", "h", "hpp"]
# Vector of accepted filenames for highlithing this particular language
vec_filename = []
# Definition of a single line comment
single_line_comment = "//"
# Beginning of a multi-line comment
multi_line_comment_begin = "/*"
# Ending of a multi-line comment
multi_line_comment_end = "*/"
```
We have to define :
- if we have to show the line numbers
- token charset or what composes classic token in this particular language
- vector of accepted file extensions for this language. Usefull if you want to include some files see section @secDevelopment.
- vector of filenames such as CMakeLists.txt or Dockerfile which correspond to specific languages
- the single line comment, if there is no single line comment you should let the field enmpty
- the beginning of a multiple lines comment, if there is no multiple lines comments you should let the field enmpty
- the ending of a multiple lines comment, if there is no multiple lines comments you should let the field enmpty
## Keywords
#secLanguageHighlightingKeyword
Keywords are the more common used feature to highlight a language.
```toml
[[keyword]]
style = "rustBuiltinFunction"
vec_token = [
"println!",
"vec!",
"panic!",
"bail!",
"assert!",
"assert_ne!",
"assert_eq!",
"todo!",
"macro_rules!",
"stringify!",
]
vec_match = ["..=",
"..",
":",
"{",
"}",
"?",
"$",
"=",
"<",
"=>",
"->",
">",
"&",
";",
]
```
Where :
- **style** is the css style of the parsed expression
- **vec_token** : vector of token which cannot be followed by any token characters defined in the **token_charset** of section @secLanguageHighlighting
- **vec_match** : vector of any expressions which can be followed by any characters
## Get until
#secLanguageHighlightingGetUntil
Parsing a set of characters from a defined token to an other can help highlighting **strings**, **macros** or **comments** :
```toml
[[getuntil]]
style = "dsString"
start_token = "\""
end_token = "\""
[[getuntil]]
style = "dsChar"
start_token = "'"
end_token = "'"
[[getuntil]]
style = "cppmacro"
start_token = "#"
end_token = "\n"
[[getuntil]]
style = "dsCommentMono"
start_token = "//"
end_token = "\n"
[[getuntil]]
style = "dsCommentMulti"
start_token = "/*"
end_token = "*/"
```
Where :
- **style** is the css style of the parsed expression
- **start_token** is the first token of the expression
- **end_token** is the last token of the expression
## Get until replace
#secLanguageHighlightingGetUntilReplace
The **getuntil** from section @secLanguageHighlightingGetUntil is powerfull but works only for token.
The **getuntilreplace** works for any expression which is delimited by blocks.
```toml
[[getuntilreplace]]
start_token = "beginCustomFigure"
end_token = "endCustomFigure"
replace_start = """<div class="figureStyle">"""
replace_end = "</div>"
```
Where :
- **start_token** is the first token of the expression
- **end_token** is the last token of the expression
- **replace_start** will replace the **start_token** in the final html
- **replace_end** will replace the **end_token** in the final html
So you can create custom blocks if needed.
Let's have this :
```markdown
beginCustomFigure
Let's use the custom block to highlight this sentence
endCustomFigure
```
And you get :
beginCustomFigure
Let's use the custom block to highlight this sentence
endCustomFigure
## Sequence
#secLanguageHighlightingSequence
To be able to define a sequence of token is very usefull to highlight numbers for example :
```toml
[[sequence]]
style = "dsNumber"
vec_step = [
{oneof = "1234567890"},
{oneof = "lu"}
]
[[sequence]]
style = "dsNumber"
vec_step = [
{token = "."},
{oneof = "1234567890"},
{oneof = "f"}
]
[[sequence]]
style = "rustBuiltinFunction"
vec_step = [
{oneof = "abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789_"},
{keyword = "::"},
]
```
Here, we parse integer and floating point numbers.
Where :
- **style** is the css style of the parsed expression
- **vec_step** is the vector of steps of the sequence
- **token** defines a token which as to be parsed entirely and only if the next char is not in the **token_charset** of section @secLanguageHighlighting
- **keyword** defines a token which as to be parser entirely but is independent of next char
- **oneof** defines a char set where the parsed expression will be exclusively composed of these characters in any order possible
```noteBox
**Note** : all steps which are defined before a **token** or a **keyword** are mandatory to get the sequence **style**.
```
## Replace
#secLanguageHighlightingReplace
The **replace** section defines token which have to be replaced by some html directly :
```toml
[replace]
"g++" = """<a class="program" href="https://gcc.gnu.org/onlinedocs/gcc/">g++</a>"""
gcc = """<a class="program" href="https://gcc.gnu.org/onlinedocs/gcc/">gcc</a>"""
cmake = """<a class="program" href="https://www.cmake.org/">cmake</a>"""
maqao = """<a class="program" href="https://www.maqao.org/">maqao</a>"""
valgrind = """<a class="program" href="https://valgrind.org/">valgrind</a>"""
RustyPhoenixLecture = """<a class="project_style" href="https://cta-lapp.pages.in2p3.fr/PHOENIX_LIBS2/static-site-generator/RustyPhoenixLecture/">RustyPhoenixLecture</a>"""
PhoenixTex2Html = """<a class="project_style" href="https://cta-lapp.pages.in2p3.fr/PHOENIX_LIBS2/static-site-generator/PhoenixTex2Html/">PhoenixTex2Html</a>"""
```
So, you do not have to remember how to emphase maqao, or cmake, valgrind, gcc, etc. And you get their documentation link automatically.
## Special parsing
#secLanguageHighlightingSpecialParsing
When writing a lecture, it is always anoying to remember which keyword to highlight, which color to choose, and which url to link with this language or this tool.
There is also a special configuration named **lecture_keyword.toml** where you can combined all the features of the previous sections to highlight automatically all token and keywords you want in the plain text or your lecture.
The following :
```markdown
Here, we can discuss about cmake to compile C++ programs with gcc
and we get all highlighting and documentation url automatically.
```
Gives :
Here, we can discuss about cmake to compile C++ programs with gcc and we get all highlighting and documentation url automatically.
Of course, you can custom what you want to highlight in your lecture or documentation.
## Parser list
If you want to get all available parsers for your configuration, you can have a look into the **parser** directory where the **lecture.toml** is. Or you can use the
```markdown
__all_parser_example__
```
keyword.
You will get this in the next section.
__all_parser_example__
# Archives
#secArchive
It is also important to be able to get a full archived project at once. So you can use :
```markdown

```
To create an archive from a directory in **ressource** with sources you already stripped with the media inclusion.
As always paths are relative to the current lecture source file in markdown.
Here is one example for the small c++ example of section @secManaging : 
# Mathematic Formulae
#secMathematicFormulae
We can define some mathematic formulae with : 
Here we have some latex but you could also use typst with the proper synthax.
And we can get the following :
Inline formula $E = m c^2$#formulaEinstein .
Let's express the **Gray Scott** reaction with differential equations :
```formula
\begin{eqnarray*}
\dfrac{\partial u}{\partial t} & = & r_u \nabla^2 u - uv^2 + f_r \times \left(1 - u\right) \\
\dfrac{\partial v}{\partial t} & = & r_v \nabla^2 v + uv^2 - \left(f_r + k_r\right) \times v
\end{eqnarray*}
```
#formulaGrayScottReaction
Of couse, you should know the famous @formulaEinstein or the @formulaGrayScottReaction.
Where :
- $u$ and $v$ representent concentration or **U** and **V** species
- $r_u$ and $r_v$ representent diffusion rate of **U** and **V**
- $k_r$ (**Kill Rate**), conversion rate of **V** into **P**
- $f_r$ (**Feed Rate**), speed of the process which feeds **U** and kills **V** and **P**
- $\nabla^2 u$ and $\nabla^2 v$ represent difference of spacial concentration between the current cell and its neighbours
# Work in progress
#secWorkInProgress
The **Work in progress** or **wip** environment allows to define what should be in the lecture or documentation but not properly written at this time.
So, you can defined the following :

And get :
```wip
I should finish this example but I don't have time for now because I need to sleep.
```
```noteBox
**Note** : in PhoenixTex2Html all **work in progress** are tracked by default in your lecture. For rustyphoenixlecture you can choose which environment to list (see section @secLectureComponentEnvironmentByName)
```
# Add speakers
#secAddSpeaker
A list of speaker can be added in the lecture with **names**, **affiliation**, **biography**, etc. The configuration can be incorporated with :
```markdown

```
```noteBox
**Note** : as always, the filename is relative to the parent directory of the current file.
```
And the configuration looks like :
```toml
[[speaker]]
name = "John Doe"
title = "Dr"
label = "john_doe"
function = "Research Engineer"
affiliation = "LAPP / IN2P3 / CNRS"
description = "Some biography."
```
Where :
- **name** is the name and surname of the speaker
- **title** is the title of the speaker if there is one (professor, doctor, etc)
- **label** ables to reference the the speaker in all the lectures, incluing timetables
- **function** is the job or role of the speaker
- **affiliation** describes where the speaker works
- **description** is the biography of the speaker
You can see the result in the next section (@sec_full_speakers) from the **Gray Scott School**.

# Add time table
#secTimeTable
A timetable is defined by a toml configuration file.
First, let's describe the lecture :
```toml
[timetable]
invitation = "gray_scott_2026"
main_url = "https://cta-lapp.pages.in2p3.fr/cours/gray_scott_revolutions/grayscott2026/"
#Main location
location = "Auditorium Marcel Vivargent"
label = "gray_scott_school_2026_timetable"
```
Where :
- **invitation** is the base name of the invitation **ics** which will be generated to integrate the timetable in a agenda application
- **main_url** is the main url of the website where the current timetable is defined. All invitation will point to this to get update of the session content without downloading a new **ics**.
- **location** is the default location of most session of the lecture to avoid redundant information in the configuration
- **label** is the label of the timetable to refer to is in the current lecture or other lecture (see section @secReferenceAndLabel)
Then, we can create week :
```toml
[[block]]
week_title = "CPU Computing"
date = 2026-06-22
invitation = "gray_scott_cpu_computing"
```
Where :
- **week_title** is the title of the week is there is a thematic
- **date** defines the first date of the week in the date format of toml (it can be defined in any type of block, week or session block)
- **invitation** is the base name of the invitation **ics** which will be generated for this week only
Then, we can add block :
```toml
[[block]]
title = "Welcome"
begin = 14:00:00
duration = 00:10:00
speakers = ["giovanni_lamanna"]
invitation = "gray_scott_wellcome"
description = """Presentation of the CNRS/LAPP environment
"""
```
Where :
- **title** is the title of the block
- **begin** is the begin time of the block (in the time format of toml). If there is no **begin** the starting of the session is determined automatically by the end of hte previous one
- **duration** is the duration of the block (the end will be determine automatically)
- **speakers** is the list of the speakers of the block. The speaker will be linked to the defined speaker (see section @secAddSpeaker)
- **invitation** is the base name of the invitation of the block. If several blocks have the same **invitation**, then they will be merged in the same **ics**
- **description** is the description of the session in markdown
- **date** is the date where the session append (in the date format of toml). It has to be defined at least once for each new day.
So, for the next day, we will have :
```toml
[[block]]
title = "C++ 17/20/23 on CPU"
duration = 01:30:00
speakers = ["pierre_aubert"]
description = """Optimization with C++17/20 and 23. Application on lectures from the previous day. Optimisation and Vectorization.
See containers to be used in section @partContainerListTimeTable.
"""
begin = 09:00:00
date = 2026-06-23
invitation = "gray_scott_cpu_cpp17"
```
With a new **date** defined because we are defining a new day of the week.
Sessions can have several styles :
- **timetableBlockStyle** : classic lecture session (the default block)
- **timetableSeminarStyle** : seminar
- **timetableBootstrapStyle** : bootstrap
- **timetableCoffeeBreak** : coffee break
- **timetableManagementStyle** : management (wellcome, etc)
You can add a timetable in your lecture with the following command :
```markdown

```
And get this :
