[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [lojban] Re: The CLL project, technical directions





On Wednesday, September 10, 2014 1:38:07 PM UTC-4, Robin Powell wrote:
On Wed, Aug 13, 2014 at 10:32:03AM -0700, TR NS wrote:
>
>
> On Saturday, August 9, 2014 4:23:13 PM UTC-4, Robin Powell wrote:
> >
> > On Sat, Aug 09, 2014 at 05:44:17AM -0700, TR NS wrote:
> > >
> > > On Thursday, August 7, 2014 9:19:44 PM UTC-4, Robin Powell wrote:
> > > >
> > > >
> > > > So let me start off by saying that pandoc is certainly not out of
> > > > the question and you're welcome to try to do something like that.  I
> > > > played with it myself for a while.
> > > >
> > >
> > > But I would like to see how far I can get the Pandoc solution to
> > > work.
> >
> > I'm totally OK with that.
> >
> >
> Quick status update on my progress in this regard. I have gotten to the
> point where everything is looking pretty good. The problem I face at this
> point is having to with examples, e.g.
>
>     <example role="interlinear-gloss-example"
> xml:id="example-random-id-k02C">
>       <title>
>         <anchor xml:id="c2e5d5"/>
>       </title>
>       <interlinear-gloss-itemized>
>         <jbo>
>           <sumti>mi</sumti>
>           <selbri>tavla</selbri>
>           <sumti>do</sumti>
>           <sumti>zo'e</sumti>
>           <sumti>zo'e</sumti>
>         </jbo>
>         <natlang>I talk to you about something in some language.</natlang>
>        
>       </interlinear-gloss-itemized>
>     </example>
>  
> To convert that into an example that could be rendered by Pandoc would
> entail removing all these custom tags, e.g.
>
>     (@)c2e5d5        mi tavla do zo'e zo'e
>                      I talk to you about something in some language.
>  
> Even though the final result looks good, loosing all this metadata seems
> like a bad idea to me. To prevent that means I need to write pandoc
> filter(s) to properly handle the custom XML. This is not out of the
> question. Unfortunately I have found that writing filters for Pandoc is
> much more difficult than one would expect. The API for doing so does not
> apper to be well documented and it doesn't help that Pandoc is written in
> Haskell (which I find mind numbing to decipher). So now I have decide if
> wrestling with Haskell and Pandoc filters is worth the effort. Or seek
> another solution.

That's too bad.  ;(

It is. But recently I found a solution I like even better, mainly because it is a more direct solution. It's called WeasyPrint and it is an HTML to PDF converter. Because it is HTML based, it is much easier to manipulate custom markup. This can be doen via coded transforms if need be, but much of it can be done via CSS which is really nice. And since Markdown passes-thru custom markup, it can be used as the source markup. 

However it remains to be seen to what degree the printed output will be suitable. My preliminary tests looked good, but as always the devil is in the details.

http://weasyprint.org/

--
You received this message because you are subscribed to the Google Groups "lojban" group.
To unsubscribe from this group and stop receiving emails from it, send an email to lojban+unsubscribe@googlegroups.com.
To post to this group, send email to lojban@googlegroups.com.
Visit this group at http://groups.google.com/group/lojban.
For more options, visit https://groups.google.com/d/optout.