Skip to content
Snippets Groups Projects
Verified Commit 389bdc1f authored by ck85nori's avatar ck85nori :railway_track:
Browse files

initial commit

parents
No related branches found
No related tags found
No related merge requests found
Pipeline #280 passed
*.pdf
img/*.svg
stages:
- check
- deploy
check:
stage: check
tags:
- pandoc
script:
- echo $PATH
- which mdspell
- make check
deploy:
stage: deploy
tags:
- pandoc
script:
- make
- >-
curl
-u "$NEXTCLOUD_SHARE:$NEXTCLOUD_PW"
-T document.pdf
-H 'X-Requested-With: XMLHttpRequest'
-H 'X-Method-Override: PUT'
https://portal.idiv.de/nextcloud/public.php/webdav/document.pdf
environment:
name: production
pandoc
WatsonCrick1953
Makefile 0 → 100644
PANDOC = pandoc
PANDOCFLAGS = \
--standalone \
--pdf-engine=xelatex \
SOURCES_MD = $(wildcard chapter*.md)
default: all
all: document.pdf
SUBDIRS = \
img \
$(SUBDIRS):
$(MAKE) -C $@
subdirs: $(SUBDIRS)
document.pdf: $(SUBDIRS) metadata.yml $(SOURCES_MD)
$(PANDOC) $(PANDOCFLAGS) -o document.pdf metadata.yml $(SOURCES_MD)
check: spellcheck
spellcheck:
mdspell --en-us -anrx $(SOURCES_MD)
clean:
@for dir in $(SUBDIRS); do \
$(MAKE) -C $$dir $@; \
done
rm -f document.pdf
.PHONY: \
all \
check \
clean \
default \
subdirs \
$(SUBDIRS) \
Change to Document Title Here
=============================
Building
--------
Build the PDF:
```
make title.pdf
```
### Requirements
Required:
- [git](https://git-scm.com/downloads)
- [pandoc, pandoc-citeproc](https://pandoc.org/installing.html)
- LaTeX, either texlive or MiKTeX
- make
Optional:
- [graphviz](https://graphviz.gitlab.io/download/)
- [watchexec](https://github.com/watchexec/watchexec/releases)
Markdown
========
This is a first level header.
Header Level
------------
This is a second level header.
### Third Level Header
You can also just use the hashes syntax instead of the underlines with dashes
or equals signs. Add more hashes for deeper nesting.
Paragraphs
----------
To add a paragraph simply write some text and then add two newlines to separate
this paragraph from another one.
Like this. Note that it is useful to use hard line wrapping. The alternative,
soft wrapping, is when your editor wraps the lines only visually. Consider
using your editor to automatically re-wrap paragraphs for you.
Emphasis
--------
You can emphasize like this:
- *italics* or _italics_
- **bold** or __bold__
- ~~strike-through~~
- `verbatim`
Quoting
-------
> This is a block quote.
>
> And another paragraph.
Lists
-----
- list
- are
- very
- simple
1. ordered
1. is also
1. possible
- this is a list item
with another paragraph
Hyperlinks
----------
You can find the complete **pandoc** Markdown documentation
[here](https://pandoc.org/MANUAL.html#pandocs-markdown).
You can also structure this a bit more [differently][pandoc] and provide the
list of links later or at the end of the file.
[pandoc]: https://pandoc.org/MANUAL.html#pandocs-markdown
Footnotes
---------
You can footnotes to your text like this.[^1]
[^1]: This looks just like hyperlinks!
Bibliography
------------
This one is often cited [see @WatsonCrick1953].
Images
------
![The image caption goes here.](img/git-remote-commands.svg)
Syntax Highlighting
-------------------
This is a verbatim text block, also called fenced code block:
```
This is a so-called fenced block.
Everything inside will be translated verbatim.
No **emphasis** works here.
A fixed-width font is used to display these blocks.
```
This code block has no syntax highlighting. To enable syntax highlighting, add
the language to the starting fence:
```r
# you can also add code blocks with syntax highlighting
# this is an R code snippet
# specify the language at the starting fence
# using fread is much faster
library(data.table)
table <- fread('example.csv')
# than using read.csv
table <- read.csv('example.csv')
```
Tables
------
| header 1 | header 2 | header 3 |
| -------- | :------: | -------: |
| left | centered | 424242 |
| aligned | content | 42 |
LaTeX if you need it
--------------------
As you can see, Markdown is very simple. If you need more advanced
type-setting, you can always fall back to using \LaTeX. You can use inline
formulas like $a^2 + b^2 = c^2$. You can also use them standalone:
$$a^2 + b^2 = c^2$$
You can do the same with tables and pretty much else.
@article{ WatsonCrick1953,
Author = {Watson, J. D. and Crick, F. H. C.},
Title = {Molecular Structure of Nucleic Acids: A Structure for Deoxyribose Nucleic Acid},
Journal = {Nature},
Volume = {171},
Number = {4356},
Pages = {737-738},
Year = {1953}
}
SOURCES_DOT = $(wildcard *.dot)
OBJECTS_DOT_SVG = $(SOURCES_DOT:.dot=.svg)
OBJECTS = \
$(OBJECTS_DOT_SVG) \
all: $(OBJECTS)
$(OBJECTS):
%.svg: %.dot
dot -Tsvg -o $@ $<
clean:
rm -f $(OBJECTS)
.PHONY: \
all \
clean \
digraph {
compound = true
node [shape = "box", style = "filled, rounded"]
nodesep = 0.5
ranksep = 1.5
subgraph clusterorigin {
label = "origin"
node [color = orchid]
omaster[label = "master"]
}
subgraph clusterlocal {
label = "local"
node [color = orchid]
master[label = "master"]
}
omaster -> master [label = "git fetch", style = dotted, ltail = clusterorigin, lhead = clusterlocal]
master -> omaster [label = "git push"]
omaster -> master [label = "git pull"]
}
---
title: Pandoc Document
subtitle: a future proof way to write
author:
- Jane Doe
- John Doe
lang: en
documentclass: report
toc: yes
abstract: |
Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod
tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam,
quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo
consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse
cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non
proident, sunt in culpa qui officia deserunt mollit anim id est laborum.
header-includes: |
\usepackage{draftwatermark}
papersize: a4paper
geometry: left=24.1mm
geometry: right=24.1mm
geometry: bottom=4.5cm
bibliography: idiv.bib
link-citations: yes
reference-section-title: References
...
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment