Comments (3)
Solved: now in Dolphin I have this command for md files:
sed -i -e 's@<span class="symbol">\<\/span>@[\]{custom-style="symbol"}@g' -e 's@<span class="symbol">\<\/span>@[\]{custom-style="symbol"}@g' -e 's@<span class="symbol">\<\/span>@[\]{custom-style="symbol"}@g' -e 's@<span class="symbol">\<\/span>@[\]{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.
Sorry: my mistake!
Now the filter is working... but ...
not saving my class/styles to odt: this is the md code
<span class="symbol"></span>
as well as
<span style="font-family: opensymbol; color: olive;"></span>
not read as text but as symbol (without class)
from pandoc-odt-filters.
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
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from pandoc-odt-filters.