tajmone / pandoc-goodies Goto Github PK
View Code? Open in Web Editor NEWA tresure-box of resources for pandoc, pp and Texts word processor.
License: MIT License
A tresure-box of resources for pandoc, pp and Texts word processor.
License: MIT License
Seems like the template isn't parsed properly:
> pandoc --template=GitHub.html5 blah.md -o blah.html
pandoc: "template" (line 1, column 2):
unexpected "-"
expecting letter
CallStack (from HasCallStack):
error, called at src/Text/Pandoc/Templates.hs:185:26 in pandoc-1.17.2-Cq2iGUE9cDsAnk3CjbY7fx:Text.Pandoc.Templates
Running on Debian 9:
> pandoc --version | head -1
pandoc 1.17.2
Template is available locally under /usr/share/pandoc/data/templates/GitHub.html5
and contains:
$--| GitHub HTML5 Pandoc Template" v2.1 | 2018/02/28 | pandoc v2.1.1
<!DOCTYPE html>
<!--
==============================================================================
"GitHub HTML5 Pandoc Template" v2.1 — by Tristano Ajmone
==============================================================================
Copyright © Tristano Ajmone, 2017, MIT License (MIT). Project's home:
...
Any ideas?
I want to know how to use, give a user tutorial. Because I test it, but never get a good html.
My usage is pandoc openapi.md -o openapi.html --css GitHub.css --self-contained
. The result is ```
[WARNING] This document format requires a nonempty <title> element.
Please specify either 'title' or 'pagetitle' in the metadata.
Falling back to 'openapi'
Having a little link icon next to headers appear on hover would be pretty cool!
Hi @tajmone !
I just wanted to inform you and the others, that there is now a lua-filter which implements the gfm task lists.
It is maintained by john mcfarlane and works on the AST.
Propably this is a better approach than to do it with pp
.
Maybe you could make a note about that in the readme here, that it may be better to use this lua-filter instead of your code?
I don't want to make your contributions bad, though, and I want to thank you again for your efforts.
This line breaks the result if the markdown file has some yaml metadata, including "toc: true". It should read
Relative page links like
https://github.com/tajmone/pandoc-goodies/tree/master/templates/html5/github#primer-css
or
https://github.com/tajmone/pandoc-goodies#gnu-general-public-license
would be awesome.
First off, many thanks for these goodies, they are really nice!
This is a question rather than an issue/feature request: I do not seem to be able to get visible line numbering working with your github html5 theme. Could you point out any obvious errors please?
I am working on the following markdown file, using the newest version of GitHub.md from this repo.
---
title: test
---
```{.numberLines}
SQUIRE TRELAWNEY, Dr. Livesey, and the rest of these gentlemen having
asked me to write down the whole particulars about Treasure Island, from
the beginning to the end, keeping nothing back but the bearings of the
island, and that only because there is still treasure not yet lifted, I
take up my pen in the year of grace 17__ and go back to the time when
my father kept the Admiral Benbow inn and the brown old seaman with the
sabre cut first took up his lodging under our roof.
I produce html like this:
pandoc -s --template=~/.pandoc/templates/GitHub.html5 < test.md
The resulting html does not include line numbers when rendered in my browser.
The relevant part of the source is this.
<body>
<article class="markdown-body">
<header>
<h1 class="title">test</h1>
</header>
<div class="sourceCode" id="cb1"><pre
class="sourceCode numberSource numberLines"><code class="sourceCode"><span id="cb1-1"><a href="#cb1-1"></a>SQUIRE TRELAWNEY, Dr. Livesey, and the rest of these gentlemen having</span>
<span id="cb1-2"><a href="#cb1-2"></a>asked me to write down the whole particulars about Treasure Island, from</span>
<span id="cb1-3"><a href="#cb1-3"></a>the beginning to the end, keeping nothing back but the bearings of the</span>
<span id="cb1-4"><a href="#cb1-4"></a>island, and that only because there is still treasure not yet lifted, I</span>
<span id="cb1-5"><a href="#cb1-5"></a>take up my pen in the year of grace 17__ and go back to the time when</span>
<span id="cb1-6"><a href="#cb1-6"></a>my father kept the Admiral Benbow inn and the brown old seaman with the</span>
<span id="cb1-7"><a href="#cb1-7"></a>sabre cut first took up his lodging under our roof.</span></code></pre></div>
</article>
</body>
Can you point me to the right direction? Many thanks!
hello,
I'm just trying to use GitHub.html5 for one of a file that contains quotes (an example of the source below), and see the next output
"template" (line 857, column 107):
unexpected "<"
expecting letter
It seems that the template does not handle quotes
the source
The system shall use the following requirements file format:
```markdown
# [<id>] <title>
{{
<attribute1>: value1
<attribute2>: value2
}}
<body>
## [<id>] <title>
<body>
The GitHub template cannot be used as it generates a parsing error. System is Ubuntu 16.04 LTS (Xenial), and Pandoc version is 1.16. Full information with following commands:
# Version info
# ------------
grep DESCRIPTION /etc/lsb-release
#> DISTRIB_DESCRIPTION="Ubuntu 16.04 LTS"
pandoc --version | head -1
#> pandoc 1.16.0.2
# Failure test
# ------------
git clone https://github.com/tajmone/pandoc-goodies.git
cat <<EOF >test.md
# Section 1
This is a Markdown document!
# Section 2
This is section 2
EOF
pandoc -f markdown -t html5 --toc \
--template pandoc-goodies/templates/html5/github/GitHub.html5 \
-o test.html test.md
#> pandoc: "template" (line 1, column 2):
#> unexpected "-"
#> expecting letter
I'd understand that the 16.04 system is a bit old (albeit fully supported). However the error also happens in the latest stable version, Ubuntu 18.04 LTS (Bionic):
# Version info
# ------------
grep DESCRIPTION /etc/lsb-release
#> DISTRIB_DESCRIPTION="Ubuntu 18.04.2 LTS"
pandoc --version | head -1
#> pandoc 1.19.2.4
# Failure test
# ------------
git clone https://github.com/tajmone/pandoc-goodies.git
cat <<EOF >test.md
# Section 1
This is a Markdown document!
# Section 2
This is section 2
EOF
pandoc -f markdown -t html5 --toc \
--template pandoc-goodies/templates/html5/github/GitHub.html5 \
-o test.html test.md
#> pandoc: "template" (line 1, column 2):
#> unexpected "-"
#> expecting letter
#> CallStack (from HasCallStack):
#> error, called at src/Text/Pandoc/Templates.hs:73:35 in pandoc-1.19.2.4-HbfKWUyODESBIy0vGktOwX:Text.Pandoc.Templates
Which means that it's not possible to use the template even with latest stable version of Ubuntu (and by extension I'd say Debian)
Hi,
Thanks for your really useful guide (I'm referring to pandoc-goodies/tree/master/skylighting-themes). I have a problem I can't seem to be able to address: in every style, the line number is underlined by default. This is done through
a.sourceLine::before {
text-decoration: underline;
}
in the CCS
code produced by the theme I'm using. I can't seem to find a way to change this behaviour. The only two parameters referring to line numbers in the theme
files seem to be
"line-number-color": "#aaaaaa",
"line-number-background-color": null,
Any idea on how to change this behavior?
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.