public inbox archive for pandoc-discuss@googlegroups.com
 help / color / mirror / Atom feed
* Mkd -> Latex, How do I change default behavior?
@ 2019-01-13 18:09 Ben Wilson
       [not found] ` <303d9bfc-db65-453d-a5bb-4fd71b0be9f8-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org>
  0 siblings, 1 reply; 3+ messages in thread
From: Ben Wilson @ 2019-01-13 18:09 UTC (permalink / raw)
  To: pandoc-discuss


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

When converting a Markdown document to LaTeX, the Horizontal Rule converts 
to "\begin{center}\rule{0.5\linewidth}{\linethickness}\end{center}". I 
would like it converted to "\pfbreak{}"

What is the most efficient way to do this? Can I add something to the 
command line?

TIA

-- 
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 post to this group, send email to pandoc-discuss-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org
To view this discussion on the web visit https://groups.google.com/d/msgid/pandoc-discuss/303d9bfc-db65-453d-a5bb-4fd71b0be9f8%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

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

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

* Re: Mkd -> Latex, How do I change default behavior?
       [not found] ` <303d9bfc-db65-453d-a5bb-4fd71b0be9f8-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org>
@ 2019-01-14 14:37   ` BPJ
       [not found]     ` <CADAJKhCDDp+jOzpigxyYhbeX+aRvR+EbU7C2_fD_Yx3mu7_1zQ-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
  0 siblings, 1 reply; 3+ messages in thread
From: BPJ @ 2019-01-14 14:37 UTC (permalink / raw)
  To: pandoc-discuss-/JYPxA39Uh5TLH3MbocFFw

[-- Attachment #1: Type: text/plain, Size: 2107 bytes --]

The very simple Lua filter below should do the trick. Save the lines
between backticks below in a file in the same folder as your markdown
document called e.g. "hrule.lua" and add "--lua-filter hrule.lua" (without
the quotes!) to your pandoc command line.

```
function HorizontalRule (elem)
    return pandoc.RawBlock('latex', '\\pfbreak')
end
```

Den sön 13 jan. 2019 19:10 skrev Ben Wilson <dausha-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>:

> When converting a Markdown document to LaTeX, the Horizontal Rule converts
> to "\begin{center}\rule{0.5\linewidth}{\linethickness}\end{center}". I
> would like it converted to "\pfbreak{}"
>
> What is the most efficient way to do this? Can I add something to the
> command line?
>
> TIA
>
> --
> 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 post to this group, send email to pandoc-discuss-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/pandoc-discuss/303d9bfc-db65-453d-a5bb-4fd71b0be9f8%40googlegroups.com
> <https://groups.google.com/d/msgid/pandoc-discuss/303d9bfc-db65-453d-a5bb-4fd71b0be9f8%40googlegroups.com?utm_medium=email&utm_source=footer>
> .
> For more options, visit https://groups.google.com/d/optout.
>

-- 
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 post to this group, send email to pandoc-discuss-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org
To view this discussion on the web visit https://groups.google.com/d/msgid/pandoc-discuss/CADAJKhCDDp%2BjOzpigxyYhbeX%2BaRvR%2BEbU7C2_fD_Yx3mu7_1zQ%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.

[-- Attachment #2: Type: text/html, Size: 3335 bytes --]

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

* Re: Mkd -> Latex, How do I change default behavior?
       [not found]     ` <CADAJKhCDDp+jOzpigxyYhbeX+aRvR+EbU7C2_fD_Yx3mu7_1zQ-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
@ 2019-01-14 17:04       ` Ben Wilson
  0 siblings, 0 replies; 3+ messages in thread
From: Ben Wilson @ 2019-01-14 17:04 UTC (permalink / raw)
  To: pandoc-discuss


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

You are a gentleman and a scholar. Thank you.

I was in the process of overriding the \rule when you sent this, and wasn't 
getting quite the results I wanted. (I also borrowed the "pfbreak" from 
memoir.cls and coded it into my *.tex since I got most of my value without 
using memoir otherwise.)

On Monday, January 14, 2019 at 9:37:53 AM UTC-5, BP wrote:
>
> The very simple Lua filter below should do the trick. Save the lines 
> between backticks below in a file in the same folder as your markdown 
> document called e.g. "hrule.lua" and add "--lua-filter hrule.lua" (without 
> the quotes!) to your pandoc command line.
>
> ```
> function HorizontalRule (elem)
>     return pandoc.RawBlock('latex', '\\pfbreak')
> end
> ```
>
> Den sön 13 jan. 2019 19:10 skrev Ben Wilson <dau...-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org 
> <javascript:>>:
>
>> When converting a Markdown document to LaTeX, the Horizontal Rule 
>> converts to 
>> "\begin{center}\rule{0.5\linewidth}{\linethickness}\end{center}". I would 
>> like it converted to "\pfbreak{}"
>>
>> What is the most efficient way to do this? Can I add something to the 
>> command line?
>>
>> TIA
>>
>> -- 
>> 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...-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org <javascript:>.
>> To post to this group, send email to pandoc-...-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org 
>> <javascript:>.
>> To view this discussion on the web visit 
>> https://groups.google.com/d/msgid/pandoc-discuss/303d9bfc-db65-453d-a5bb-4fd71b0be9f8%40googlegroups.com 
>> <https://groups.google.com/d/msgid/pandoc-discuss/303d9bfc-db65-453d-a5bb-4fd71b0be9f8%40googlegroups.com?utm_medium=email&utm_source=footer>
>> .
>> For more options, visit https://groups.google.com/d/optout.
>>
>

-- 
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 post to this group, send email to pandoc-discuss-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org
To view this discussion on the web visit https://groups.google.com/d/msgid/pandoc-discuss/10add990-9c82-4ea3-a2f0-34ed849ff70a%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

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

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

end of thread, other threads:[~2019-01-14 17:04 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-01-13 18:09 Mkd -> Latex, How do I change default behavior? Ben Wilson
     [not found] ` <303d9bfc-db65-453d-a5bb-4fd71b0be9f8-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org>
2019-01-14 14:37   ` BPJ
     [not found]     ` <CADAJKhCDDp+jOzpigxyYhbeX+aRvR+EbU7C2_fD_Yx3mu7_1zQ-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2019-01-14 17:04       ` Ben Wilson

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