Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
Pandoc course Template
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
GitLab community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Robin VAN DE MERGHEL
Pandoc course Template
Commits
4ef62860
Commit
4ef62860
authored
Aug 30, 2023
by
ForkBench
Browse files
Options
Downloads
Patches
Plain Diff
Adding checkboxes, and configuration via YAML + Update README
parent
4b3422a1
Branches
Branches containing commit
No related tags found
No related merge requests found
Changes
3
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
README.md
+33
-2
33 additions, 2 deletions
README.md
course.html
+2
-0
2 additions, 0 deletions
course.html
example/math/math.md
+1
-0
1 addition, 0 deletions
example/math/math.md
with
36 additions
and
2 deletions
README.md
+
33
−
2
View file @
4ef62860
...
...
@@ -27,6 +27,7 @@ Examples can be found in the [example](./example) folder.
-
[x] Dates (
*maybe to improve*
)
-
[x] Table of contents (
*maybe to improve*
)
-
[x] Checkboxes at each section
-
[x] Configurable (on/off)
-
[ ] Summary at the end of the document
**TODO**
: Increase printing visibility for reviewing.
...
...
@@ -44,17 +45,47 @@ mv course.html ~/.pandoc/templates
# Usage
## Configuration
In every markdown file, you have to add the following metadata:
```yaml
---
title: "Title"
author: "Author"
date: "Date"
checked: true # Optional : if you want to add checkboxes at each section
lang: "en" # Optional : default is "en", french is "fr"
---
```
You have to add this at the beginning of the file :
```
markdown
---
...
---
# Title 1
...
```
It will configure how the document will be rendered.
## Pandoc
```
bash
pandoc [markdown file] -o [output file.html] --template=course.html
```
# Example
##
# Example
```
bash
pandoc README.md -o README.html --template=course.html
```
## LaTeX
##
#
LaTeX
To include LaTeX, the command is the following:
...
...
This diff is collapsed.
Click to expand it.
course.html
+
2
−
0
View file @
4ef62860
...
...
@@ -433,6 +433,7 @@
<script>
hljs
.
highlightAll
();
</script>
$if(checked)$
<script>
// Foreach h1, h2, h3, h4, h5, h6, just before the text, add a checkbox if it's parent is not a header
...
...
@@ -454,5 +455,6 @@
});
</script>
$endif$
</html>
\ No newline at end of file
This diff is collapsed.
Click to expand it.
example/math/math.md
+
1
−
0
View file @
4ef62860
...
...
@@ -2,6 +2,7 @@
title
:
Application en ingénierie et programmation numérique
author
:
Censored
date
:
Octobre
2022
checked
:
true
---
## Résolution de systèmes d'équations linéaires
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment