Skip to content

Commit

Permalink
Added support for HTML for Axel.
Browse files Browse the repository at this point in the history
  • Loading branch information
mpark committed Jan 21, 2019
1 parent 04733fa commit 2785e81
Show file tree
Hide file tree
Showing 4 changed files with 125 additions and 2 deletions.
14 changes: 14 additions & 0 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -9,3 +9,17 @@
--syntax-definition template/diff.xml \
--template template/wg21.latex \
--output pdf/$@

%.html: %.md
pandoc template/header.yaml $< template/footer.md \
--self-contained \
--filter pandoc-citeproc \
--filter template/diff.py \
--filter template/tonytable.py \
--highlight-style kate \
--number-sections \
--syntax-definition template/cpp.xml \
--syntax-definition template/diff.xml \
--template template/wg21.html \
--table-of-contents \
--output html/$@
Binary file modified pdf/P1371R0.pdf
Binary file not shown.
10 changes: 8 additions & 2 deletions template/header.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -3,12 +3,13 @@ citecolor: blue
linkcolor: blue
urlcolor: blue
toccolor: black
toctitle: Contents

csl: template/cpp.csl
link-citations: true

addcolor: 006E29
rmcolor: C01A1A
addcolor: 006E28
rmcolor: BF0303

header-includes:
# layout
Expand All @@ -22,6 +23,11 @@ header-includes:
- \renewcommand{\AnnotationTok}[1]{\textit{#1}}
- \renewcommand{\InformationTok}[1]{\textcolor{addcolor}{\textit{#1}}}
- \renewcommand{\WarningTok}[1]{\textcolor{rmcolor}{\textit{#1}}}
- '<style type="text/css">'
- 'code span.an { color: #1F1C1B; font-style: italic; }'
- 'code span.in { color: #006E28; font-style: italic; }'
- 'code span.wa { color: #BF0303; font-style: italic; }'
- '</style>'
# adjust quote indent
- \renewenvironment{quote}{\list{}{\leftmargin=0.2in}\item[]}{\endlist}
---
103 changes: 103 additions & 0 deletions template/wg21.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,103 @@
<!DOCTYPE html>
<html xmlns="http://www.w3.org/1999/xhtml" lang="$lang$" xml:lang="$lang$"$if(dir)$ dir="$dir$"$endif$>
<head>
<meta charset="utf-8" />
<meta name="generator" content="pandoc" />
<meta name="viewport" content="width=device-width, initial-scale=1.0, user-scalable=yes" />
$for(author-meta)$
<meta name="author" content="$author-meta$" />
$endfor$
$if(date-meta)$
<meta name="dcterms.date" content="$date-meta$" />
$endif$
$if(keywords)$
<meta name="keywords" content="$for(keywords)$$keywords$$sep$, $endfor$" />
$endif$
<title>$if(title-prefix)$$title-prefix$ – $endif$$pagetitle$</title>
<style type="text/css">
code{white-space: pre-wrap;}
span.smallcaps{font-variant: small-caps;}
span.underline{text-decoration: underline;}
div.column{display: inline-block; vertical-align: top; width: 50%;}
$if(quotes)$
q { quotes: "“" "”" "‘" "’"; }
$endif$
</style>
$if(highlighting-css)$
<style type="text/css">
$highlighting-css$
</style>
$endif$
$for(css)$
<link rel="stylesheet" href="$css$" />
$endfor$
$if(math)$
$math$
$endif$
<!--[if lt IE 9]>
<script src="//cdnjs.cloudflare.com/ajax/libs/html5shiv/3.7.3/html5shiv-printshiv.min.js"></script>
<![endif]-->
$for(header-includes)$
$header-includes$
$endfor$
</head>
<body>
$for(include-before)$
$include-before$
$endfor$
$if(title)$
<header id="title-block-header">
<h1 class="title">$title$</h1>
$if(subtitle)$
<p class="subtitle">$subtitle$</p>
$endif$

<table>
<tr>
<td>Document #: </td>
<td>$document$</td>
</tr>
<tr>
<td>Date: </td>
<td>$date$</td>
</tr>
<tr>
<td style="vertical-align:top">Project: </td>
<td>Programming Language C++<br>
$for(audience)$
$audience$<br>
$endfor$
</td>
</tr>
$if(revises)$
<tr>
<td>Revises: </td>
<td>$revises$</td>
</tr>
$endif$
<tr>
<td style="vertical-align:top">Reply-to: </td>
<td>
$for(author)$
$author.name$<br><$author.email$><br>
$endfor$
</td>
</tr>
</table>

</header>
$endif$
$if(toc)$
<nav id="$idprefix$TOC">
$if(toctitle)$
<h2 id="$idprefix$toctitle">$toctitle$</h2>
$endif$
$table-of-contents$
</nav>
$endif$
$body$
$for(include-after)$
$include-after$
$endfor$
</body>
</html>

0 comments on commit 2785e81

Please sign in to comment.