Skip to content

Commit

Permalink
Set up a simple asciidoc build system
Browse files Browse the repository at this point in the history
  • Loading branch information
marijnh committed Jul 30, 2013
1 parent 1fb15a6 commit f31312c
Show file tree
Hide file tree
Showing 6 changed files with 52 additions and 0 deletions.
3 changes: 3 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
tex/*.db
tex/*.tex
html/*.html
10 changes: 10 additions & 0 deletions Makefile
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
all: html/00_intro.html tex/00_intro.tex

html/%.html: %.txt asciidoc_html.conf
PATH=../js/codemirror/bin:$(PATH) asciidoc -f asciidoc_html.conf --backend=html5 -o $@ $<

tex/%.db: %.txt asciidoc_db.conf
asciidoc -f asciidoc_db.conf --backend=docbook -o $@ $<

tex/%.tex: tex/%.db
dblatex $< -o $@ -t tex
26 changes: 26 additions & 0 deletions asciidoc_db.conf
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
[miscellaneous]
newline=\n

[attributes]
# warnings=False
highlight=False

[macros]
(?su)(?<!\w)indexsee:\[(?P<attrlist>[^\]]*?)\]=indexsee

[indexsee-inlinemacro]
<indexterm>
<primary>{1}</primary>
<see>{2}</see>
</indexterm>

[source-highlight-block]
<programlisting>
|
</programlisting>

[indexterm-inlinemacro]
<indexterm>
<primary>{1}</primary>
{2? <secondary>{2}</secondary>}
</indexterm>
13 changes: 13 additions & 0 deletions asciidoc_html.conf
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
[miscellaneous]
newline=\n

[attributes]
disable-javascript=True
warnings=False
#pygments=True
highlight=True

[source-highlight-block]
<pre{id? id="{id}"} data-language="{language}" class="cm-s-default">
|
</pre>
Empty file added html/.keep
Empty file.
Empty file added tex/.keep
Empty file.

0 comments on commit f31312c

Please sign in to comment.