Giter Club home page Giter Club logo

Comments (3)

DoctorSubtilis avatar DoctorSubtilis commented on July 20, 2024 1

Solved: now in Dolphin I have this command for md files:

sed -i -e 's@<span class="symbol">\&#58771;<\/span>@[\&#58771;]{custom-style="symbol"}@g' -e 's@<span class="symbol">\&#58772;<\/span>@[\&#58772;]{custom-style="symbol"}@g' -e 's@<span class="symbol">\&#58773;<\/span>@[\&#58773;]{custom-style="symbol"}@g' -e 's@<span class="symbol">\&#58774;<\/span>@[\&#58774;]{custom-style="symbol"}@g' %U && pandoc -t odt+smart --lua-filter odt-custom-styles.lua %U -o %u.odt --reference-doc="default.ott" && rename 's/md.odt/odt/g' *  

It works! Thank you!

from pandoc-odt-filters.

DoctorSubtilis avatar DoctorSubtilis commented on July 20, 2024

Sorry: my mistake!
Now the filter is working... but ...
not saving my class/styles to odt: this is the md code

<span class="symbol">&#58773;</span>

as well as

<span style="font-family: opensymbol; color: olive;">&#58773;</span>

not read as text but as symbol (without class)

from pandoc-odt-filters.

josineto avatar josineto commented on July 20, 2024

Hi, @DoctorSubtilis, sorry for the extremely long silence. I'm glad that you found a way to make it work.

The odt-custom-styles.lua filter is designed to recognize styles marked as custom attributes in spans and divs in pure markdown (as apparently you perceived, judging by your own solution using sed). So:

[a little span]{custom-style="symbol"}

is recognized, but

<span class="symbol">a little span</span>

doesn't. This is because Pandoc doesn't parse HTML spans as markdown spans, and so Lua filters can't manipulate them properly.

Also, custom styles, in this filter, refers to ODT styles (such as Paragraph, Heading 1 and so on). CSS styles are a whole different type of styles.

from pandoc-odt-filters.

Related Issues (4)

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.