Giter Club home page Giter Club logo

pandoc-odt-filters's People

Contributors

alpianon avatar josineto avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar

pandoc-odt-filters's Issues

error message [solved]

Thank you for this effort. Today I tried to use your filter

 pandoc -t odt+smart --lua-filter odt-custom-styles.lua "Cattolicesimo romano e forma politica".md -o "Cattolicesimo romano e forma politica".odt

but I get this error message:

Error running filter odt-custom-styles.lua: [string "odt-custom-styles.lua"]:7: unexpected symbol near '<'

and so: no conversion

Custom styles: Plain, Image and inner Div are not processed

Hey @jzeneto,

Thanks for the filters. I'm still wrapping my head around the lua syntax and what's being done in odt-custom-styles.lua, but I think I'll be able to contribute back once I do.

So, the custom styles are not being created for me.

Here's my command:
pandoc Thinspace.html --lua-filter ./pandoc-odt-filters/odt-custom-styles.lua -o thinspace-pandoc3.odt

I have markup that looks like this:
<div custom-style="scene-sep" class="scene-sep" style="text-align: center;">* * * * *</div>

It is styled on output in odt as Text body, and there is no custom style created called scene-sep as expected.

I'll dive into this in the evening, but any leads as to why this is not working?

Also, I have full control over input markup. (I wrote a bunch of gulp plugins to coerce my md files into the output html structure.)

You can use a table as the replacement argument of string.gsub

I saw that here you are using a replacement function to just look up a value in a table. The function is unnecessary since if you pass a table with string keys and values as the replacement argument to string.gsub Lua will automatically use the first capture (or the whole match if there was no capture) as a key to look up in the table and use the value of that key as replacement, so you can replace that with

  text = string.gsub(text, escPattern, escapes)

and it will have the exact same effect, except that since no extra Lua function is created and called every time it is much more efficient. (You will still need a function if you want to look up another capture than the first one of course!)

tables?

hello - tested this out of curiosity - it seems tables do not show properly because the included text is somehow converted to paragraph style

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.