-
Notifications
You must be signed in to change notification settings - Fork 36
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #180 from j---/pdf-update
Pdf update
- Loading branch information
Showing
4 changed files
with
85 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
#!/bin/sh | ||
src="./md_src_files" | ||
|
||
pandoc --self-contained \ | ||
--from=markdown_github+citations+table_captions+implicit_figures+link_attributes \ | ||
--to=html \ | ||
--citeproc \ | ||
--bibliography="$src/sources_ssvc.bib" \ | ||
-M title="Prioritizing vulnerability response: A stakeholder-specific vulnerability categorization (DRAFT version 2.0)" \ | ||
-T "SSVC" \ | ||
-M author="Jonathan M. Spring; Eric Hatleback; Allen D. Householder; Art Manion; Madison Oliver; Vijay Sarvapalli; Deana Shick; Laurie Tyzenhaus" \ | ||
-M date="Compiled `date -u`" \ | ||
-o ssvc_v2-0.html \ | ||
$src/*md | ||
|
||
# --from should use gfm, but gfm+citations is not supported | ||
# so this method should perhaps be considered slightly unstable. | ||
# This citation syntax won't render on github | ||
# but the @ citation syntax shouldn't interfere with @ mentions | ||
# GFM only allows @ mentions in issues and pull requests | ||
# https://guides.github.com/features/mastering-markdown/#GitHub-flavored-markdown | ||
# documentation for citation processing: | ||
# https://pandoc.org/MANUAL.html#citations | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,35 @@ | ||
#!/bin/sh | ||
src="./md_src_files" | ||
|
||
# HTML can handle emojis and not LaTeX commands, so the markdown files have emoji | ||
# However, it is really hard to embed emoji into PDFs in a platform-independent way | ||
# Apple Emoji font and Noto Emoji font are the two options, basically, and as of Apr 2022 | ||
# most devices seem to have one or the other. | ||
# In general, LaTeX is bad at emojis, but the twemojis package might make it OK. | ||
# However, twemojis is not a default package yet, so avoiding that for now. | ||
# So the best available option is to temporarily replace them with LaTeX commands | ||
# Pandoc will read from stdin if no input files are provided, so sed works inline. | ||
|
||
sed -f emoji-replacements.sed $src/*md | \ | ||
pandoc --standalone \ | ||
--from=markdown_github+citations+yaml_metadata_block+tex_math_dollars \ | ||
--to=pdf \ | ||
--citeproc \ | ||
--pdf-engine=xelatex \ | ||
--bibliography="$src/sources_ssvc.bib" \ | ||
--table-of-contents \ | ||
-M title="Prioritizing vulnerability response: A stakeholder-specific vulnerability categorization (Version 2.0)" \ | ||
-T "SSVC" \ | ||
-M date="Compiled `date -u`" \ | ||
--metadata-file=pdf-styling.yaml \ | ||
-o "ssvc_v2-0_`date -u +"%Y-%m-%d"`.pdf" \ | ||
|
||
# --from should use gfm, but gfm+citations is not supported | ||
# so this method should perhaps be considered slightly unstable. | ||
# This citation syntax won't render on github | ||
# but the @ citation syntax shouldn't interfere with @ mentions | ||
# GFM only allows @ mentions in issues and pull requests | ||
# https://guides.github.com/features/mastering-markdown/#GitHub-flavored-markdown | ||
# documentation for citation processing: | ||
# https://pandoc.org/MANUAL.html#citations | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
s/:white_check_mark:/$\\checkmark$/g | ||
s/:x:/$\\times$/g |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
--- | ||
author: | ||
- Jonathan M. Spring | ||
- Eric Hatleback | ||
- Allen D. Householder | ||
- Art Manion | ||
- Madison Oliver | ||
- Vijay Sarvapalli | ||
- Deana Shick | ||
- Laurie Tyzenhaus | ||
documentclass: scrreprt | ||
classoption: | ||
- 10pt | ||
- letterpaper | ||
- onecolumn | ||
- notitlepage | ||
pagestyle: headings | ||
numbersections: true | ||
secnumdepth: 4 | ||
geometry: | ||
- top=1in | ||
- bottom=1in | ||
mainfont: Times | ||
... |