Skip to content

Commit 7b0a2d0

Browse files
committed
add doc tools
1 parent 63ad53a commit 7b0a2d0

File tree

6 files changed

+51
-0
lines changed

6 files changed

+51
-0
lines changed

.gitignore

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -28,3 +28,5 @@ Linux
2828
Darwin
2929
legal
3030
build-*
31+
pandoc
32+
*.log

v3/share/doc/DejaVuSans.ttf

739 KB
Binary file not shown.

v3/share/doc/header.md

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
---
2+
title: |
3+
![](share/icons/hicolor/256x256/apps/Cyan.png){width=2.5in}
4+
Cyan Graphics 3.0.0
5+
author: Ole-André Rodlie
6+
date: 'Feb 7, 2023'
7+
mainfont: DejaVuSans.ttf
8+
fontsize: 12pt
9+
---

v3/share/doc/header.tex

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
\usepackage{sectsty}
2+
\sectionfont{\clearpage}
3+
\usepackage{fancyhdr}
4+
\pagestyle{fancy}
5+
\fancyhead[CO,CE]{Cyan Graphics}
6+
\fancyfoot[CO,CE]{Cyan Graphics}
7+
\fancyfoot[LE,RO]{\thepage}

v3/tools/md2pdf.sh

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
#!/bin/bash
2+
3+
PLANG=${3:-en}
4+
./tools/pandoc "$1" \
5+
--include-in-header share/doc/header.tex \
6+
-V linkcolor:blue \
7+
-V geometry:a4paper \
8+
-V geometry:margin=2cm \
9+
-V lang=$PLANG \
10+
--pdf-engine=xelatex \
11+
--toc \
12+
-o "$2"

v3/tools/mkdoc.sh

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
#!/bin/bash
2+
#
3+
# Build Cyan README.pdf
4+
#
5+
# Ubuntu: sudo apt install texlive-xetex
6+
# macports: sudo port install textlive-xetex textlive-latex-extra texlive-fonts-recommended texlive-fonts-extra
7+
#
8+
# Download pandoc and copy 'pandoc' binary to this folder.
9+
# https://github.com/jgm/pandoc/releases/tag/2.7.2/
10+
#
11+
12+
cat share/doc/header.md > tmp.md
13+
cat README.md >> tmp.md
14+
15+
#echo "## GNU General Public License v3.0" >> tmp.md
16+
#echo "" >> tmp.md
17+
#cat COPYING >> tmp.md
18+
19+
./tools/md2pdf.sh tmp.md docs/README.pdf
20+
21+
rm tmp.md

0 commit comments

Comments
 (0)