FazBrowse GitHub Viewer
|
Trending
|
URL:
|
Home
Tools:
[Download Repo ZIP]
[View Raw Code]
[Original HTTPS Page]
cppcheck/man/build-pdf.sh at 32bit · codingman/cppcheck · GitHub
codingman
/
cppcheck
Public
forked from
cppcheck-opensource/cppcheck
Notifications
You must be signed in to change notification settings
Fork
0
Star
0
Code
Pull requests
0
Actions
Projects
Security and quality
0
Insights
Additional navigation options
Code
Pull requests
Actions
Projects
Security and quality
Insights
Expand file tree
Breadcrumbs
cppcheck
/
man
/
build-pdf.sh
Copy path
More file actions
More file actions
Latest commit
History
History
History
executable file
·
32 lines (27 loc) · 759 Bytes
Breadcrumbs
cppcheck
/
man
/
build-pdf.sh
Copy path
File metadata and controls
executable file
·
32 lines (27 loc) · 759 Bytes
Raw
Copy raw file
Download raw file
Open symbols panel
Edit and raw actions
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
#!
/bin/sh
#
This uses installed fonts, which vary between systems
#
Segoe UI and Consolas are standard in Windows 10, DejaVu is more common on Linux
echo
Building
$1
.pdf
MainFont=
"
Segoe UI
"
MonoFont=
"
Consolas
"
is_font_installed
() {
fontname=
$1
fc-list
|
grep -i
"
$fontname
"
>
/dev/null
}
if
!
is_font_installed
"
$MainFont
"
;
then
MainFont=
"
DejaVu Sans
"
fi
if
!
is_font_installed
"
$MonoFont
"
;
then
MonoFont=
"
DejaVu Sans Mono
"
fi
#
echo Using $MainFont / $MonoFont
pandoc
$1
.md -o
$1
.pdf -s --number-sections --toc \
--pdf-engine=xelatex \
--listings \
-f markdown \
-V mainfont=
"
$MainFont
"
\
-V monofont=
"
$MonoFont
"
\
-V geometry:a4paper \
-V geometry:margin=2.4cm \
-V subparagraph \
-H manual-style.tex
Back
|
FazBrowse Home
|
New Git URL