Closed dixonsiu closed 7 years ago
Basic solution to Q2 is here.
Need to add information on meta/CSS template to Pandoc command.
Answer on Q2
The format specifies markdown_github. As mentioned above, the filter creates and specifies convertlink.py at the link destination. CSS specifies github.css with the -c option.
The command satisfying the above is as follows.
Pandoc -s -f markdown_github --filter=convertlink.py xxxx.md - c github.css - o xxxx.html
Although it is converted to an HTML file by the above command, it is necessary to pay attention to the following.
If there is a table to be converted, tags are created automatically as \<table style = "width: 28%;">. If you specify width, the table display will be incorrect, so you need to convert it to \<table>.
Kouroki-san,
Thank you for you input.
~~it seems like the latest Pandoc does not have the table width issue anymore. ~~
I was wrong, certain table in markdown does convert to table width in HTML.
>pandoc --version
pandoc 1.19.2.1
Moreover, if we execute the Pandoc command in Windows, we need to use the "/" correctly when specifying the parameters.
Following is the example when executed in document-writer directory.
pandoc -s -f markdown_github --filter=../../../convertLink.py -c ../github.css README.md -o index.html
Use the following scripts in en/ja:
Note: Need to be add the body class ("listStyleTypeNone") manually back after converting the markdown for now. Best way is to rewrite the sections that weren't meant for itemization.
Latest command for automation requires the followings.
Write special itemized list in HTML format in markdown file.
Sample changes that I applied for English version. UL tag uses a special CSS class to hide the "bullet".
<ul class="listStyleTypeNone">
Unfortunately, table conversion still needs to do it manually.
Questions to be answer:
What template or filter should be running with Pandoc command?
Plus the following rules: