Last active
August 29, 2015 14:20
-
-
Save lo48576/385008523a706d1d3a4f to your computer and use it in GitHub Desktop.
asciidoc to pdf (with fop)
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
#!/bin/sh | |
a2x -fpdf -dbook --fop --fop-opts="-c ./fop.xconf" --xsl-file=fop-vl-pgothic.xsl template.adoc |
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
<?xml version='1.0'?> | |
<xsl:stylesheet version="1.0" | |
xmlns:xsl="http://www.w3.org/1999/XSL/Transform" | |
xmlns:fo="http://www.w3.org/1999/XSL/Format" | |
encoding="UTF-8" > | |
<!-- specify fo.xsl path in your asciidoc installation. --> | |
<xsl:import href="/usr/share/asciidoc/docbook-xsl/fo.xsl"/> | |
<xsl:param name="paper.type" select="'A4'"/> | |
<xsl:template> | |
<fo:inline font-family="VL PGothic"> | |
<xsl:apply-templates/> | |
</fo:inline> | |
</xsl:template> | |
<!-- specify fonts you prefer. --> | |
<xsl:param name="title.font.family">VL PGothic</xsl:param> | |
<xsl:param name="body.font.family">VL PGothic</xsl:param> | |
<xsl:param name="monospace.font.family">VL PGothic</xsl:param> | |
<xsl:param name="symbol.font.family">VL PGothic</xsl:param> | |
<xsl:param name="sans.font.family">VL PGothic</xsl:param> | |
</xsl:stylesheet> |
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
<?xml version="1.0"?> | |
<fop version="1.0"> | |
<base>.</base> | |
<source-resolution>72</source-resolution> | |
<target-resolution>72</target-resolution> | |
<default-page-settings height="240mm" width="120mm"/> | |
<renderers> | |
<renderer mime="application/pdf"> | |
<filterList> | |
<value>flate</value> | |
</filterList> | |
<fonts> | |
<auto-detect/> | |
</fonts> | |
</renderer> | |
</renderers> | |
</fop> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment