public inbox archive for pandoc-discuss@googlegroups.com
 help / color / mirror / Atom feed
* RTL Markdown with embedded code snippets
@ 2022-08-16 20:59 Zev Spitz
       [not found] ` <419fdac9-86aa-42b6-a632-2e5b624c60acn-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org>
  0 siblings, 1 reply; 4+ messages in thread
From: Zev Spitz @ 2022-08-16 20:59 UTC (permalink / raw)
  To: pandoc-discuss


[-- Attachment #1.1: Type: text/plain, Size: 1446 bytes --]

I'm trying to convert some RTL Markdown with embedded LTR, code snippets 
and fenced blocks to either DOCX or ODT. (sample between the lines):

---
ב. מהו תחביר ה-JavaScript הנדרש לשנות את **תוכן** אלמנט ה-HTML הבא:

```html
<p id='demo'>This is a sample paragraph.</p>
```

1. `#demo.innerHTML = 'Hello World!';`
2. `document.querySelector('#demo').innerHTML = 'Hello World!';`
3. `document.querySelectorAll('p').innerHTML = 'Hello World!';`
4. `document.querySelector('.demo').innerHTML = 'Hello World!';`
--- 

My understanding is that in order for the document to be rendered in RTL, I 
have to pass dir=rtl either as a variable or as metadata, which can be done 
from the command line, with -V or -M respectively.

1. When outputting to DOCX, if I pass as metadata it's ignored. Outputting 
to ODT ignores both variable and metadata.
2. Outputting to DOCX doesn't leave the code elements as LTR, nor does it 
apply syntax highlighting.

What can I do to fix this?

-- 
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/419fdac9-86aa-42b6-a632-2e5b624c60acn%40googlegroups.com.

[-- Attachment #1.2: Type: text/html, Size: 2358 bytes --]

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: RTL Markdown with embedded code snippets
       [not found] ` <419fdac9-86aa-42b6-a632-2e5b624c60acn-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org>
@ 2022-08-16 21:15   ` John MacFarlane
       [not found]     ` <254FA7DD-CF27-4A84-B088-B0E6F114AD2E-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
  0 siblings, 1 reply; 4+ messages in thread
From: John MacFarlane @ 2022-08-16 21:15 UTC (permalink / raw)
  To: pandoc-discuss-/JYPxA39Uh5TLH3MbocFFw

First, what version of pandoc are you using?


> On Aug 16, 2022, at 1:59 PM, Zev Spitz <spitzzev-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote:
> 
> I'm trying to convert some RTL Markdown with embedded LTR, code snippets and fenced blocks to either DOCX or ODT. (sample between the lines):
> 
> ---
> ב. מהו תחביר ה-JavaScript הנדרש לשנות את **תוכן** אלמנט ה-HTML הבא:
> 
> ```html
> <p id='demo'>This is a sample paragraph.</p>
> ```
> 
> 1. `#demo.innerHTML = 'Hello World!';`
> 2. `document.querySelector('#demo').innerHTML = 'Hello World!';`
> 3. `document.querySelectorAll('p').innerHTML = 'Hello World!';`
> 4. `document.querySelector('.demo').innerHTML = 'Hello World!';`
> ---
> 
> My understanding is that in order for the document to be rendered in RTL, I have to pass dir=rtl either as a variable or as metadata, which can be done from the command line, with -V or -M respectively.
> 
> 1. When outputting to DOCX, if I pass as metadata it's ignored. Outputting to ODT ignores both variable and metadata.
> 2. Outputting to DOCX doesn't leave the code elements as LTR, nor does it apply syntax highlighting.
> 
> What can I do to fix this?
> 
> -- 
> 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/419fdac9-86aa-42b6-a632-2e5b624c60acn%40googlegroups.com.

-- 
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/254FA7DD-CF27-4A84-B088-B0E6F114AD2E%40gmail.com.


^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: RTL Markdown with embedded code snippets
       [not found]     ` <254FA7DD-CF27-4A84-B088-B0E6F114AD2E-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
@ 2022-08-16 21:34       ` Zev Spitz
       [not found]         ` <0b3bd7f2-c061-41b5-ade3-9ad7180cb941n-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org>
  0 siblings, 1 reply; 4+ messages in thread
From: Zev Spitz @ 2022-08-16 21:34 UTC (permalink / raw)
  To: pandoc-discuss


[-- Attachment #1.1: Type: text/plain, Size: 2301 bytes --]

Pandoc version 2.19
Also, Word 2010 and LibreOffice Version: 7.1.2.2 (x64)

On Wednesday, August 17, 2022 at 12:15:21 AM UTC+3 fiddlosopher wrote:

> First, what version of pandoc are you using?
>
>
> > On Aug 16, 2022, at 1:59 PM, Zev Spitz <spit...-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote:
> > 
> > I'm trying to convert some RTL Markdown with embedded LTR, code snippets 
> and fenced blocks to either DOCX or ODT. (sample between the lines):
> > 
> > ---
> > ב. מהו תחביר ה-JavaScript הנדרש לשנות את **תוכן** אלמנט ה-HTML הבא:
> > 
> > ```html
> > <p id='demo'>This is a sample paragraph.</p>
> > ```
> > 
> > 1. `#demo.innerHTML = 'Hello World!';`
> > 2. `document.querySelector('#demo').innerHTML = 'Hello World!';`
> > 3. `document.querySelectorAll('p').innerHTML = 'Hello World!';`
> > 4. `document.querySelector('.demo').innerHTML = 'Hello World!';`
> > ---
> > 
> > My understanding is that in order for the document to be rendered in 
> RTL, I have to pass dir=rtl either as a variable or as metadata, which can 
> be done from the command line, with -V or -M respectively.
> > 
> > 1. When outputting to DOCX, if I pass as metadata it's ignored. 
> Outputting to ODT ignores both variable and metadata.
> > 2. Outputting to DOCX doesn't leave the code elements as LTR, nor does 
> it apply syntax highlighting.
> > 
> > What can I do to fix this?
> > 
> > -- 
> > 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-discus...-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org
> > To view this discussion on the web visit 
> https://groups.google.com/d/msgid/pandoc-discuss/419fdac9-86aa-42b6-a632-2e5b624c60acn%40googlegroups.com
> .
>
>

-- 
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/0b3bd7f2-c061-41b5-ade3-9ad7180cb941n%40googlegroups.com.

[-- Attachment #1.2: Type: text/html, Size: 3485 bytes --]

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: RTL Markdown with embedded code snippets
       [not found]         ` <0b3bd7f2-c061-41b5-ade3-9ad7180cb941n-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org>
@ 2022-08-16 22:44           ` John MacFarlane
  0 siblings, 0 replies; 4+ messages in thread
From: John MacFarlane @ 2022-08-16 22:44 UTC (permalink / raw)
  To: pandoc-discuss-/JYPxA39Uh5TLH3MbocFFw

Try putting the code block inside a div marked for ltr

::: {dir=ltr}

``` html
<p>hi</p.
```

:::



> On Aug 16, 2022, at 2:34 PM, Zev Spitz <spitzzev-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote:
> 
> Pandoc version 2.19
> Also, Word 2010 and LibreOffice Version: 7.1.2.2 (x64)
> 
> On Wednesday, August 17, 2022 at 12:15:21 AM UTC+3 fiddlosopher wrote:
> First, what version of pandoc are you using? 
> 
> 
> > On Aug 16, 2022, at 1:59 PM, Zev Spitz <spit...-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote: 
> > 
> > I'm trying to convert some RTL Markdown with embedded LTR, code snippets and fenced blocks to either DOCX or ODT. (sample between the lines): 
> > 
> > --- 
> > ב. מהו תחביר ה-JavaScript הנדרש לשנות את **תוכן** אלמנט ה-HTML הבא: 
> > 
> > ```html 
> > <p id='demo'>This is a sample paragraph.</p> 
> > ``` 
> > 
> > 1. `#demo.innerHTML = 'Hello World!';` 
> > 2. `document.querySelector('#demo').innerHTML = 'Hello World!';` 
> > 3. `document.querySelectorAll('p').innerHTML = 'Hello World!';` 
> > 4. `document.querySelector('.demo').innerHTML = 'Hello World!';` 
> > --- 
> > 
> > My understanding is that in order for the document to be rendered in RTL, I have to pass dir=rtl either as a variable or as metadata, which can be done from the command line, with -V or -M respectively. 
> > 
> > 1. When outputting to DOCX, if I pass as metadata it's ignored. Outputting to ODT ignores both variable and metadata. 
> > 2. Outputting to DOCX doesn't leave the code elements as LTR, nor does it apply syntax highlighting. 
> > 
> > What can I do to fix this? 
> > 
> > -- 
> > 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-discus...-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org 
> > To view this discussion on the web visit https://groups.google.com/d/msgid/pandoc-discuss/419fdac9-86aa-42b6-a632-2e5b624c60acn%40googlegroups.com. 
> 
> 
> -- 
> 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/0b3bd7f2-c061-41b5-ade3-9ad7180cb941n%40googlegroups.com.

-- 
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/9E31FD14-C608-40E7-BC04-31F5D579AD9F%40gmail.com.


^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2022-08-16 22:44 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-08-16 20:59 RTL Markdown with embedded code snippets Zev Spitz
     [not found] ` <419fdac9-86aa-42b6-a632-2e5b624c60acn-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org>
2022-08-16 21:15   ` John MacFarlane
     [not found]     ` <254FA7DD-CF27-4A84-B088-B0E6F114AD2E-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
2022-08-16 21:34       ` Zev Spitz
     [not found]         ` <0b3bd7f2-c061-41b5-ade3-9ad7180cb941n-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org>
2022-08-16 22:44           ` John MacFarlane

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).