minad / olelo

Wiki with git backend
MIT License
241 stars 44 forks source link

Latex Export of included pages (only in Kramdown) #52

Closed alexwall closed 11 years ago

alexwall commented 13 years ago

When a page contains include tags like this part will be HTML in the Latex export file.

alexwall commented 13 years ago
# Thesis 

Some Text ......

<include page="Chapter01" />
<include page="Chapter02" />
<include page="Attachements" />

Some text....
minad commented 13 years ago

ok, I will take a look into it

minad commented 13 years ago

This is specific to the kramdown latex output mode. Unfortunately it is not so trivial to find a simple fix for this.

alexwall commented 13 years ago

Where is the Problem or what has to be done to fix it.

minad commented 13 years ago

The problem is that kramdown is transformed directly to latex. If you take a look at the aspect definition: aspect :latex do is_cacheable accepts 'text/x-markdown(.kramdown)?' mime 'text/plain; charset=utf-8' filter do remove_comments.tag_shortcuts.markdown_nowiki tag(:static => true, :disable => 'html:*') { kramdown!(:latex => true) } end end

The filters are executed in the following order: remove html comments, replace tag shortcuts, replace markdown nowiki syntax with tag and after that the tag filter with kramdown as subfilter.

The tag filter replaces every tag with a token. These tokens are replaced after the subfilter finished its work. But the include tag produces html.

minad commented 11 years ago

kramdown latex output not supported anymore