public inbox archive for pandoc-discuss@googlegroups.com
 help / color / mirror / Atom feed
From: Kelly Price <strredwolf-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
To: pandoc-discuss-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org
Subject: Re: Markdown/HTML: Convert CSS styles to ODT styles (enhancement)
Date: Tue, 7 Nov 2023 10:28:21 -0500	[thread overview]
Message-ID: <CAKzFY7T9oPjduCwp32o2UB8wOrMOUJhu2k0yUfdJBrMv-BKRdA@mail.gmail.com> (raw)
In-Reply-To: <8f4c5470-82f5-44c8-8f17-3f807ccdbd11n-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org>

Okay, so before I go completely crazy, following the DOCX route.
Using Pandoc 2.9.2.1 currently (it's in Ubuntu's repos).
custom-ref.docx file has the style definition for "Rose" and it's
going through to the text document.  Using:

pandoc --reference-doc=custom-ref.docx test.md -f
'markdown_phpextra+bracketed_spans' -t docx -o test.docx

test.md has:

[Good evening, Drake.]{custom-style="Rose"}

When I run it, the style does not get applied to the bracketed text.  Any ideas?

On Tue, Nov 7, 2023 at 9:30 AM jcr <ffi.appdev-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote:
>
> If you're willing to use docx instead of ODT, you can take advantage of pandoc's support for Custom Styles and avoid the XML wrangling. You simply get a copy of the default reference doc with `pandoc -o custom-reference.docx --print-default- data-file reference.docx`, add a Rose style to `custom-reference.docx`, and give a `custom-style=Rose` attribute in Markdown to colored text.
>
> On Monday, November 6, 2023 at 10:23:36 AM UTC-5 Kelly “STrRedWolf” Price wrote:
>>
>> Hello all.  Using Pandoc to help convert my fiction (written in Markdown) into ODT format so I can combine and publish... but in writing, I found a specific use case.
>>
>> I need colored text.
>>
>> For instance, if I define a CSS stylesheet file to color said text, I can use this Markdown:
>>
>> [Are the good guys really good if they use it for cover for evil?]{.rose}
>>
>> I can work around it a bit by exporting to HTML (markdown_phpextra+bracketed_spans) and opening that into LibreOffice, but that opens a whole can of LibreOffice worms relating to web vs PDF/print formatting.
>>
>> Is there a way for Pandoc to translate the CSS stylesheet into ODT styles, and apply said styles as wanted?
>
> --
> You received this message because you are subscribed to a topic in the Google Groups "pandoc-discuss" group.
> To unsubscribe from this topic, visit https://groups.google.com/d/topic/pandoc-discuss/xMuBWNkXPRI/unsubscribe.
> To unsubscribe from this group and all its topics, send an email to pandoc-discuss+unsubscribe-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org
> To view this discussion on the web visit https://groups.google.com/d/msgid/pandoc-discuss/8f4c5470-82f5-44c8-8f17-3f807ccdbd11n%40googlegroups.com.



-- 
Kelly "STrRedWolf" Price
http://redwolf.ws

-- 
You received this message because you are subscribed to the Google Groups "pandoc-discuss" group.
To unsubscribe from this group and stop receiving emails from it, send an email to pandoc-discuss+unsubscribe-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org
To view this discussion on the web visit https://groups.google.com/d/msgid/pandoc-discuss/CAKzFY7T9oPjduCwp32o2UB8wOrMOUJhu2k0yUfdJBrMv-BKRdA%40mail.gmail.com.


  parent reply	other threads:[~2023-11-07 15:28 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-11-06 15:23 Kelly “STrRedWolf” Price
     [not found] ` <9b60d1f7-098c-4e8e-a801-764d0b754ef0n-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org>
2023-11-06 16:04   ` 'William Lupton' via pandoc-discuss
     [not found]     ` <CAEe_xxg-6qcmSgvqtHCZgBMBG3UyMhLyLai1xU2Aa39n+ZJfvQ-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2023-11-06 18:23       ` Bastien DUMONT
2023-11-07 14:30   ` jcr
     [not found]     ` <8f4c5470-82f5-44c8-8f17-3f807ccdbd11n-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org>
2023-11-07 15:28       ` Kelly Price [this message]
     [not found]         ` <CAKzFY7T9oPjduCwp32o2UB8wOrMOUJhu2k0yUfdJBrMv-BKRdA-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2023-11-07 16:21           ` jcr
     [not found]             ` <62ec21c7-f152-42b1-8b24-b78f8f56a2cen-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org>
2023-11-07 16:33               ` Kelly Price
     [not found]                 ` <CAKzFY7RU4+aa=cWL1z7dwDjGu7bWWei3xe=Lg4txT5jngy+bRA-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2023-11-07 19:10                   ` Bastien DUMONT

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=CAKzFY7T9oPjduCwp32o2UB8wOrMOUJhu2k0yUfdJBrMv-BKRdA@mail.gmail.com \
    --to=strredwolf-re5jqeeqqe8avxtiumwx3w@public.gmane.org \
    --cc=pandoc-discuss-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).