public inbox archive for pandoc-discuss@googlegroups.com
 help / color / mirror / Atom feed
* tagging codes detecting
@ 2022-02-10 10:27 mr vicky
       [not found] ` <0801754e-c412-4e23-89a0-6b7bad4fff64n-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org>
  0 siblings, 1 reply; 12+ messages in thread
From: mr vicky @ 2022-02-10 10:27 UTC (permalink / raw)
  To: pandoc-discuss


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

hello
i am converting md to epub file but that md file is programming book where 
is some codes written inside but when i convert it to epub then its auto 
detecting these tags and making very bad epub file with page breaks and 
some other kind of coding elements

for example i attached screenshot and point out with red mark
kindly check attach file

there is any option to ignore programming codes while converting to epub 
file ?



Thanks

-- 
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/0801754e-c412-4e23-89a0-6b7bad4fff64n%40googlegroups.com.

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

[-- Attachment #2: Screenshot 2022-02-10 152531.jpg --]
[-- Type: image/jpeg, Size: 50442 bytes --]

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

* Re: tagging codes detecting
       [not found] ` <0801754e-c412-4e23-89a0-6b7bad4fff64n-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org>
@ 2022-02-10 12:37   ` Joost
       [not found]     ` <58f09215-7a45-4f1c-ae7b-f651faaed294-jFIJ+Wc5/Vo7lZ9V/NTDHw@public.gmane.org>
  0 siblings, 1 reply; 12+ messages in thread
From: Joost @ 2022-02-10 12:37 UTC (permalink / raw)
  To: 'Jan Ulrich Hasecke'

On Thu, 10 Feb 2022, at 11:27, mr vicky wrote:
> hello
> i am converting md to epub file but that md file is programming book 
> where is some codes written inside but when i convert it to epub then 
> its auto detecting these tags and making very bad epub file with page 
> breaks and some other kind of coding elements
[...]
> there is any option to ignore programming codes while converting to epub file ?

Note that Markdown allows you to include HTML elements, so whenever you write e.g. <h1> directly, Pandoc assums that's what you're doing and will put an <h1> tag in the html (or epub) output.

You'll want to mark the tags as code, which you can do with backticks: `<h1>`.

HTH

-- 
Joost Kremers
Life has its moments


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

* Re: tagging codes detecting
       [not found]     ` <58f09215-7a45-4f1c-ae7b-f651faaed294-jFIJ+Wc5/Vo7lZ9V/NTDHw@public.gmane.org>
@ 2022-02-10 12:49       ` mr vicky
       [not found]         ` <3806ef68-3553-4e8e-8b04-bf7cc4226e7cn-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org>
  0 siblings, 1 reply; 12+ messages in thread
From: mr vicky @ 2022-02-10 12:49 UTC (permalink / raw)
  To: pandoc-discuss


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

so before convert to epub file i have to edit md file and find all tags and 
add these backticks ? 
there is no option in pandoc to ignore tags inside book ?

On Thursday, February 10, 2022 at 5:37:27 PM UTC+5 Joost wrote:

> On Thu, 10 Feb 2022, at 11:27, mr vicky wrote:
> > hello
> > i am converting md to epub file but that md file is programming book 
> > where is some codes written inside but when i convert it to epub then 
> > its auto detecting these tags and making very bad epub file with page 
> > breaks and some other kind of coding elements
> [...]
> > there is any option to ignore programming codes while converting to epub 
> file ?
>
> Note that Markdown allows you to include HTML elements, so whenever you 
> write e.g. <h1> directly, Pandoc assums that's what you're doing and will 
> put an <h1> tag in the html (or epub) output.
>
> You'll want to mark the tags as code, which you can do with backticks: 
> `<h1>`.
>
> HTH
>
> -- 
> Joost Kremers
> Life has its moments
>

-- 
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/3806ef68-3553-4e8e-8b04-bf7cc4226e7cn%40googlegroups.com.

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

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

* Re: tagging codes detecting
       [not found]         ` <3806ef68-3553-4e8e-8b04-bf7cc4226e7cn-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org>
@ 2022-02-10 13:23           ` William Lupton
       [not found]             ` <CAEe_xxjC3As4wO0e4uz6PtVzakK7jaC89rUKKb_BiUwHpbh=7Q-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
  0 siblings, 1 reply; 12+ messages in thread
From: William Lupton @ 2022-02-10 13:23 UTC (permalink / raw)
  To: pandoc-discuss

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

If you simply want to ignore all raw HTML elements then I think that a lua
filter that ignores all RawInlines (perhaps only those with format="html")
will work for you. But if some HTML elements need to retain their HTML
meaning then more logic will be needed. For example, this document:

% cat raw.md
This is <b>bold</b> text.

gives this HTML:

% pandoc raw.md
<p>This is <b>bold</b> text.</p>

...but with this filter:

% cat raw.lua
function RawInline(raw)
  if (raw.format == 'html') then
    return {}
  end
end

...it gives this:

% pandoc raw.md -L raw.lua
<p>This is bold text.</p>





On Thu, 10 Feb 2022 at 12:49, mr vicky <v.lonly007-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote:

> so before convert to epub file i have to edit md file and find all tags
> and add these backticks ?
> there is no option in pandoc to ignore tags inside book ?
>
> On Thursday, February 10, 2022 at 5:37:27 PM UTC+5 Joost wrote:
>
>> On Thu, 10 Feb 2022, at 11:27, mr vicky wrote:
>> > hello
>> > i am converting md to epub file but that md file is programming book
>> > where is some codes written inside but when i convert it to epub then
>> > its auto detecting these tags and making very bad epub file with page
>> > breaks and some other kind of coding elements
>> [...]
>> > there is any option to ignore programming codes while converting to
>> epub file ?
>>
>> Note that Markdown allows you to include HTML elements, so whenever you
>> write e.g. <h1> directly, Pandoc assums that's what you're doing and will
>> put an <h1> tag in the html (or epub) output.
>>
>> You'll want to mark the tags as code, which you can do with backticks:
>> `<h1>`.
>>
>> HTH
>>
>> --
>> Joost Kremers
>> Life has its moments
>>
> --
> 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/3806ef68-3553-4e8e-8b04-bf7cc4226e7cn%40googlegroups.com
> <https://groups.google.com/d/msgid/pandoc-discuss/3806ef68-3553-4e8e-8b04-bf7cc4226e7cn%40googlegroups.com?utm_medium=email&utm_source=footer>
> .
>

-- 
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/CAEe_xxjC3As4wO0e4uz6PtVzakK7jaC89rUKKb_BiUwHpbh%3D7Q%40mail.gmail.com.

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

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

* Re: tagging codes detecting
       [not found]             ` <CAEe_xxjC3As4wO0e4uz6PtVzakK7jaC89rUKKb_BiUwHpbh=7Q-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
@ 2022-02-10 20:06               ` BPJ
       [not found]                 ` <CADAJKhDhA7kP2JfM9tXDc=pmmjP7BA5dGgnVE2T=2b1dmF3MFw-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
  0 siblings, 1 reply; 12+ messages in thread
From: BPJ @ 2022-02-10 20:06 UTC (permalink / raw)
  To: pandoc-discuss

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

This filter will convert all raw HTML to code in backticks, with syntax
highlighting. Save it as raw2code.lua and include --lua-filter=raw2code.lua
on the pandoc command line.

local code_for = {
  RawInline = pandoc.Code,
  RawBlock = pandoc.CodeBlock
}
local function raw2code (elem)
  if 'html' == elem.format then
    return code_for[elem.tag](elem.text, { class = 'html' })
  end
  return nil
end
return {
  {
    RawInline = raw2code,
    RawBlock = raw2code
  }
}






Den tors 10 feb. 2022 14:24William Lupton <wlupton-QSt+ys/nuMyEUIsrzH9SikB+6BGkLq7r@public.gmane.org>
skrev:

> If you simply want to ignore all raw HTML elements then I think that a lua
> filter that ignores all RawInlines (perhaps only those with format="html")
> will work for you. But if some HTML elements need to retain their HTML
> meaning then more logic will be needed. For example, this document:
>
> % cat raw.md
> This is <b>bold</b> text.
>
> gives this HTML:
>
> % pandoc raw.md
> <p>This is <b>bold</b> text.</p>
>
> ...but with this filter:
>
> % cat raw.lua
> function RawInline(raw)
>   if (raw.format == 'html') then
>     return {}
>   end
> end
>
> ...it gives this:
>
> % pandoc raw.md -L raw.lua
> <p>This is bold text.</p>
>
>
>
>
>
> On Thu, 10 Feb 2022 at 12:49, mr vicky <v.lonly007-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote:
>
>> so before convert to epub file i have to edit md file and find all tags
>> and add these backticks ?
>> there is no option in pandoc to ignore tags inside book ?
>>
>> On Thursday, February 10, 2022 at 5:37:27 PM UTC+5 Joost wrote:
>>
>>> On Thu, 10 Feb 2022, at 11:27, mr vicky wrote:
>>> > hello
>>> > i am converting md to epub file but that md file is programming book
>>> > where is some codes written inside but when i convert it to epub then
>>> > its auto detecting these tags and making very bad epub file with page
>>> > breaks and some other kind of coding elements
>>> [...]
>>> > there is any option to ignore programming codes while converting to
>>> epub file ?
>>>
>>> Note that Markdown allows you to include HTML elements, so whenever you
>>> write e.g. <h1> directly, Pandoc assums that's what you're doing and will
>>> put an <h1> tag in the html (or epub) output.
>>>
>>> You'll want to mark the tags as code, which you can do with backticks:
>>> `<h1>`.
>>>
>>> HTH
>>>
>>> --
>>> Joost Kremers
>>> Life has its moments
>>>
>> --
>> 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/3806ef68-3553-4e8e-8b04-bf7cc4226e7cn%40googlegroups.com
>> <https://groups.google.com/d/msgid/pandoc-discuss/3806ef68-3553-4e8e-8b04-bf7cc4226e7cn%40googlegroups.com?utm_medium=email&utm_source=footer>
>> .
>>
> --
> 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/CAEe_xxjC3As4wO0e4uz6PtVzakK7jaC89rUKKb_BiUwHpbh%3D7Q%40mail.gmail.com
> <https://groups.google.com/d/msgid/pandoc-discuss/CAEe_xxjC3As4wO0e4uz6PtVzakK7jaC89rUKKb_BiUwHpbh%3D7Q%40mail.gmail.com?utm_medium=email&utm_source=footer>
> .
>

-- 
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/CADAJKhDhA7kP2JfM9tXDc%3DpmmjP7BA5dGgnVE2T%3D2b1dmF3MFw%40mail.gmail.com.

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

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

* Re: tagging codes detecting
       [not found]                 ` <CADAJKhDhA7kP2JfM9tXDc=pmmjP7BA5dGgnVE2T=2b1dmF3MFw-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
@ 2022-02-12  6:53                   ` mr vicky
       [not found]                     ` <ce37255c-e07f-4f47-958c-81069eb0b870n-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org>
  0 siblings, 1 reply; 12+ messages in thread
From: mr vicky @ 2022-02-12  6:53 UTC (permalink / raw)
  To: pandoc-discuss


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

@BP
i am getting this error but its giving only in this book not in other book 
evan i am using your raw2code.lua file in my command and its working fine 
in other book but in this book still getting some tags error
here you can check

 pandoc -o Functional_Programming_in_C__Second_Edition.epub 
Functional_Programming_in_C__Second_Edition.md --lua-filter=raw2code.lua
[WARNING] Could not convert TeX math "Entering {op}");       T t = f(); 
      log.LogTrace(, rendering as TeX:
  "Entering {op}");       T t = f();      
  ^
  unexpected '"'
  expecting "%", "\\label", "\\tag", "\\nonumber", whitespace, "\\bangle", 
"\\brace", "\\brack", "\\choose", "\\displaystyle", "\\textstyle", 
"\\scriptstyle", "\\scriptscriptstyle", "{", "\\operatorname", letter, 
digit, ".", "!", "'", "''", "'''", "''''", "*", "+", ",", "-", ".", "/", 
":", ":=", ";", "<", "=", ">", "?", "@", "~", "_", "^", "\\left", "\\", 
"\\hyperref" or end of input
[WARNING] Could not convert TeX math "{s} should be lower case"); 
Validator<string> ShouldBeOfLength(int n)   => s => (s.Length == n)     
  ? Valid(s)       : Error(, rendering as TeX:
  "{s} should be lower case"); Validator<s
  ^
  unexpected '"'
  expecting "%", "\\label", "\\tag", "\\nonumber", whitespace, "\\bangle", 
"\\brace", "\\brack", "\\choose", "\\displaystyle", "\\textstyle", 
"\\scriptstyle", "\\scriptscriptstyle", "{", "\\operatorname", letter, 
digit, ".", "!", "'", "''", "'''", "''''", "*", "+", ",", "-", ".", "/", 
":", ":=", ";", "<", "=", ">", "?", "@", "~", "_", "^", "\\left", "\\", 
"\\hyperref" or end of input
[WARNING] Could not convert TeX math "{name} -> {t}"),       onError: ex 
=> WriteLine(, rendering as TeX:
  "{name} -> {t}"),       onError: ex => W
  ^
  unexpected '"'
  expecting "%", "\\label", "\\tag", "\\nonumber", whitespace, "\\bangle", 
"\\brace", "\\brack", "\\choose", "\\displaystyle", "\\textstyle", 
"\\scriptstyle", "\\scriptscriptstyle", "{", "\\operatorname", letter, 
digit, ".", "!", "'", "''", "'''", "''''", "*", "+", ",", "-", ".", "/", 
":", ":=", ";", "<", "=", ">", "?", "@", "~", "_", "^", "\\left", "\\", 
"\\hyperref" or end of input
[WARNING] Could not convert TeX math "Received '{msg}'; Sending 'PING'"); 
  Task.Delay(500).Wait();   pong.Tell("PING"); }); pong = Agent.Start(0, 
(int count, string msg) => {   int newCount = count + 1;   string nextMsg 
= (newCount < 5) ? "PONG" : "STOP";   logger.Tell(, rendering as TeX:
  "Received '{msg}'; Sending 'PING'");   T
  ^
  unexpected '"'
  expecting "%", "\\label", "\\tag", "\\nonumber", whitespace, "\\bangle", 
"\\brace", "\\brack", "\\choose", "\\displaystyle", "\\textstyle", 
"\\scriptstyle", "\\scriptscriptstyle", "{", "\\operatorname", letter, 
digit, ".", "!", "'", "''", "'''", "''''", "*", "+", ",", "-", ".", "/", 
":", ":=", ";", "<", "=", ">", "?", "@", "~", "_", "^", "\\left", "\\", 
"\\hyperref" or end of input
[WARNING] This document format requires a nonempty <title> element.
  Defaulting to 'Functional_Programming_in_C__Second_Edition' as the title.
  To specify a title, use 'title' in metadata or --metadata title="...".
PS C:\Users\Hp\Downloads\Compressed

On Friday, February 11, 2022 at 1:06:13 AM UTC+5 BP wrote:

> This filter will convert all raw HTML to code in backticks, with syntax 
> highlighting. Save it as raw2code.lua and include --lua-filter=raw2code.lua 
> on the pandoc command line.
>
> local code_for = {
>   RawInline = pandoc.Code,
>   RawBlock = pandoc.CodeBlock
> }
> local function raw2code (elem)
>   if 'html' == elem.format then
>     return code_for[elem.tag](elem.text, { class = 'html' })
>   end
>   return nil
> end
> return {
>   {
>     RawInline = raw2code,
>     RawBlock = raw2code
>   }
> }
>
>
>
>
>
>
> Den tors 10 feb. 2022 14:24William Lupton <wlu...-QSt+ys/nuMyEUIsrzH9SikB+6BGkLq7r@public.gmane.org> 
> skrev:
>
>> If you simply want to ignore all raw HTML elements then I think that a 
>> lua filter that ignores all RawInlines (perhaps only those with 
>> format="html") will work for you. But if some HTML elements need to retain 
>> their HTML meaning then more logic will be needed. For example, this 
>> document:
>>
>> % cat raw.md
>> This is <b>bold</b> text.
>>
>> gives this HTML:
>>
>> % pandoc raw.md 
>> <p>This is <b>bold</b> text.</p>
>>
>> ...but with this filter:
>>
>> % cat raw.lua 
>> function RawInline(raw)
>>   if (raw.format == 'html') then
>>     return {}
>>   end
>> end
>>
>> ...it gives this:
>>
>> % pandoc raw.md -L raw.lua
>> <p>This is bold text.</p>
>>
>>
>>
>>
>>
>> On Thu, 10 Feb 2022 at 12:49, mr vicky <v.lon...-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote:
>>
>>> so before convert to epub file i have to edit md file and find all tags 
>>> and add these backticks ? 
>>> there is no option in pandoc to ignore tags inside book ?
>>>
>>> On Thursday, February 10, 2022 at 5:37:27 PM UTC+5 Joost wrote:
>>>
>>>> On Thu, 10 Feb 2022, at 11:27, mr vicky wrote: 
>>>> > hello 
>>>> > i am converting md to epub file but that md file is programming book 
>>>> > where is some codes written inside but when i convert it to epub then 
>>>> > its auto detecting these tags and making very bad epub file with page 
>>>> > breaks and some other kind of coding elements 
>>>> [...] 
>>>> > there is any option to ignore programming codes while converting to 
>>>> epub file ? 
>>>>
>>>> Note that Markdown allows you to include HTML elements, so whenever you 
>>>> write e.g. <h1> directly, Pandoc assums that's what you're doing and will 
>>>> put an <h1> tag in the html (or epub) output. 
>>>>
>>>> You'll want to mark the tags as code, which you can do with backticks: 
>>>> `<h1>`. 
>>>>
>>>> HTH 
>>>>
>>>> -- 
>>>> Joost Kremers 
>>>> Life has its moments 
>>>>
>>> -- 
>>> 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/3806ef68-3553-4e8e-8b04-bf7cc4226e7cn%40googlegroups.com 
>>> <https://groups.google.com/d/msgid/pandoc-discuss/3806ef68-3553-4e8e-8b04-bf7cc4226e7cn%40googlegroups.com?utm_medium=email&utm_source=footer>
>>> .
>>>
>> -- 
>> 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/CAEe_xxjC3As4wO0e4uz6PtVzakK7jaC89rUKKb_BiUwHpbh%3D7Q%40mail.gmail.com 
>> <https://groups.google.com/d/msgid/pandoc-discuss/CAEe_xxjC3As4wO0e4uz6PtVzakK7jaC89rUKKb_BiUwHpbh%3D7Q%40mail.gmail.com?utm_medium=email&utm_source=footer>
>> .
>>
>

-- 
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/ce37255c-e07f-4f47-958c-81069eb0b870n%40googlegroups.com.

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

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

* Re: tagging codes detecting
       [not found]                     ` <ce37255c-e07f-4f47-958c-81069eb0b870n-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org>
@ 2022-02-12 10:27                       ` BPJ
       [not found]                         ` <CADAJKhAPXai=vE-4iUYd6eWa01+PXcc7er7aPuE-szhziJzkqQ-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
  0 siblings, 1 reply; 12+ messages in thread
From: BPJ @ 2022-02-12 10:27 UTC (permalink / raw)
  To: pandoc-discuss

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

This is probably because Pandoc expects text between dollar signs `$...$`
and
`$$...$$` to be TeX math and fails to interpret some text which ended up
between two dollar signs as such.

<https://pandoc.org/MANUAL.html#extension-tex_math_dollars>

Alternatively it may be that pandoc expects text between backslash escaped
parentheses `\(...\)`/`\\(...\\)` or square brackets `\[...\]`/`\\[...\']`
to be
TeX math, but I believe those extensions are not enabled by default.

<https://pandoc.org/MANUAL.html#extension-tex_math_single_backslash>

<https://pandoc.org/MANUAL.html#extension-tex_math_double_backslash>

In this case the solution, unless you intended to include TeX math somewhere
in your document, is to disable those extensions by including

    -f
markdown-tex_math_dollars-tex_math_single_backslash-tex_math_double_backslash

in your pandoc command line, or modifying any existing --from, -f,
--read or -r option accordingly.

Yet another alternative may be that you have TeX code in your document which
needs to be marked as code. For that a slightly modified filter provides a
solution:

local format2class = {
  html = 'html',
  tex = 'latex',
  latex = 'latex'
}
local code_for = {
  RawInline = pandoc.Code,
  RawBlock = pandoc.CodeBlock
}
local function raw2code (elem)
  local class = format2class[elem.format]
  if class then
    return code_for[elem.tag](elem.text, { class = class })
  end
  return nil
end
return {
  {
    RawInline = raw2code,
    RawBlock = raw2code
  }
}


Den lör 12 feb. 2022 07:54mr vicky <v.lonly007-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> skrev:

> @BP
> i am getting this error but its giving only in this book not in other book
> evan i am using your raw2code.lua file in my command and its working fine
> in other book but in this book still getting some tags error
> here you can check
>
>  pandoc -o Functional_Programming_in_C__Second_Edition.epub
> Functional_Programming_in_C__Second_Edition.md --lua-filter=raw2code.lua
> [WARNING] Could not convert TeX math "Entering {op}");       T t = f();
>       log.LogTrace(, rendering as TeX:
>   "Entering {op}");       T t = f();      
>   ^
>   unexpected '"'
>   expecting "%", "\\label", "\\tag", "\\nonumber", whitespace, "\\bangle",
> "\\brace", "\\brack", "\\choose", "\\displaystyle", "\\textstyle",
> "\\scriptstyle", "\\scriptscriptstyle", "{", "\\operatorname", letter,
> digit, ".", "!", "'", "''", "'''", "''''", "*", "+", ",", "-", ".", "/",
> ":", ":=", ";", "<", "=", ">", "?", "@", "~", "_", "^", "\\left", "\\",
> "\\hyperref" or end of input
> [WARNING] Could not convert TeX math "{s} should be lower case");
> Validator<string> ShouldBeOfLength(int n)   => s => (s.Length == n)    
>   ? Valid(s)       : Error(, rendering as TeX:
>   "{s} should be lower case"); Validator<s
>   ^
>   unexpected '"'
>   expecting "%", "\\label", "\\tag", "\\nonumber", whitespace, "\\bangle",
> "\\brace", "\\brack", "\\choose", "\\displaystyle", "\\textstyle",
> "\\scriptstyle", "\\scriptscriptstyle", "{", "\\operatorname", letter,
> digit, ".", "!", "'", "''", "'''", "''''", "*", "+", ",", "-", ".", "/",
> ":", ":=", ";", "<", "=", ">", "?", "@", "~", "_", "^", "\\left", "\\",
> "\\hyperref" or end of input
> [WARNING] Could not convert TeX math "{name} -> {t}"),       onError:
> ex => WriteLine(, rendering as TeX:
>   "{name} -> {t}"),       onError: ex => W
>   ^
>   unexpected '"'
>   expecting "%", "\\label", "\\tag", "\\nonumber", whitespace, "\\bangle",
> "\\brace", "\\brack", "\\choose", "\\displaystyle", "\\textstyle",
> "\\scriptstyle", "\\scriptscriptstyle", "{", "\\operatorname", letter,
> digit, ".", "!", "'", "''", "'''", "''''", "*", "+", ",", "-", ".", "/",
> ":", ":=", ";", "<", "=", ">", "?", "@", "~", "_", "^", "\\left", "\\",
> "\\hyperref" or end of input
> [WARNING] Could not convert TeX math "Received '{msg}'; Sending 'PING'");
>   Task.Delay(500).Wait();   pong.Tell("PING"); }); pong = Agent.Start(0,
> (int count, string msg) => {   int newCount = count + 1;   string nextMsg
> = (newCount < 5) ? "PONG" : "STOP";   logger.Tell(, rendering as TeX:
>   "Received '{msg}'; Sending 'PING'");   T
>   ^
>   unexpected '"'
>   expecting "%", "\\label", "\\tag", "\\nonumber", whitespace, "\\bangle",
> "\\brace", "\\brack", "\\choose", "\\displaystyle", "\\textstyle",
> "\\scriptstyle", "\\scriptscriptstyle", "{", "\\operatorname", letter,
> digit, ".", "!", "'", "''", "'''", "''''", "*", "+", ",", "-", ".", "/",
> ":", ":=", ";", "<", "=", ">", "?", "@", "~", "_", "^", "\\left", "\\",
> "\\hyperref" or end of input
> [WARNING] This document format requires a nonempty <title> element.
>   Defaulting to 'Functional_Programming_in_C__Second_Edition' as the title.
>   To specify a title, use 'title' in metadata or --metadata title="...".
> PS C:\Users\Hp\Downloads\Compressed
>
> On Friday, February 11, 2022 at 1:06:13 AM UTC+5 BP wrote:
>
>> This filter will convert all raw HTML to code in backticks, with syntax
>> highlighting. Save it as raw2code.lua and include --lua-filter=raw2code.lua
>> on the pandoc command line.
>>
>> local code_for = {
>>   RawInline = pandoc.Code,
>>   RawBlock = pandoc.CodeBlock
>> }
>> local function raw2code (elem)
>>   if 'html' == elem.format then
>>     return code_for[elem.tag](elem.text, { class = 'html' })
>>   end
>>   return nil
>> end
>> return {
>>   {
>>     RawInline = raw2code,
>>     RawBlock = raw2code
>>   }
>> }
>>
>>
>>
>>
>>
>>
>> Den tors 10 feb. 2022 14:24William Lupton <wlu...-QSt+ys/nuMyEUIsrzH9SikB+6BGkLq7r@public.gmane.org>
>> skrev:
>>
>>> If you simply want to ignore all raw HTML elements then I think that a
>>> lua filter that ignores all RawInlines (perhaps only those with
>>> format="html") will work for you. But if some HTML elements need to retain
>>> their HTML meaning then more logic will be needed. For example, this
>>> document:
>>>
>>> % cat raw.md
>>> This is <b>bold</b> text.
>>>
>>> gives this HTML:
>>>
>>> % pandoc raw.md
>>> <p>This is <b>bold</b> text.</p>
>>>
>>> ...but with this filter:
>>>
>>> % cat raw.lua
>>> function RawInline(raw)
>>>   if (raw.format == 'html') then
>>>     return {}
>>>   end
>>> end
>>>
>>> ...it gives this:
>>>
>>> % pandoc raw.md -L raw.lua
>>> <p>This is bold text.</p>
>>>
>>>
>>>
>>>
>>>
>>> On Thu, 10 Feb 2022 at 12:49, mr vicky <v.lon...-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote:
>>>
>>>> so before convert to epub file i have to edit md file and find all tags
>>>> and add these backticks ?
>>>> there is no option in pandoc to ignore tags inside book ?
>>>>
>>>> On Thursday, February 10, 2022 at 5:37:27 PM UTC+5 Joost wrote:
>>>>
>>>>> On Thu, 10 Feb 2022, at 11:27, mr vicky wrote:
>>>>> > hello
>>>>> > i am converting md to epub file but that md file is programming book
>>>>> > where is some codes written inside but when i convert it to epub
>>>>> then
>>>>> > its auto detecting these tags and making very bad epub file with
>>>>> page
>>>>> > breaks and some other kind of coding elements
>>>>> [...]
>>>>> > there is any option to ignore programming codes while converting to
>>>>> epub file ?
>>>>>
>>>>> Note that Markdown allows you to include HTML elements, so whenever
>>>>> you write e.g. <h1> directly, Pandoc assums that's what you're doing and
>>>>> will put an <h1> tag in the html (or epub) output.
>>>>>
>>>>> You'll want to mark the tags as code, which you can do with backticks:
>>>>> `<h1>`.
>>>>>
>>>>> HTH
>>>>>
>>>>> --
>>>>> Joost Kremers
>>>>> Life has its moments
>>>>>
>>>> --
>>>> 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/3806ef68-3553-4e8e-8b04-bf7cc4226e7cn%40googlegroups.com
>>>> <https://groups.google.com/d/msgid/pandoc-discuss/3806ef68-3553-4e8e-8b04-bf7cc4226e7cn%40googlegroups.com?utm_medium=email&utm_source=footer>
>>>> .
>>>>
>>> --
>>> 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/CAEe_xxjC3As4wO0e4uz6PtVzakK7jaC89rUKKb_BiUwHpbh%3D7Q%40mail.gmail.com
>>> <https://groups.google.com/d/msgid/pandoc-discuss/CAEe_xxjC3As4wO0e4uz6PtVzakK7jaC89rUKKb_BiUwHpbh%3D7Q%40mail.gmail.com?utm_medium=email&utm_source=footer>
>>> .
>>>
>> --
> 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/ce37255c-e07f-4f47-958c-81069eb0b870n%40googlegroups.com
> <https://groups.google.com/d/msgid/pandoc-discuss/ce37255c-e07f-4f47-958c-81069eb0b870n%40googlegroups.com?utm_medium=email&utm_source=footer>
> .
>

-- 
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/CADAJKhAPXai%3DvE-4iUYd6eWa01%2BPXcc7er7aPuE-szhziJzkqQ%40mail.gmail.com.

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

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

* Re: tagging codes detecting
       [not found]                         ` <CADAJKhAPXai=vE-4iUYd6eWa01+PXcc7er7aPuE-szhziJzkqQ-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
@ 2022-02-12 11:08                           ` mr vicky
       [not found]                             ` <2c88932a-2358-4cbb-af16-aa6a4dc025c3n-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org>
  0 siblings, 1 reply; 12+ messages in thread
From: mr vicky @ 2022-02-12 11:08 UTC (permalink / raw)
  To: pandoc-discuss


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

@BP
so i have to create .lua file with this code and point out lua file in 
command line ?
by the way i used --webtex in command and its convert epub without any 
error but i dont know for what purpose pandoc using --webtex command
may be it is ignoring those type characters or may be i am wrong about that

On Saturday, February 12, 2022 at 3:27:48 PM UTC+5 BP wrote:

> This is probably because Pandoc expects text between dollar signs `$...$` 
> and
> `$$...$$` to be TeX math and fails to interpret some text which ended up
> between two dollar signs as such.
>
> <https://pandoc.org/MANUAL.html#extension-tex_math_dollars>
>
> Alternatively it may be that pandoc expects text between backslash escaped
> parentheses `\(...\)`/`\\(...\\)` or square brackets `\[...\]`/`\\[...\']` 
> to be
> TeX math, but I believe those extensions are not enabled by default.
>
> <https://pandoc.org/MANUAL.html#extension-tex_math_single_backslash>
>
> <https://pandoc.org/MANUAL.html#extension-tex_math_double_backslash>
>
> In this case the solution, unless you intended to include TeX math 
> somewhere
> in your document, is to disable those extensions by including
>
>     -f 
> markdown-tex_math_dollars-tex_math_single_backslash-tex_math_double_backslash
>     
> in your pandoc command line, or modifying any existing --from, -f,
> --read or -r option accordingly.
>
> Yet another alternative may be that you have TeX code in your document 
> which
> needs to be marked as code. For that a slightly modified filter provides a
> solution:
>
> local format2class = {
>   html = 'html',
>   tex = 'latex',
>   latex = 'latex'
> }
> local code_for = {
>   RawInline = pandoc.Code,
>   RawBlock = pandoc.CodeBlock
> }
> local function raw2code (elem)
>   local class = format2class[elem.format]
>   if class then
>     return code_for[elem.tag](elem.text, { class = class })
>   end
>   return nil
> end
> return {
>   {
>     RawInline = raw2code,
>     RawBlock = raw2code
>   }
> }
>
> Den lör 12 feb. 2022 07:54mr vicky <v.lon...-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> skrev:
>
>> @BP
>> i am getting this error but its giving only in this book not in other 
>> book evan i am using your raw2code.lua file in my command and its working 
>> fine in other book but in this book still getting some tags error
>> here you can check
>>
>>  pandoc -o Functional_Programming_in_C__Second_Edition.epub 
>> Functional_Programming_in_C__Second_Edition.md --lua-filter=raw2code.lua
>> [WARNING] Could not convert TeX math "Entering {op}");       T t = 
>> f();       log.LogTrace(, rendering as TeX:
>>   "Entering {op}");       T t = f();      
>>   ^
>>   unexpected '"'
>>   expecting "%", "\\label", "\\tag", "\\nonumber", whitespace, 
>> "\\bangle", "\\brace", "\\brack", "\\choose", "\\displaystyle", 
>> "\\textstyle", "\\scriptstyle", "\\scriptscriptstyle", "{", 
>> "\\operatorname", letter, digit, ".", "!", "'", "''", "'''", "''''", "*", 
>> "+", ",", "-", ".", "/", ":", ":=", ";", "<", "=", ">", "?", "@", "~", "_", 
>> "^", "\\left", "\\", "\\hyperref" or end of input
>> [WARNING] Could not convert TeX math "{s} should be lower case"); 
>> Validator<string> ShouldBeOfLength(int n)   => s => (s.Length == n)     
>>   ? Valid(s)       : Error(, rendering as TeX:
>>   "{s} should be lower case"); Validator<s
>>   ^
>>   unexpected '"'
>>   expecting "%", "\\label", "\\tag", "\\nonumber", whitespace, 
>> "\\bangle", "\\brace", "\\brack", "\\choose", "\\displaystyle", 
>> "\\textstyle", "\\scriptstyle", "\\scriptscriptstyle", "{", 
>> "\\operatorname", letter, digit, ".", "!", "'", "''", "'''", "''''", "*", 
>> "+", ",", "-", ".", "/", ":", ":=", ";", "<", "=", ">", "?", "@", "~", "_", 
>> "^", "\\left", "\\", "\\hyperref" or end of input
>> [WARNING] Could not convert TeX math "{name} -> {t}"),       onError: 
>> ex => WriteLine(, rendering as TeX:
>>   "{name} -> {t}"),       onError: ex => W
>>   ^
>>   unexpected '"'
>>   expecting "%", "\\label", "\\tag", "\\nonumber", whitespace, 
>> "\\bangle", "\\brace", "\\brack", "\\choose", "\\displaystyle", 
>> "\\textstyle", "\\scriptstyle", "\\scriptscriptstyle", "{", 
>> "\\operatorname", letter, digit, ".", "!", "'", "''", "'''", "''''", "*", 
>> "+", ",", "-", ".", "/", ":", ":=", ";", "<", "=", ">", "?", "@", "~", "_", 
>> "^", "\\left", "\\", "\\hyperref" or end of input
>> [WARNING] Could not convert TeX math "Received '{msg}'; Sending 'PING'"); 
>>   Task.Delay(500).Wait();   pong.Tell("PING"); }); pong = Agent.Start(0, 
>> (int count, string msg) => {   int newCount = count + 1;   string nextMsg 
>> = (newCount < 5) ? "PONG" : "STOP";   logger.Tell(, rendering as TeX:
>>   "Received '{msg}'; Sending 'PING'");   T
>>   ^
>>   unexpected '"'
>>   expecting "%", "\\label", "\\tag", "\\nonumber", whitespace, 
>> "\\bangle", "\\brace", "\\brack", "\\choose", "\\displaystyle", 
>> "\\textstyle", "\\scriptstyle", "\\scriptscriptstyle", "{", 
>> "\\operatorname", letter, digit, ".", "!", "'", "''", "'''", "''''", "*", 
>> "+", ",", "-", ".", "/", ":", ":=", ";", "<", "=", ">", "?", "@", "~", "_", 
>> "^", "\\left", "\\", "\\hyperref" or end of input
>> [WARNING] This document format requires a nonempty <title> element.
>>   Defaulting to 'Functional_Programming_in_C__Second_Edition' as the 
>> title.
>>   To specify a title, use 'title' in metadata or --metadata title="...".
>> PS C:\Users\Hp\Downloads\Compressed
>>
>> On Friday, February 11, 2022 at 1:06:13 AM UTC+5 BP wrote:
>>
>>> This filter will convert all raw HTML to code in backticks, with syntax 
>>> highlighting. Save it as raw2code.lua and include --lua-filter=raw2code.lua 
>>> on the pandoc command line.
>>>
>>> local code_for = {
>>>   RawInline = pandoc.Code,
>>>   RawBlock = pandoc.CodeBlock
>>> }
>>> local function raw2code (elem)
>>>   if 'html' == elem.format then
>>>     return code_for[elem.tag](elem.text, { class = 'html' })
>>>   end
>>>   return nil
>>> end
>>> return {
>>>   {
>>>     RawInline = raw2code,
>>>     RawBlock = raw2code
>>>   }
>>> }
>>>
>>>
>>>
>>>
>>>
>>>
>>> Den tors 10 feb. 2022 14:24William Lupton <wlu...-QSt+ys/nuMyEUIsrzH9SikB+6BGkLq7r@public.gmane.org> 
>>> skrev:
>>>
>>>> If you simply want to ignore all raw HTML elements then I think that a 
>>>> lua filter that ignores all RawInlines (perhaps only those with 
>>>> format="html") will work for you. But if some HTML elements need to retain 
>>>> their HTML meaning then more logic will be needed. For example, this 
>>>> document:
>>>>
>>>> % cat raw.md
>>>> This is <b>bold</b> text.
>>>>
>>>> gives this HTML:
>>>>
>>>> % pandoc raw.md 
>>>> <p>This is <b>bold</b> text.</p>
>>>>
>>>> ...but with this filter:
>>>>
>>>> % cat raw.lua 
>>>> function RawInline(raw)
>>>>   if (raw.format == 'html') then
>>>>     return {}
>>>>   end
>>>> end
>>>>
>>>> ...it gives this:
>>>>
>>>> % pandoc raw.md -L raw.lua
>>>> <p>This is bold text.</p>
>>>>
>>>>
>>>>
>>>>
>>>>
>>>> On Thu, 10 Feb 2022 at 12:49, mr vicky <v.lon...-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote:
>>>>
>>>>> so before convert to epub file i have to edit md file and find all 
>>>>> tags and add these backticks ? 
>>>>> there is no option in pandoc to ignore tags inside book ?
>>>>>
>>>>> On Thursday, February 10, 2022 at 5:37:27 PM UTC+5 Joost wrote:
>>>>>
>>>>>> On Thu, 10 Feb 2022, at 11:27, mr vicky wrote: 
>>>>>> > hello 
>>>>>> > i am converting md to epub file but that md file is programming 
>>>>>> book 
>>>>>> > where is some codes written inside but when i convert it to epub 
>>>>>> then 
>>>>>> > its auto detecting these tags and making very bad epub file with 
>>>>>> page 
>>>>>> > breaks and some other kind of coding elements 
>>>>>> [...] 
>>>>>> > there is any option to ignore programming codes while converting to 
>>>>>> epub file ? 
>>>>>>
>>>>>> Note that Markdown allows you to include HTML elements, so whenever 
>>>>>> you write e.g. <h1> directly, Pandoc assums that's what you're doing and 
>>>>>> will put an <h1> tag in the html (or epub) output. 
>>>>>>
>>>>>> You'll want to mark the tags as code, which you can do with 
>>>>>> backticks: `<h1>`. 
>>>>>>
>>>>>> HTH 
>>>>>>
>>>>>> -- 
>>>>>> Joost Kremers 
>>>>>> Life has its moments 
>>>>>>
>>>>> -- 
>>>>> 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/3806ef68-3553-4e8e-8b04-bf7cc4226e7cn%40googlegroups.com 
>>>>> <https://groups.google.com/d/msgid/pandoc-discuss/3806ef68-3553-4e8e-8b04-bf7cc4226e7cn%40googlegroups.com?utm_medium=email&utm_source=footer>
>>>>> .
>>>>>
>>>> -- 
>>>> 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/CAEe_xxjC3As4wO0e4uz6PtVzakK7jaC89rUKKb_BiUwHpbh%3D7Q%40mail.gmail.com 
>>>> <https://groups.google.com/d/msgid/pandoc-discuss/CAEe_xxjC3As4wO0e4uz6PtVzakK7jaC89rUKKb_BiUwHpbh%3D7Q%40mail.gmail.com?utm_medium=email&utm_source=footer>
>>>> .
>>>>
>>> -- 
>> 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/ce37255c-e07f-4f47-958c-81069eb0b870n%40googlegroups.com 
>> <https://groups.google.com/d/msgid/pandoc-discuss/ce37255c-e07f-4f47-958c-81069eb0b870n%40googlegroups.com?utm_medium=email&utm_source=footer>
>> .
>>
>

-- 
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/2c88932a-2358-4cbb-af16-aa6a4dc025c3n%40googlegroups.com.

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

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

* Re: tagging codes detecting
       [not found]                             ` <2c88932a-2358-4cbb-af16-aa6a4dc025c3n-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org>
@ 2022-02-12 11:48                               ` BPJ
       [not found]                                 ` <CADAJKhB-n2j6NC2Ysu8bbw6464PNnyXhDqCmu8GTqz1yr0gkUg-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
  0 siblings, 1 reply; 12+ messages in thread
From: BPJ @ 2022-02-12 11:48 UTC (permalink / raw)
  To: pandoc-discuss

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

So you are using TeX math? I'm not sure what is going on. Maybe if you post
a minimal working example someone knows.

Den lör 12 feb. 2022 12:09mr vicky <v.lonly007-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> skrev:

> @BP
> so i have to create .lua file with this code and point out lua file in
> command line ?
> by the way i used --webtex in command and its convert epub without any
> error but i dont know for what purpose pandoc using --webtex command
> may be it is ignoring those type characters or may be i am wrong about that
>
> On Saturday, February 12, 2022 at 3:27:48 PM UTC+5 BP wrote:
>
>> This is probably because Pandoc expects text between dollar signs `$...$`
>> and
>> `$$...$$` to be TeX math and fails to interpret some text which ended up
>> between two dollar signs as such.
>>
>> <https://pandoc.org/MANUAL.html#extension-tex_math_dollars>
>>
>> Alternatively it may be that pandoc expects text between backslash escaped
>> parentheses `\(...\)`/`\\(...\\)` or square brackets
>> `\[...\]`/`\\[...\']` to be
>> TeX math, but I believe those extensions are not enabled by default.
>>
>> <https://pandoc.org/MANUAL.html#extension-tex_math_single_backslash>
>>
>> <https://pandoc.org/MANUAL.html#extension-tex_math_double_backslash>
>>
>> In this case the solution, unless you intended to include TeX math
>> somewhere
>> in your document, is to disable those extensions by including
>>
>>     -f
>> markdown-tex_math_dollars-tex_math_single_backslash-tex_math_double_backslash
>>
>> in your pandoc command line, or modifying any existing --from, -f,
>> --read or -r option accordingly.
>>
>> Yet another alternative may be that you have TeX code in your document
>> which
>> needs to be marked as code. For that a slightly modified filter provides a
>> solution:
>>
>> local format2class = {
>>   html = 'html',
>>   tex = 'latex',
>>   latex = 'latex'
>> }
>> local code_for = {
>>   RawInline = pandoc.Code,
>>   RawBlock = pandoc.CodeBlock
>> }
>> local function raw2code (elem)
>>   local class = format2class[elem.format]
>>   if class then
>>     return code_for[elem.tag](elem.text, { class = class })
>>   end
>>   return nil
>> end
>> return {
>>   {
>>     RawInline = raw2code,
>>     RawBlock = raw2code
>>   }
>> }
>>
>> Den lör 12 feb. 2022 07:54mr vicky <v.lon...-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> skrev:
>>
>>> @BP
>>> i am getting this error but its giving only in this book not in other
>>> book evan i am using your raw2code.lua file in my command and its working
>>> fine in other book but in this book still getting some tags error
>>> here you can check
>>>
>>>  pandoc -o Functional_Programming_in_C__Second_Edition.epub
>>> Functional_Programming_in_C__Second_Edition.md --lua-filter=raw2code.lua
>>> [WARNING] Could not convert TeX math "Entering {op}");       T t =
>>> f();       log.LogTrace(, rendering as TeX:
>>>   "Entering {op}");       T t = f();      
>>>   ^
>>>   unexpected '"'
>>>   expecting "%", "\\label", "\\tag", "\\nonumber", whitespace,
>>> "\\bangle", "\\brace", "\\brack", "\\choose", "\\displaystyle",
>>> "\\textstyle", "\\scriptstyle", "\\scriptscriptstyle", "{",
>>> "\\operatorname", letter, digit, ".", "!", "'", "''", "'''", "''''", "*",
>>> "+", ",", "-", ".", "/", ":", ":=", ";", "<", "=", ">", "?", "@", "~", "_",
>>> "^", "\\left", "\\", "\\hyperref" or end of input
>>> [WARNING] Could not convert TeX math "{s} should be lower case");
>>> Validator<string> ShouldBeOfLength(int n)   => s => (s.Length == n)    
>>>   ? Valid(s)       : Error(, rendering as TeX:
>>>   "{s} should be lower case"); Validator<s
>>>   ^
>>>   unexpected '"'
>>>   expecting "%", "\\label", "\\tag", "\\nonumber", whitespace,
>>> "\\bangle", "\\brace", "\\brack", "\\choose", "\\displaystyle",
>>> "\\textstyle", "\\scriptstyle", "\\scriptscriptstyle", "{",
>>> "\\operatorname", letter, digit, ".", "!", "'", "''", "'''", "''''", "*",
>>> "+", ",", "-", ".", "/", ":", ":=", ";", "<", "=", ">", "?", "@", "~", "_",
>>> "^", "\\left", "\\", "\\hyperref" or end of input
>>> [WARNING] Could not convert TeX math "{name} -> {t}"),       onError:
>>> ex => WriteLine(, rendering as TeX:
>>>   "{name} -> {t}"),       onError: ex => W
>>>   ^
>>>   unexpected '"'
>>>   expecting "%", "\\label", "\\tag", "\\nonumber", whitespace,
>>> "\\bangle", "\\brace", "\\brack", "\\choose", "\\displaystyle",
>>> "\\textstyle", "\\scriptstyle", "\\scriptscriptstyle", "{",
>>> "\\operatorname", letter, digit, ".", "!", "'", "''", "'''", "''''", "*",
>>> "+", ",", "-", ".", "/", ":", ":=", ";", "<", "=", ">", "?", "@", "~", "_",
>>> "^", "\\left", "\\", "\\hyperref" or end of input
>>> [WARNING] Could not convert TeX math "Received '{msg}'; Sending
>>> 'PING'");   Task.Delay(500).Wait();   pong.Tell("PING"); }); pong =
>>> Agent.Start(0, (int count, string msg) => {   int newCount = count + 1;  
>>> string nextMsg = (newCount < 5) ? "PONG" : "STOP";   logger.Tell(,
>>> rendering as TeX:
>>>   "Received '{msg}'; Sending 'PING'");   T
>>>   ^
>>>   unexpected '"'
>>>   expecting "%", "\\label", "\\tag", "\\nonumber", whitespace,
>>> "\\bangle", "\\brace", "\\brack", "\\choose", "\\displaystyle",
>>> "\\textstyle", "\\scriptstyle", "\\scriptscriptstyle", "{",
>>> "\\operatorname", letter, digit, ".", "!", "'", "''", "'''", "''''", "*",
>>> "+", ",", "-", ".", "/", ":", ":=", ";", "<", "=", ">", "?", "@", "~", "_",
>>> "^", "\\left", "\\", "\\hyperref" or end of input
>>> [WARNING] This document format requires a nonempty <title> element.
>>>   Defaulting to 'Functional_Programming_in_C__Second_Edition' as the
>>> title.
>>>   To specify a title, use 'title' in metadata or --metadata title="...".
>>> PS C:\Users\Hp\Downloads\Compressed
>>>
>>> On Friday, February 11, 2022 at 1:06:13 AM UTC+5 BP wrote:
>>>
>>>> This filter will convert all raw HTML to code in backticks, with syntax
>>>> highlighting. Save it as raw2code.lua and include --lua-filter=raw2code.lua
>>>> on the pandoc command line.
>>>>
>>>> local code_for = {
>>>>   RawInline = pandoc.Code,
>>>>   RawBlock = pandoc.CodeBlock
>>>> }
>>>> local function raw2code (elem)
>>>>   if 'html' == elem.format then
>>>>     return code_for[elem.tag](elem.text, { class = 'html' })
>>>>   end
>>>>   return nil
>>>> end
>>>> return {
>>>>   {
>>>>     RawInline = raw2code,
>>>>     RawBlock = raw2code
>>>>   }
>>>> }
>>>>
>>>>
>>>>
>>>>
>>>>
>>>>
>>>> Den tors 10 feb. 2022 14:24William Lupton <wlu...-QSt+ys/nuMyEUIsrzH9SikB+6BGkLq7r@public.gmane.org>
>>>> skrev:
>>>>
>>>>> If you simply want to ignore all raw HTML elements then I think that a
>>>>> lua filter that ignores all RawInlines (perhaps only those with
>>>>> format="html") will work for you. But if some HTML elements need to retain
>>>>> their HTML meaning then more logic will be needed. For example, this
>>>>> document:
>>>>>
>>>>> % cat raw.md
>>>>> This is <b>bold</b> text.
>>>>>
>>>>> gives this HTML:
>>>>>
>>>>> % pandoc raw.md
>>>>> <p>This is <b>bold</b> text.</p>
>>>>>
>>>>> ...but with this filter:
>>>>>
>>>>> % cat raw.lua
>>>>> function RawInline(raw)
>>>>>   if (raw.format == 'html') then
>>>>>     return {}
>>>>>   end
>>>>> end
>>>>>
>>>>> ...it gives this:
>>>>>
>>>>> % pandoc raw.md -L raw.lua
>>>>> <p>This is bold text.</p>
>>>>>
>>>>>
>>>>>
>>>>>
>>>>>
>>>>> On Thu, 10 Feb 2022 at 12:49, mr vicky <v.lon...-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote:
>>>>>
>>>>>> so before convert to epub file i have to edit md file and find all
>>>>>> tags and add these backticks ?
>>>>>> there is no option in pandoc to ignore tags inside book ?
>>>>>>
>>>>>> On Thursday, February 10, 2022 at 5:37:27 PM UTC+5 Joost wrote:
>>>>>>
>>>>>>> On Thu, 10 Feb 2022, at 11:27, mr vicky wrote:
>>>>>>> > hello
>>>>>>> > i am converting md to epub file but that md file is programming
>>>>>>> book
>>>>>>> > where is some codes written inside but when i convert it to epub
>>>>>>> then
>>>>>>> > its auto detecting these tags and making very bad epub file with
>>>>>>> page
>>>>>>> > breaks and some other kind of coding elements
>>>>>>> [...]
>>>>>>> > there is any option to ignore programming codes while converting
>>>>>>> to epub file ?
>>>>>>>
>>>>>>> Note that Markdown allows you to include HTML elements, so whenever
>>>>>>> you write e.g. <h1> directly, Pandoc assums that's what you're doing and
>>>>>>> will put an <h1> tag in the html (or epub) output.
>>>>>>>
>>>>>>> You'll want to mark the tags as code, which you can do with
>>>>>>> backticks: `<h1>`.
>>>>>>>
>>>>>>> HTH
>>>>>>>
>>>>>>> --
>>>>>>> Joost Kremers
>>>>>>> Life has its moments
>>>>>>>
>>>>>> --
>>>>>> 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/3806ef68-3553-4e8e-8b04-bf7cc4226e7cn%40googlegroups.com
>>>>>> <https://groups.google.com/d/msgid/pandoc-discuss/3806ef68-3553-4e8e-8b04-bf7cc4226e7cn%40googlegroups.com?utm_medium=email&utm_source=footer>
>>>>>> .
>>>>>>
>>>>> --
>>>>> 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/CAEe_xxjC3As4wO0e4uz6PtVzakK7jaC89rUKKb_BiUwHpbh%3D7Q%40mail.gmail.com
>>>>> <https://groups.google.com/d/msgid/pandoc-discuss/CAEe_xxjC3As4wO0e4uz6PtVzakK7jaC89rUKKb_BiUwHpbh%3D7Q%40mail.gmail.com?utm_medium=email&utm_source=footer>
>>>>> .
>>>>>
>>>> --
>>> 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/ce37255c-e07f-4f47-958c-81069eb0b870n%40googlegroups.com
>>> <https://groups.google.com/d/msgid/pandoc-discuss/ce37255c-e07f-4f47-958c-81069eb0b870n%40googlegroups.com?utm_medium=email&utm_source=footer>
>>> .
>>>
>> --
> 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/2c88932a-2358-4cbb-af16-aa6a4dc025c3n%40googlegroups.com
> <https://groups.google.com/d/msgid/pandoc-discuss/2c88932a-2358-4cbb-af16-aa6a4dc025c3n%40googlegroups.com?utm_medium=email&utm_source=footer>
> .
>

-- 
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/CADAJKhB-n2j6NC2Ysu8bbw6464PNnyXhDqCmu8GTqz1yr0gkUg%40mail.gmail.com.

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

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

* Re: tagging codes detecting
       [not found]                                 ` <CADAJKhB-n2j6NC2Ysu8bbw6464PNnyXhDqCmu8GTqz1yr0gkUg-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
@ 2022-02-12 12:52                                   ` mr vicky
       [not found]                                     ` <6d897324-3d5d-426a-93a3-80140989c6acn-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org>
  0 siblings, 1 reply; 12+ messages in thread
From: mr vicky @ 2022-02-12 12:52 UTC (permalink / raw)
  To: pandoc-discuss


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


@BP
i tried with your method and save your given code as lua file and point out 
that file in command line but its giving me this error

Error running filter raw2code2.lua:
raw2code2.lua:13: 'end' expected (to close 'if' at line 12) near <eof>
PS C:\Users\Hp\Downloads\Compressed>
On Saturday, February 12, 2022 at 4:49:00 PM UTC+5 BP wrote:

> So you are using TeX math? I'm not sure what is going on. Maybe if you 
> post a minimal working example someone knows.
>
> Den lör 12 feb. 2022 12:09mr vicky <v.lon...-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> skrev:
>
>> @BP
>> so i have to create .lua file with this code and point out lua file in 
>> command line ?
>> by the way i used --webtex in command and its convert epub without any 
>> error but i dont know for what purpose pandoc using --webtex command
>> may be it is ignoring those type characters or may be i am wrong about 
>> that
>>
>> On Saturday, February 12, 2022 at 3:27:48 PM UTC+5 BP wrote:
>>
>>> This is probably because Pandoc expects text between dollar signs 
>>> `$...$` and
>>> `$$...$$` to be TeX math and fails to interpret some text which ended up
>>> between two dollar signs as such.
>>>
>>> <https://pandoc.org/MANUAL.html#extension-tex_math_dollars>
>>>
>>> Alternatively it may be that pandoc expects text between backslash 
>>> escaped
>>> parentheses `\(...\)`/`\\(...\\)` or square brackets 
>>> `\[...\]`/`\\[...\']` to be
>>> TeX math, but I believe those extensions are not enabled by default.
>>>
>>> <https://pandoc.org/MANUAL.html#extension-tex_math_single_backslash>
>>>
>>> <https://pandoc.org/MANUAL.html#extension-tex_math_double_backslash>
>>>
>>> In this case the solution, unless you intended to include TeX math 
>>> somewhere
>>> in your document, is to disable those extensions by including
>>>
>>>     -f 
>>> markdown-tex_math_dollars-tex_math_single_backslash-tex_math_double_backslash
>>>     
>>> in your pandoc command line, or modifying any existing --from, -f,
>>> --read or -r option accordingly.
>>>
>>> Yet another alternative may be that you have TeX code in your document 
>>> which
>>> needs to be marked as code. For that a slightly modified filter provides 
>>> a
>>> solution:
>>>
>>> local format2class = {
>>>   html = 'html',
>>>   tex = 'latex',
>>>   latex = 'latex'
>>> }
>>> local code_for = {
>>>   RawInline = pandoc.Code,
>>>   RawBlock = pandoc.CodeBlock
>>> }
>>> local function raw2code (elem)
>>>   local class = format2class[elem.format]
>>>   if class then
>>>     return code_for[elem.tag](elem.text, { class = class })
>>>   end
>>>   return nil
>>> end
>>> return {
>>>   {
>>>     RawInline = raw2code,
>>>     RawBlock = raw2code
>>>   }
>>> }
>>>
>>> Den lör 12 feb. 2022 07:54mr vicky <v.lon...-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> skrev:
>>>
>>>> @BP
>>>> i am getting this error but its giving only in this book not in other 
>>>> book evan i am using your raw2code.lua file in my command and its working 
>>>> fine in other book but in this book still getting some tags error
>>>> here you can check
>>>>
>>>>  pandoc -o Functional_Programming_in_C__Second_Edition.epub 
>>>> Functional_Programming_in_C__Second_Edition.md --lua-filter=raw2code.lua
>>>> [WARNING] Could not convert TeX math "Entering {op}");       T t = 
>>>> f();       log.LogTrace(, rendering as TeX:
>>>>   "Entering {op}");       T t = f();      
>>>>   ^
>>>>   unexpected '"'
>>>>   expecting "%", "\\label", "\\tag", "\\nonumber", whitespace, 
>>>> "\\bangle", "\\brace", "\\brack", "\\choose", "\\displaystyle", 
>>>> "\\textstyle", "\\scriptstyle", "\\scriptscriptstyle", "{", 
>>>> "\\operatorname", letter, digit, ".", "!", "'", "''", "'''", "''''", "*", 
>>>> "+", ",", "-", ".", "/", ":", ":=", ";", "<", "=", ">", "?", "@", "~", "_", 
>>>> "^", "\\left", "\\", "\\hyperref" or end of input
>>>> [WARNING] Could not convert TeX math "{s} should be lower case"); 
>>>> Validator<string> ShouldBeOfLength(int n)   => s => (s.Length == n)     
>>>>   ? Valid(s)       : Error(, rendering as TeX:
>>>>   "{s} should be lower case"); Validator<s
>>>>   ^
>>>>   unexpected '"'
>>>>   expecting "%", "\\label", "\\tag", "\\nonumber", whitespace, 
>>>> "\\bangle", "\\brace", "\\brack", "\\choose", "\\displaystyle", 
>>>> "\\textstyle", "\\scriptstyle", "\\scriptscriptstyle", "{", 
>>>> "\\operatorname", letter, digit, ".", "!", "'", "''", "'''", "''''", "*", 
>>>> "+", ",", "-", ".", "/", ":", ":=", ";", "<", "=", ">", "?", "@", "~", "_", 
>>>> "^", "\\left", "\\", "\\hyperref" or end of input
>>>> [WARNING] Could not convert TeX math "{name} -> {t}"),       
>>>> onError: ex => WriteLine(, rendering as TeX:
>>>>   "{name} -> {t}"),       onError: ex => W
>>>>   ^
>>>>   unexpected '"'
>>>>   expecting "%", "\\label", "\\tag", "\\nonumber", whitespace, 
>>>> "\\bangle", "\\brace", "\\brack", "\\choose", "\\displaystyle", 
>>>> "\\textstyle", "\\scriptstyle", "\\scriptscriptstyle", "{", 
>>>> "\\operatorname", letter, digit, ".", "!", "'", "''", "'''", "''''", "*", 
>>>> "+", ",", "-", ".", "/", ":", ":=", ";", "<", "=", ">", "?", "@", "~", "_", 
>>>> "^", "\\left", "\\", "\\hyperref" or end of input
>>>> [WARNING] Could not convert TeX math "Received '{msg}'; Sending 
>>>> 'PING'");   Task.Delay(500).Wait();   pong.Tell("PING"); }); pong = 
>>>> Agent.Start(0, (int count, string msg) => {   int newCount = count + 1;   
>>>> string nextMsg = (newCount < 5) ? "PONG" : "STOP";   logger.Tell(, 
>>>> rendering as TeX:
>>>>   "Received '{msg}'; Sending 'PING'");   T
>>>>   ^
>>>>   unexpected '"'
>>>>   expecting "%", "\\label", "\\tag", "\\nonumber", whitespace, 
>>>> "\\bangle", "\\brace", "\\brack", "\\choose", "\\displaystyle", 
>>>> "\\textstyle", "\\scriptstyle", "\\scriptscriptstyle", "{", 
>>>> "\\operatorname", letter, digit, ".", "!", "'", "''", "'''", "''''", "*", 
>>>> "+", ",", "-", ".", "/", ":", ":=", ";", "<", "=", ">", "?", "@", "~", "_", 
>>>> "^", "\\left", "\\", "\\hyperref" or end of input
>>>> [WARNING] This document format requires a nonempty <title> element.
>>>>   Defaulting to 'Functional_Programming_in_C__Second_Edition' as the 
>>>> title.
>>>>   To specify a title, use 'title' in metadata or --metadata title="...".
>>>> PS C:\Users\Hp\Downloads\Compressed
>>>>
>>>> On Friday, February 11, 2022 at 1:06:13 AM UTC+5 BP wrote:
>>>>
>>>>> This filter will convert all raw HTML to code in backticks, with 
>>>>> syntax highlighting. Save it as raw2code.lua and include 
>>>>> --lua-filter=raw2code.lua on the pandoc command line.
>>>>>
>>>>> local code_for = {
>>>>>   RawInline = pandoc.Code,
>>>>>   RawBlock = pandoc.CodeBlock
>>>>> }
>>>>> local function raw2code (elem)
>>>>>   if 'html' == elem.format then
>>>>>     return code_for[elem.tag](elem.text, { class = 'html' })
>>>>>   end
>>>>>   return nil
>>>>> end
>>>>> return {
>>>>>   {
>>>>>     RawInline = raw2code,
>>>>>     RawBlock = raw2code
>>>>>   }
>>>>> }
>>>>>
>>>>>
>>>>>
>>>>>
>>>>>
>>>>>
>>>>> Den tors 10 feb. 2022 14:24William Lupton <wlu...-QSt+ys/nuMyEUIsrzH9SikB+6BGkLq7r@public.gmane.org> 
>>>>> skrev:
>>>>>
>>>>>> If you simply want to ignore all raw HTML elements then I think that 
>>>>>> a lua filter that ignores all RawInlines (perhaps only those with 
>>>>>> format="html") will work for you. But if some HTML elements need to retain 
>>>>>> their HTML meaning then more logic will be needed. For example, this 
>>>>>> document:
>>>>>>
>>>>>> % cat raw.md
>>>>>> This is <b>bold</b> text.
>>>>>>
>>>>>> gives this HTML:
>>>>>>
>>>>>> % pandoc raw.md 
>>>>>> <p>This is <b>bold</b> text.</p>
>>>>>>
>>>>>> ...but with this filter:
>>>>>>
>>>>>> % cat raw.lua 
>>>>>> function RawInline(raw)
>>>>>>   if (raw.format == 'html') then
>>>>>>     return {}
>>>>>>   end
>>>>>> end
>>>>>>
>>>>>> ...it gives this:
>>>>>>
>>>>>> % pandoc raw.md -L raw.lua
>>>>>> <p>This is bold text.</p>
>>>>>>
>>>>>>
>>>>>>
>>>>>>
>>>>>>
>>>>>> On Thu, 10 Feb 2022 at 12:49, mr vicky <v.lon...-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote:
>>>>>>
>>>>>>> so before convert to epub file i have to edit md file and find all 
>>>>>>> tags and add these backticks ? 
>>>>>>> there is no option in pandoc to ignore tags inside book ?
>>>>>>>
>>>>>>> On Thursday, February 10, 2022 at 5:37:27 PM UTC+5 Joost wrote:
>>>>>>>
>>>>>>>> On Thu, 10 Feb 2022, at 11:27, mr vicky wrote: 
>>>>>>>> > hello 
>>>>>>>> > i am converting md to epub file but that md file is programming 
>>>>>>>> book 
>>>>>>>> > where is some codes written inside but when i convert it to epub 
>>>>>>>> then 
>>>>>>>> > its auto detecting these tags and making very bad epub file with 
>>>>>>>> page 
>>>>>>>> > breaks and some other kind of coding elements 
>>>>>>>> [...] 
>>>>>>>> > there is any option to ignore programming codes while converting 
>>>>>>>> to epub file ? 
>>>>>>>>
>>>>>>>> Note that Markdown allows you to include HTML elements, so whenever 
>>>>>>>> you write e.g. <h1> directly, Pandoc assums that's what you're doing and 
>>>>>>>> will put an <h1> tag in the html (or epub) output. 
>>>>>>>>
>>>>>>>> You'll want to mark the tags as code, which you can do with 
>>>>>>>> backticks: `<h1>`. 
>>>>>>>>
>>>>>>>> HTH 
>>>>>>>>
>>>>>>>> -- 
>>>>>>>> Joost Kremers 
>>>>>>>> Life has its moments 
>>>>>>>>
>>>>>>> -- 
>>>>>>> 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/3806ef68-3553-4e8e-8b04-bf7cc4226e7cn%40googlegroups.com 
>>>>>>> <https://groups.google.com/d/msgid/pandoc-discuss/3806ef68-3553-4e8e-8b04-bf7cc4226e7cn%40googlegroups.com?utm_medium=email&utm_source=footer>
>>>>>>> .
>>>>>>>
>>>>>> -- 
>>>>>> 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/CAEe_xxjC3As4wO0e4uz6PtVzakK7jaC89rUKKb_BiUwHpbh%3D7Q%40mail.gmail.com 
>>>>>> <https://groups.google.com/d/msgid/pandoc-discuss/CAEe_xxjC3As4wO0e4uz6PtVzakK7jaC89rUKKb_BiUwHpbh%3D7Q%40mail.gmail.com?utm_medium=email&utm_source=footer>
>>>>>> .
>>>>>>
>>>>> -- 
>>>> 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/ce37255c-e07f-4f47-958c-81069eb0b870n%40googlegroups.com 
>>>> <https://groups.google.com/d/msgid/pandoc-discuss/ce37255c-e07f-4f47-958c-81069eb0b870n%40googlegroups.com?utm_medium=email&utm_source=footer>
>>>> .
>>>>
>>> -- 
>> 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/2c88932a-2358-4cbb-af16-aa6a4dc025c3n%40googlegroups.com 
>> <https://groups.google.com/d/msgid/pandoc-discuss/2c88932a-2358-4cbb-af16-aa6a4dc025c3n%40googlegroups.com?utm_medium=email&utm_source=footer>
>> .
>>
>

-- 
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/6d897324-3d5d-426a-93a3-80140989c6acn%40googlegroups.com.

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

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

* Re: tagging codes detecting
       [not found]                                     ` <6d897324-3d5d-426a-93a3-80140989c6acn-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org>
@ 2022-02-12 16:54                                       ` BPJ
       [not found]                                         ` <CADAJKhCKx_eaQ-b-PQf5NC9xQtU6c+k+qGcNGZMK5HP7nq9CHg-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
  0 siblings, 1 reply; 12+ messages in thread
From: BPJ @ 2022-02-12 16:54 UTC (permalink / raw)
  To: pandoc-discuss


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

That's very strange because there doesn't seem to be any `end` missing.
Perhaps there was some error copy-pasting the code out of your mail client.
I have attached the filter as a file. Please try with that.

Den lör 12 feb. 2022 13:53mr vicky <v.lonly007-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> skrev:

>
> @BP
> i tried with your method and save your given code as lua file and point
> out that file in command line but its giving me this error
>
> Error running filter raw2code2.lua:
> raw2code2.lua:13: 'end' expected (to close 'if' at line 12) near <eof>
> PS C:\Users\Hp\Downloads\Compressed>
> On Saturday, February 12, 2022 at 4:49:00 PM UTC+5 BP wrote:
>
>> So you are using TeX math? I'm not sure what is going on. Maybe if you
>> post a minimal working example someone knows.
>>
>> Den lör 12 feb. 2022 12:09mr vicky <v.lon...-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> skrev:
>>
>>> @BP
>>> so i have to create .lua file with this code and point out lua file in
>>> command line ?
>>> by the way i used --webtex in command and its convert epub without any
>>> error but i dont know for what purpose pandoc using --webtex command
>>> may be it is ignoring those type characters or may be i am wrong about
>>> that
>>>
>>> On Saturday, February 12, 2022 at 3:27:48 PM UTC+5 BP wrote:
>>>
>>>> This is probably because Pandoc expects text between dollar signs
>>>> `$...$` and
>>>> `$$...$$` to be TeX math and fails to interpret some text which ended up
>>>> between two dollar signs as such.
>>>>
>>>> <https://pandoc.org/MANUAL.html#extension-tex_math_dollars>
>>>>
>>>> Alternatively it may be that pandoc expects text between backslash
>>>> escaped
>>>> parentheses `\(...\)`/`\\(...\\)` or square brackets
>>>> `\[...\]`/`\\[...\']` to be
>>>> TeX math, but I believe those extensions are not enabled by default.
>>>>
>>>> <https://pandoc.org/MANUAL.html#extension-tex_math_single_backslash>
>>>>
>>>> <https://pandoc.org/MANUAL.html#extension-tex_math_double_backslash>
>>>>
>>>> In this case the solution, unless you intended to include TeX math
>>>> somewhere
>>>> in your document, is to disable those extensions by including
>>>>
>>>>     -f
>>>> markdown-tex_math_dollars-tex_math_single_backslash-tex_math_double_backslash
>>>>
>>>> in your pandoc command line, or modifying any existing --from, -f,
>>>> --read or -r option accordingly.
>>>>
>>>> Yet another alternative may be that you have TeX code in your document
>>>> which
>>>> needs to be marked as code. For that a slightly modified filter
>>>> provides a
>>>> solution:
>>>>
>>>> local format2class = {
>>>>   html = 'html',
>>>>   tex = 'latex',
>>>>   latex = 'latex'
>>>> }
>>>> local code_for = {
>>>>   RawInline = pandoc.Code,
>>>>   RawBlock = pandoc.CodeBlock
>>>> }
>>>> local function raw2code (elem)
>>>>   local class = format2class[elem.format]
>>>>   if class then
>>>>     return code_for[elem.tag](elem.text, { class = class })
>>>>   end
>>>>   return nil
>>>> end
>>>> return {
>>>>   {
>>>>     RawInline = raw2code,
>>>>     RawBlock = raw2code
>>>>   }
>>>> }
>>>>
>>>> Den lör 12 feb. 2022 07:54mr vicky <v.lon...-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> skrev:
>>>>
>>>>> @BP
>>>>> i am getting this error but its giving only in this book not in other
>>>>> book evan i am using your raw2code.lua file in my command and its working
>>>>> fine in other book but in this book still getting some tags error
>>>>> here you can check
>>>>>
>>>>>  pandoc -o Functional_Programming_in_C__Second_Edition.epub
>>>>> Functional_Programming_in_C__Second_Edition.md --lua-filter=raw2code.lua
>>>>> [WARNING] Could not convert TeX math "Entering {op}");       T t =
>>>>> f();       log.LogTrace(, rendering as TeX:
>>>>>   "Entering {op}");       T t = f();      
>>>>>   ^
>>>>>   unexpected '"'
>>>>>   expecting "%", "\\label", "\\tag", "\\nonumber", whitespace,
>>>>> "\\bangle", "\\brace", "\\brack", "\\choose", "\\displaystyle",
>>>>> "\\textstyle", "\\scriptstyle", "\\scriptscriptstyle", "{",
>>>>> "\\operatorname", letter, digit, ".", "!", "'", "''", "'''", "''''", "*",
>>>>> "+", ",", "-", ".", "/", ":", ":=", ";", "<", "=", ">", "?", "@", "~", "_",
>>>>> "^", "\\left", "\\", "\\hyperref" or end of input
>>>>> [WARNING] Could not convert TeX math "{s} should be lower case");
>>>>> Validator<string> ShouldBeOfLength(int n)   => s => (s.Length == n)    
>>>>>   ? Valid(s)       : Error(, rendering as TeX:
>>>>>   "{s} should be lower case"); Validator<s
>>>>>   ^
>>>>>   unexpected '"'
>>>>>   expecting "%", "\\label", "\\tag", "\\nonumber", whitespace,
>>>>> "\\bangle", "\\brace", "\\brack", "\\choose", "\\displaystyle",
>>>>> "\\textstyle", "\\scriptstyle", "\\scriptscriptstyle", "{",
>>>>> "\\operatorname", letter, digit, ".", "!", "'", "''", "'''", "''''", "*",
>>>>> "+", ",", "-", ".", "/", ":", ":=", ";", "<", "=", ">", "?", "@", "~", "_",
>>>>> "^", "\\left", "\\", "\\hyperref" or end of input
>>>>> [WARNING] Could not convert TeX math "{name} -> {t}"),      
>>>>> onError: ex => WriteLine(, rendering as TeX:
>>>>>   "{name} -> {t}"),       onError: ex => W
>>>>>   ^
>>>>>   unexpected '"'
>>>>>   expecting "%", "\\label", "\\tag", "\\nonumber", whitespace,
>>>>> "\\bangle", "\\brace", "\\brack", "\\choose", "\\displaystyle",
>>>>> "\\textstyle", "\\scriptstyle", "\\scriptscriptstyle", "{",
>>>>> "\\operatorname", letter, digit, ".", "!", "'", "''", "'''", "''''", "*",
>>>>> "+", ",", "-", ".", "/", ":", ":=", ";", "<", "=", ">", "?", "@", "~", "_",
>>>>> "^", "\\left", "\\", "\\hyperref" or end of input
>>>>> [WARNING] Could not convert TeX math "Received '{msg}'; Sending
>>>>> 'PING'");   Task.Delay(500).Wait();   pong.Tell("PING"); }); pong =
>>>>> Agent.Start(0, (int count, string msg) => {   int newCount = count + 1;  
>>>>> string nextMsg = (newCount < 5) ? "PONG" : "STOP";   logger.Tell(,
>>>>> rendering as TeX:
>>>>>   "Received '{msg}'; Sending 'PING'");   T
>>>>>   ^
>>>>>   unexpected '"'
>>>>>   expecting "%", "\\label", "\\tag", "\\nonumber", whitespace,
>>>>> "\\bangle", "\\brace", "\\brack", "\\choose", "\\displaystyle",
>>>>> "\\textstyle", "\\scriptstyle", "\\scriptscriptstyle", "{",
>>>>> "\\operatorname", letter, digit, ".", "!", "'", "''", "'''", "''''", "*",
>>>>> "+", ",", "-", ".", "/", ":", ":=", ";", "<", "=", ">", "?", "@", "~", "_",
>>>>> "^", "\\left", "\\", "\\hyperref" or end of input
>>>>> [WARNING] This document format requires a nonempty <title> element.
>>>>>   Defaulting to 'Functional_Programming_in_C__Second_Edition' as the
>>>>> title.
>>>>>   To specify a title, use 'title' in metadata or --metadata
>>>>> title="...".
>>>>> PS C:\Users\Hp\Downloads\Compressed
>>>>>
>>>>> On Friday, February 11, 2022 at 1:06:13 AM UTC+5 BP wrote:
>>>>>
>>>>>> This filter will convert all raw HTML to code in backticks, with
>>>>>> syntax highlighting. Save it as raw2code.lua and include
>>>>>> --lua-filter=raw2code.lua on the pandoc command line.
>>>>>>
>>>>>> local code_for = {
>>>>>>   RawInline = pandoc.Code,
>>>>>>   RawBlock = pandoc.CodeBlock
>>>>>> }
>>>>>> local function raw2code (elem)
>>>>>>   if 'html' == elem.format then
>>>>>>     return code_for[elem.tag](elem.text, { class = 'html' })
>>>>>>   end
>>>>>>   return nil
>>>>>> end
>>>>>> return {
>>>>>>   {
>>>>>>     RawInline = raw2code,
>>>>>>     RawBlock = raw2code
>>>>>>   }
>>>>>> }
>>>>>>
>>>>>>
>>>>>>
>>>>>>
>>>>>>
>>>>>>
>>>>>> Den tors 10 feb. 2022 14:24William Lupton <wlu...-QSt+ys/nuMyEUIsrzH9SisXa4x6EXUF0@public.gmane.orgg>
>>>>>> skrev:
>>>>>>
>>>>>>> If you simply want to ignore all raw HTML elements then I think that
>>>>>>> a lua filter that ignores all RawInlines (perhaps only those with
>>>>>>> format="html") will work for you. But if some HTML elements need to retain
>>>>>>> their HTML meaning then more logic will be needed. For example, this
>>>>>>> document:
>>>>>>>
>>>>>>> % cat raw.md
>>>>>>> This is <b>bold</b> text.
>>>>>>>
>>>>>>> gives this HTML:
>>>>>>>
>>>>>>> % pandoc raw.md
>>>>>>> <p>This is <b>bold</b> text.</p>
>>>>>>>
>>>>>>> ...but with this filter:
>>>>>>>
>>>>>>> % cat raw.lua
>>>>>>> function RawInline(raw)
>>>>>>>   if (raw.format == 'html') then
>>>>>>>     return {}
>>>>>>>   end
>>>>>>> end
>>>>>>>
>>>>>>> ...it gives this:
>>>>>>>
>>>>>>> % pandoc raw.md -L raw.lua
>>>>>>> <p>This is bold text.</p>
>>>>>>>
>>>>>>>
>>>>>>>
>>>>>>>
>>>>>>>
>>>>>>> On Thu, 10 Feb 2022 at 12:49, mr vicky <v.lon...-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote:
>>>>>>>
>>>>>>>> so before convert to epub file i have to edit md file and find all
>>>>>>>> tags and add these backticks ?
>>>>>>>> there is no option in pandoc to ignore tags inside book ?
>>>>>>>>
>>>>>>>> On Thursday, February 10, 2022 at 5:37:27 PM UTC+5 Joost wrote:
>>>>>>>>
>>>>>>>>> On Thu, 10 Feb 2022, at 11:27, mr vicky wrote:
>>>>>>>>> > hello
>>>>>>>>> > i am converting md to epub file but that md file is programming
>>>>>>>>> book
>>>>>>>>> > where is some codes written inside but when i convert it to epub
>>>>>>>>> then
>>>>>>>>> > its auto detecting these tags and making very bad epub file with
>>>>>>>>> page
>>>>>>>>> > breaks and some other kind of coding elements
>>>>>>>>> [...]
>>>>>>>>> > there is any option to ignore programming codes while converting
>>>>>>>>> to epub file ?
>>>>>>>>>
>>>>>>>>> Note that Markdown allows you to include HTML elements, so
>>>>>>>>> whenever you write e.g. <h1> directly, Pandoc assums that's what you're
>>>>>>>>> doing and will put an <h1> tag in the html (or epub) output.
>>>>>>>>>
>>>>>>>>> You'll want to mark the tags as code, which you can do with
>>>>>>>>> backticks: `<h1>`.
>>>>>>>>>
>>>>>>>>> HTH
>>>>>>>>>
>>>>>>>>> --
>>>>>>>>> Joost Kremers
>>>>>>>>> Life has its moments
>>>>>>>>>
>>>>>>>> --
>>>>>>>> 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/3806ef68-3553-4e8e-8b04-bf7cc4226e7cn%40googlegroups.com
>>>>>>>> <https://groups.google.com/d/msgid/pandoc-discuss/3806ef68-3553-4e8e-8b04-bf7cc4226e7cn%40googlegroups.com?utm_medium=email&utm_source=footer>
>>>>>>>> .
>>>>>>>>
>>>>>>> --
>>>>>>> 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/CAEe_xxjC3As4wO0e4uz6PtVzakK7jaC89rUKKb_BiUwHpbh%3D7Q%40mail.gmail.com
>>>>>>> <https://groups.google.com/d/msgid/pandoc-discuss/CAEe_xxjC3As4wO0e4uz6PtVzakK7jaC89rUKKb_BiUwHpbh%3D7Q%40mail.gmail.com?utm_medium=email&utm_source=footer>
>>>>>>> .
>>>>>>>
>>>>>> --
>>>>> 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/ce37255c-e07f-4f47-958c-81069eb0b870n%40googlegroups.com
>>>>> <https://groups.google.com/d/msgid/pandoc-discuss/ce37255c-e07f-4f47-958c-81069eb0b870n%40googlegroups.com?utm_medium=email&utm_source=footer>
>>>>> .
>>>>>
>>>> --
>>> 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/2c88932a-2358-4cbb-af16-aa6a4dc025c3n%40googlegroups.com
>>> <https://groups.google.com/d/msgid/pandoc-discuss/2c88932a-2358-4cbb-af16-aa6a4dc025c3n%40googlegroups.com?utm_medium=email&utm_source=footer>
>>> .
>>>
>> --
> 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/6d897324-3d5d-426a-93a3-80140989c6acn%40googlegroups.com
> <https://groups.google.com/d/msgid/pandoc-discuss/6d897324-3d5d-426a-93a3-80140989c6acn%40googlegroups.com?utm_medium=email&utm_source=footer>
> .
>

-- 
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/CADAJKhCKx_eaQ-b-PQf5NC9xQtU6c%2Bk%2BqGcNGZMK5HP7nq9CHg%40mail.gmail.com.

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

[-- Attachment #2: raw2code.lua --]
[-- Type: application/octet-stream, Size: 396 bytes --]

local format2class = {
  html = 'html',
  tex = 'latex',
  latex = 'latex'
}
local code_for = {
  RawInline = pandoc.Code,
  RawBlock = pandoc.CodeBlock
}
local function raw2code (elem)
  local class = format2class[elem.format]
  if class then
    return code_for[elem.tag](elem.text, { class = class })
  end
  return nil
end
return {
  {
    RawInline = raw2code,
    RawBlock = raw2code
  }
}

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

* Re: tagging codes detecting
       [not found]                                         ` <CADAJKhCKx_eaQ-b-PQf5NC9xQtU6c+k+qGcNGZMK5HP7nq9CHg-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
@ 2022-02-16 11:17                                           ` mr vicky
  0 siblings, 0 replies; 12+ messages in thread
From: mr vicky @ 2022-02-16 11:17 UTC (permalink / raw)
  To: pandoc-discuss


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


@BP 
i downloaded your file and using it but its still giving this error your 
can check

 pandoc -o Functional_Programming_in_C__Second_Edition.epub 
Functional_Programming_in_C__Second_Edition.md --lua-filter=raw2code.lua
[WARNING] Could not convert TeX math "Entering {op}");       T t = f(); 
      log.LogTrace(, rendering as TeX:
  "Entering {op}");       T t = f();      
  ^
  unexpected '"'
  expecting "%", "\\label", "\\tag", "\\nonumber", whitespace, "\\bangle", 
"\\brace", "\\brack", "\\choose", "\\displaystyle", "\\textstyle", 
"\\scriptstyle", "\\scriptscriptstyle", "{", "\\operatorname", letter, 
digit, ".", "!", "'", "''", "'''", "''''", "*", "+", ",", "-", ".", "/", 
":", ":=", ";", "<", "=", ">", "?", "@", "~", "_", "^", "\\left", "\\", 
"\\hyperref" or end of input
[WARNING] Could not convert TeX math "{s} should be lower case"); 
Validator<string> ShouldBeOfLength(int n)   => s => (s.Length == n)     
  ? Valid(s)       : Error(, rendering as TeX:
  "{s} should be lower case"); Validator<s
  ^
  unexpected '"'
  expecting "%", "\\label", "\\tag", "\\nonumber", whitespace, "\\bangle", 
"\\brace", "\\brack", "\\choose", "\\displaystyle", "\\textstyle", 
"\\scriptstyle", "\\scriptscriptstyle", "{", "\\operatorname", letter, 
digit, ".", "!", "'", "''", "'''", "''''", "*", "+", ",", "-", ".", "/", 
":", ":=", ";", "<", "=", ">", "?", "@", "~", "_", "^", "\\left", "\\", 
"\\hyperref" or end of input
[WARNING] Could not convert TeX math "{name} -> {t}"),       onError: ex 
=> WriteLine(, rendering as TeX:
  "{name} -> {t}"),       onError: ex => W
  ^
  unexpected '"'
  expecting "%", "\\label", "\\tag", "\\nonumber", whitespace, "\\bangle", 
"\\brace", "\\brack", "\\choose", "\\displaystyle", "\\textstyle", 
"\\scriptstyle", "\\scriptscriptstyle", "{", "\\operatorname", letter, 
digit, ".", "!", "'", "''", "'''", "''''", "*", "+", ",", "-", ".", "/", 
":", ":=", ";", "<", "=", ">", "?", "@", "~", "_", "^", "\\left", "\\", 
"\\hyperref" or end of input
[WARNING] Could not convert TeX math "Received '{msg}'; Sending 'PING'"); 
  Task.Delay(500).Wait();   pong.Tell("PING"); }); pong = Agent.Start(0, 
(int count, string msg) => {   int newCount = count + 1;   string nextMsg 
= (newCount < 5) ? "PONG" : "STOP";   logger.Tell(, rendering as TeX:
  "Received '{msg}'; Sending 'PING'");   T
  ^
  unexpected '"'
  expecting "%", "\\label", "\\tag", "\\nonumber", whitespace, "\\bangle", 
"\\brace", "\\brack", "\\choose", "\\displaystyle", "\\textstyle", 
"\\scriptstyle", "\\scriptscriptstyle", "{", "\\operatorname", letter, 
digit, ".", "!", "'", "''", "'''", "''''", "*", "+", ",", "-", ".", "/", 
":", ":=", ";", "<", "=", ">", "?", "@", "~", "_", "^", "\\left", "\\", 
"\\hyperref" or end of input
[WARNING] This document format requires a nonempty <title> element.
  Defaulting to 'Functional_Programming_in_C__Second_Edition' as the title.
  To specify a title, use 'title' in metadata or --metadata title="...".
PS C:\Users\Hp\Downloads\Compressed>
On Saturday, February 12, 2022 at 9:54:25 PM UTC+5 BP wrote:

> That's very strange because there doesn't seem to be any `end` missing. 
> Perhaps there was some error copy-pasting the code out of your mail client. 
> I have attached the filter as a file. Please try with that.
>
> Den lör 12 feb. 2022 13:53mr vicky <v.lon...-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> skrev:
>
>>
>> @BP
>> i tried with your method and save your given code as lua file and point 
>> out that file in command line but its giving me this error
>>
>> Error running filter raw2code2.lua:
>> raw2code2.lua:13: 'end' expected (to close 'if' at line 12) near <eof>
>> PS C:\Users\Hp\Downloads\Compressed>
>> On Saturday, February 12, 2022 at 4:49:00 PM UTC+5 BP wrote:
>>
>>> So you are using TeX math? I'm not sure what is going on. Maybe if you 
>>> post a minimal working example someone knows.
>>>
>>> Den lör 12 feb. 2022 12:09mr vicky <v.lon...-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> skrev:
>>>
>>>> @BP
>>>> so i have to create .lua file with this code and point out lua file in 
>>>> command line ?
>>>> by the way i used --webtex in command and its convert epub without any 
>>>> error but i dont know for what purpose pandoc using --webtex command
>>>> may be it is ignoring those type characters or may be i am wrong about 
>>>> that
>>>>
>>>> On Saturday, February 12, 2022 at 3:27:48 PM UTC+5 BP wrote:
>>>>
>>>>> This is probably because Pandoc expects text between dollar signs 
>>>>> `$...$` and
>>>>> `$$...$$` to be TeX math and fails to interpret some text which ended 
>>>>> up
>>>>> between two dollar signs as such.
>>>>>
>>>>> <https://pandoc.org/MANUAL.html#extension-tex_math_dollars>
>>>>>
>>>>> Alternatively it may be that pandoc expects text between backslash 
>>>>> escaped
>>>>> parentheses `\(...\)`/`\\(...\\)` or square brackets 
>>>>> `\[...\]`/`\\[...\']` to be
>>>>> TeX math, but I believe those extensions are not enabled by default.
>>>>>
>>>>> <https://pandoc.org/MANUAL.html#extension-tex_math_single_backslash>
>>>>>
>>>>> <https://pandoc.org/MANUAL.html#extension-tex_math_double_backslash>
>>>>>
>>>>> In this case the solution, unless you intended to include TeX math 
>>>>> somewhere
>>>>> in your document, is to disable those extensions by including
>>>>>
>>>>>     -f 
>>>>> markdown-tex_math_dollars-tex_math_single_backslash-tex_math_double_backslash
>>>>>     
>>>>> in your pandoc command line, or modifying any existing --from, -f,
>>>>> --read or -r option accordingly.
>>>>>
>>>>> Yet another alternative may be that you have TeX code in your document 
>>>>> which
>>>>> needs to be marked as code. For that a slightly modified filter 
>>>>> provides a
>>>>> solution:
>>>>>
>>>>> local format2class = {
>>>>>   html = 'html',
>>>>>   tex = 'latex',
>>>>>   latex = 'latex'
>>>>> }
>>>>> local code_for = {
>>>>>   RawInline = pandoc.Code,
>>>>>   RawBlock = pandoc.CodeBlock
>>>>> }
>>>>> local function raw2code (elem)
>>>>>   local class = format2class[elem.format]
>>>>>   if class then
>>>>>     return code_for[elem.tag](elem.text, { class = class })
>>>>>   end
>>>>>   return nil
>>>>> end
>>>>> return {
>>>>>   {
>>>>>     RawInline = raw2code,
>>>>>     RawBlock = raw2code
>>>>>   }
>>>>> }
>>>>>
>>>>> Den lör 12 feb. 2022 07:54mr vicky <v.lon...-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> skrev:
>>>>>
>>>>>> @BP
>>>>>> i am getting this error but its giving only in this book not in other 
>>>>>> book evan i am using your raw2code.lua file in my command and its working 
>>>>>> fine in other book but in this book still getting some tags error
>>>>>> here you can check
>>>>>>
>>>>>>  pandoc -o Functional_Programming_in_C__Second_Edition.epub 
>>>>>> Functional_Programming_in_C__Second_Edition.md --lua-filter=raw2code.lua
>>>>>> [WARNING] Could not convert TeX math "Entering {op}");       T t = 
>>>>>> f();       log.LogTrace(, rendering as TeX:
>>>>>>   "Entering {op}");       T t = f();      
>>>>>>   ^
>>>>>>   unexpected '"'
>>>>>>   expecting "%", "\\label", "\\tag", "\\nonumber", whitespace, 
>>>>>> "\\bangle", "\\brace", "\\brack", "\\choose", "\\displaystyle", 
>>>>>> "\\textstyle", "\\scriptstyle", "\\scriptscriptstyle", "{", 
>>>>>> "\\operatorname", letter, digit, ".", "!", "'", "''", "'''", "''''", "*", 
>>>>>> "+", ",", "-", ".", "/", ":", ":=", ";", "<", "=", ">", "?", "@", "~", "_", 
>>>>>> "^", "\\left", "\\", "\\hyperref" or end of input
>>>>>> [WARNING] Could not convert TeX math "{s} should be lower case"); 
>>>>>> Validator<string> ShouldBeOfLength(int n)   => s => (s.Length == n)     
>>>>>>   ? Valid(s)       : Error(, rendering as TeX:
>>>>>>   "{s} should be lower case"); Validator<s
>>>>>>   ^
>>>>>>   unexpected '"'
>>>>>>   expecting "%", "\\label", "\\tag", "\\nonumber", whitespace, 
>>>>>> "\\bangle", "\\brace", "\\brack", "\\choose", "\\displaystyle", 
>>>>>> "\\textstyle", "\\scriptstyle", "\\scriptscriptstyle", "{", 
>>>>>> "\\operatorname", letter, digit, ".", "!", "'", "''", "'''", "''''", "*", 
>>>>>> "+", ",", "-", ".", "/", ":", ":=", ";", "<", "=", ">", "?", "@", "~", "_", 
>>>>>> "^", "\\left", "\\", "\\hyperref" or end of input
>>>>>> [WARNING] Could not convert TeX math "{name} -> {t}"),       
>>>>>> onError: ex => WriteLine(, rendering as TeX:
>>>>>>   "{name} -> {t}"),       onError: ex => W
>>>>>>   ^
>>>>>>   unexpected '"'
>>>>>>   expecting "%", "\\label", "\\tag", "\\nonumber", whitespace, 
>>>>>> "\\bangle", "\\brace", "\\brack", "\\choose", "\\displaystyle", 
>>>>>> "\\textstyle", "\\scriptstyle", "\\scriptscriptstyle", "{", 
>>>>>> "\\operatorname", letter, digit, ".", "!", "'", "''", "'''", "''''", "*", 
>>>>>> "+", ",", "-", ".", "/", ":", ":=", ";", "<", "=", ">", "?", "@", "~", "_", 
>>>>>> "^", "\\left", "\\", "\\hyperref" or end of input
>>>>>> [WARNING] Could not convert TeX math "Received '{msg}'; Sending 
>>>>>> 'PING'");   Task.Delay(500).Wait();   pong.Tell("PING"); }); pong = 
>>>>>> Agent.Start(0, (int count, string msg) => {   int newCount = count + 1;   
>>>>>> string nextMsg = (newCount < 5) ? "PONG" : "STOP";   logger.Tell(, 
>>>>>> rendering as TeX:
>>>>>>   "Received '{msg}'; Sending 'PING'");   T
>>>>>>   ^
>>>>>>   unexpected '"'
>>>>>>   expecting "%", "\\label", "\\tag", "\\nonumber", whitespace, 
>>>>>> "\\bangle", "\\brace", "\\brack", "\\choose", "\\displaystyle", 
>>>>>> "\\textstyle", "\\scriptstyle", "\\scriptscriptstyle", "{", 
>>>>>> "\\operatorname", letter, digit, ".", "!", "'", "''", "'''", "''''", "*", 
>>>>>> "+", ",", "-", ".", "/", ":", ":=", ";", "<", "=", ">", "?", "@", "~", "_", 
>>>>>> "^", "\\left", "\\", "\\hyperref" or end of input
>>>>>> [WARNING] This document format requires a nonempty <title> element.
>>>>>>   Defaulting to 'Functional_Programming_in_C__Second_Edition' as the 
>>>>>> title.
>>>>>>   To specify a title, use 'title' in metadata or --metadata 
>>>>>> title="...".
>>>>>> PS C:\Users\Hp\Downloads\Compressed
>>>>>>
>>>>>> On Friday, February 11, 2022 at 1:06:13 AM UTC+5 BP wrote:
>>>>>>
>>>>>>> This filter will convert all raw HTML to code in backticks, with 
>>>>>>> syntax highlighting. Save it as raw2code.lua and include 
>>>>>>> --lua-filter=raw2code.lua on the pandoc command line.
>>>>>>>
>>>>>>> local code_for = {
>>>>>>>   RawInline = pandoc.Code,
>>>>>>>   RawBlock = pandoc.CodeBlock
>>>>>>> }
>>>>>>> local function raw2code (elem)
>>>>>>>   if 'html' == elem.format then
>>>>>>>     return code_for[elem.tag](elem.text, { class = 'html' })
>>>>>>>   end
>>>>>>>   return nil
>>>>>>> end
>>>>>>> return {
>>>>>>>   {
>>>>>>>     RawInline = raw2code,
>>>>>>>     RawBlock = raw2code
>>>>>>>   }
>>>>>>> }
>>>>>>>
>>>>>>>
>>>>>>>
>>>>>>>
>>>>>>>
>>>>>>>
>>>>>>> Den tors 10 feb. 2022 14:24William Lupton <
>>>>>>> wlu...-QSt+ys/nuMyEUIsrzH9SikB+6BGkLq7r@public.gmane.org> skrev:
>>>>>>>
>>>>>>>> If you simply want to ignore all raw HTML elements then I think 
>>>>>>>> that a lua filter that ignores all RawInlines (perhaps only those with 
>>>>>>>> format="html") will work for you. But if some HTML elements need to retain 
>>>>>>>> their HTML meaning then more logic will be needed. For example, this 
>>>>>>>> document:
>>>>>>>>
>>>>>>>> % cat raw.md
>>>>>>>> This is <b>bold</b> text.
>>>>>>>>
>>>>>>>> gives this HTML:
>>>>>>>>
>>>>>>>> % pandoc raw.md 
>>>>>>>> <p>This is <b>bold</b> text.</p>
>>>>>>>>
>>>>>>>> ...but with this filter:
>>>>>>>>
>>>>>>>> % cat raw.lua 
>>>>>>>> function RawInline(raw)
>>>>>>>>   if (raw.format == 'html') then
>>>>>>>>     return {}
>>>>>>>>   end
>>>>>>>> end
>>>>>>>>
>>>>>>>> ...it gives this:
>>>>>>>>
>>>>>>>> % pandoc raw.md -L raw.lua
>>>>>>>> <p>This is bold text.</p>
>>>>>>>>
>>>>>>>>
>>>>>>>>
>>>>>>>>
>>>>>>>>
>>>>>>>> On Thu, 10 Feb 2022 at 12:49, mr vicky <v.lon...-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote:
>>>>>>>>
>>>>>>>>> so before convert to epub file i have to edit md file and find all 
>>>>>>>>> tags and add these backticks ? 
>>>>>>>>> there is no option in pandoc to ignore tags inside book ?
>>>>>>>>>
>>>>>>>>> On Thursday, February 10, 2022 at 5:37:27 PM UTC+5 Joost wrote:
>>>>>>>>>
>>>>>>>>>> On Thu, 10 Feb 2022, at 11:27, mr vicky wrote: 
>>>>>>>>>> > hello 
>>>>>>>>>> > i am converting md to epub file but that md file is programming 
>>>>>>>>>> book 
>>>>>>>>>> > where is some codes written inside but when i convert it to 
>>>>>>>>>> epub then 
>>>>>>>>>> > its auto detecting these tags and making very bad epub file 
>>>>>>>>>> with page 
>>>>>>>>>> > breaks and some other kind of coding elements 
>>>>>>>>>> [...] 
>>>>>>>>>> > there is any option to ignore programming codes while 
>>>>>>>>>> converting to epub file ? 
>>>>>>>>>>
>>>>>>>>>> Note that Markdown allows you to include HTML elements, so 
>>>>>>>>>> whenever you write e.g. <h1> directly, Pandoc assums that's what you're 
>>>>>>>>>> doing and will put an <h1> tag in the html (or epub) output. 
>>>>>>>>>>
>>>>>>>>>> You'll want to mark the tags as code, which you can do with 
>>>>>>>>>> backticks: `<h1>`. 
>>>>>>>>>>
>>>>>>>>>> HTH 
>>>>>>>>>>
>>>>>>>>>> -- 
>>>>>>>>>> Joost Kremers 
>>>>>>>>>> Life has its moments 
>>>>>>>>>>
>>>>>>>>> -- 
>>>>>>>>> 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/3806ef68-3553-4e8e-8b04-bf7cc4226e7cn%40googlegroups.com 
>>>>>>>>> <https://groups.google.com/d/msgid/pandoc-discuss/3806ef68-3553-4e8e-8b04-bf7cc4226e7cn%40googlegroups.com?utm_medium=email&utm_source=footer>
>>>>>>>>> .
>>>>>>>>>
>>>>>>>> -- 
>>>>>>>> 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/CAEe_xxjC3As4wO0e4uz6PtVzakK7jaC89rUKKb_BiUwHpbh%3D7Q%40mail.gmail.com 
>>>>>>>> <https://groups.google.com/d/msgid/pandoc-discuss/CAEe_xxjC3As4wO0e4uz6PtVzakK7jaC89rUKKb_BiUwHpbh%3D7Q%40mail.gmail.com?utm_medium=email&utm_source=footer>
>>>>>>>> .
>>>>>>>>
>>>>>>> -- 
>>>>>> 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/ce37255c-e07f-4f47-958c-81069eb0b870n%40googlegroups.com 
>>>>>> <https://groups.google.com/d/msgid/pandoc-discuss/ce37255c-e07f-4f47-958c-81069eb0b870n%40googlegroups.com?utm_medium=email&utm_source=footer>
>>>>>> .
>>>>>>
>>>>> -- 
>>>> 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/2c88932a-2358-4cbb-af16-aa6a4dc025c3n%40googlegroups.com 
>>>> <https://groups.google.com/d/msgid/pandoc-discuss/2c88932a-2358-4cbb-af16-aa6a4dc025c3n%40googlegroups.com?utm_medium=email&utm_source=footer>
>>>> .
>>>>
>>> -- 
>> 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/6d897324-3d5d-426a-93a3-80140989c6acn%40googlegroups.com 
>> <https://groups.google.com/d/msgid/pandoc-discuss/6d897324-3d5d-426a-93a3-80140989c6acn%40googlegroups.com?utm_medium=email&utm_source=footer>
>> .
>>
>

-- 
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/6261767e-0a89-4edf-92ae-53ab36cbe052n%40googlegroups.com.

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

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

end of thread, other threads:[~2022-02-16 11:17 UTC | newest]

Thread overview: 12+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-02-10 10:27 tagging codes detecting mr vicky
     [not found] ` <0801754e-c412-4e23-89a0-6b7bad4fff64n-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org>
2022-02-10 12:37   ` Joost
     [not found]     ` <58f09215-7a45-4f1c-ae7b-f651faaed294-jFIJ+Wc5/Vo7lZ9V/NTDHw@public.gmane.org>
2022-02-10 12:49       ` mr vicky
     [not found]         ` <3806ef68-3553-4e8e-8b04-bf7cc4226e7cn-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org>
2022-02-10 13:23           ` William Lupton
     [not found]             ` <CAEe_xxjC3As4wO0e4uz6PtVzakK7jaC89rUKKb_BiUwHpbh=7Q-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2022-02-10 20:06               ` BPJ
     [not found]                 ` <CADAJKhDhA7kP2JfM9tXDc=pmmjP7BA5dGgnVE2T=2b1dmF3MFw-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2022-02-12  6:53                   ` mr vicky
     [not found]                     ` <ce37255c-e07f-4f47-958c-81069eb0b870n-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org>
2022-02-12 10:27                       ` BPJ
     [not found]                         ` <CADAJKhAPXai=vE-4iUYd6eWa01+PXcc7er7aPuE-szhziJzkqQ-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2022-02-12 11:08                           ` mr vicky
     [not found]                             ` <2c88932a-2358-4cbb-af16-aa6a4dc025c3n-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org>
2022-02-12 11:48                               ` BPJ
     [not found]                                 ` <CADAJKhB-n2j6NC2Ysu8bbw6464PNnyXhDqCmu8GTqz1yr0gkUg-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2022-02-12 12:52                                   ` mr vicky
     [not found]                                     ` <6d897324-3d5d-426a-93a3-80140989c6acn-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org>
2022-02-12 16:54                                       ` BPJ
     [not found]                                         ` <CADAJKhCKx_eaQ-b-PQf5NC9xQtU6c+k+qGcNGZMK5HP7nq9CHg-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2022-02-16 11:17                                           ` mr vicky

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