public inbox archive for pandoc-discuss@googlegroups.com
 help / color / mirror / Atom feed
* LateX to epub -- label rendering
@ 2021-09-03  9:09   ` Vin Cent
       [not found]     ` <84cefde8-0943-43e2-8b7a-96efe6a0949cn-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org>
  0 siblings, 1 reply; 10+ messages in thread
From: Vin Cent @ 2021-09-03  9:09 UTC (permalink / raw)
  To: pandoc-discuss


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

Hi,

I'm quite new to pandoc, with some experience in LateX.
I'm trying to convert a book (\documentclass{memoir} ) into a epub document.

I have been able to get something quite fine (thanks pandoc! this is really 
amazing) but now I seem to be stuck on a detail.

Each chapter from my source starts with a label, such as :

\chapter{First chapter head}
\markboth{}{I. First chapter head}
\label{ch:un}

Foo bar

\chapter{Second chapter head}
\markboth{}{II. Second chapter head}
\label{ch:deux}

Which I compile with (I have removed a bunch of option in order to just 
isolate my problem) :
pandoc -o ebook.epub epub.tex --epub-metadata=metadata.xml --toc 
--toc-depth=2

The result of this is a render with my label name being displayed into 
brackets.
[ch:un]

My expectation is that the label is not displayed, but serves only 
anchors/links/navigation if a ref is defined pointing to it.

Can you suggest how I can achieve this result ?
I tried to look for this problem and 
found https://github.com/lierdakil/pandoc-crossref/issues/319 but to be 
honnest, I'm too much a pandoc newb to understand that thread. I have tried 
quite a number of suggestions (adding the LUA script, adding a similar yaml 
file, but this has changed nothing as far as my problem is concerned).

Cheers,

Vincent

-- 
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/84cefde8-0943-43e2-8b7a-96efe6a0949cn%40googlegroups.com.

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

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

* AW: LateX to epub -- label rendering
       [not found]     ` <84cefde8-0943-43e2-8b7a-96efe6a0949cn-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org>
@ 2021-09-03  9:21       ` denis.maier-NSENcxR/0n0
       [not found]         ` <c5aefee88458436f8ef800629a5c7686-NSENcxR/0n0@public.gmane.org>
  2021-09-03 16:36       ` John MacFarlane
  1 sibling, 1 reply; 10+ messages in thread
From: denis.maier-NSENcxR/0n0 @ 2021-09-03  9:21 UTC (permalink / raw)
  To: pandoc-discuss-/JYPxA39Uh5TLH3MbocFFw

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

Don’t really know much about epub, but what happens if you go to other formats, say markdown? Or pandoc’s native format? That’s always really helpful for debugging.
Denis

Von: pandoc-discuss-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org <pandoc-discuss-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org> Im Auftrag von Vin Cent
Gesendet: Freitag, 3. September 2021 11:09
An: pandoc-discuss <pandoc-discuss-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org>
Betreff: LateX to epub -- label rendering

Hi,

I'm quite new to pandoc, with some experience in LateX.
I'm trying to convert a book (\documentclass{memoir} ) into a epub document.

I have been able to get something quite fine (thanks pandoc! this is really amazing) but now I seem to be stuck on a detail.

Each chapter from my source starts with a label, such as :

\chapter{First chapter head}
\markboth{}{I. First chapter head}
\label{ch:un}

Foo bar

\chapter{Second chapter head}
\markboth{}{II. Second chapter head}
\label{ch:deux}

Which I compile with (I have removed a bunch of option in order to just isolate my problem) :
pandoc -o ebook.epub epub.tex --epub-metadata=metadata.xml --toc --toc-depth=2

The result of this is a render with my label name being displayed into brackets.
[ch:un]

My expectation is that the label is not displayed, but serves only anchors/links/navigation if a ref is defined pointing to it.

Can you suggest how I can achieve this result ?
I tried to look for this problem and found https://github.com/lierdakil/pandoc-crossref/issues/319 but to be honnest, I'm too much a pandoc newb to understand that thread. I have tried quite a number of suggestions (adding the LUA script, adding a similar yaml file, but this has changed nothing as far as my problem is concerned).

Cheers,

Vincent

--
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-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org<mailto:pandoc-discuss+unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org>.
To view this discussion on the web visit https://groups.google.com/d/msgid/pandoc-discuss/84cefde8-0943-43e2-8b7a-96efe6a0949cn%40googlegroups.com<https://groups.google.com/d/msgid/pandoc-discuss/84cefde8-0943-43e2-8b7a-96efe6a0949cn%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/c5aefee88458436f8ef800629a5c7686%40unibe.ch.

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

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

* Re: LateX to epub -- label rendering
       [not found]         ` <c5aefee88458436f8ef800629a5c7686-NSENcxR/0n0@public.gmane.org>
@ 2021-09-03 10:00           ` Vin Cent
       [not found]             ` <7a388540-5381-4e98-bda9-ebcac91a20a7n-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org>
  2021-09-06 16:28           ` AW: " John MacFarlane
  1 sibling, 1 reply; 10+ messages in thread
From: Vin Cent @ 2021-09-03 10:00 UTC (permalink / raw)
  To: pandoc-discuss


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

Hi Denis,

Thanks for your reply and suggestion.

markdown rendering goes as follows :

.

First chapter head
==================

[\[ch:un\]]{#ch:un label="ch:un"}

Foo bar

Second chapter head
===================

[\[ch:deux\]]{#ch:deux label="ch:deux"}


On Friday, September 3, 2021 at 11:21:39 AM UTC+2 denis...-NSENcxR/0n0@public.gmane.org wrote:

> Don’t really know much about epub, but what happens if you go to other 
> formats, say markdown? Or pandoc’s native format? That’s always really 
> helpful for debugging.
>
> Denis
>
>  
>
> *Von:* pandoc-...-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org <pandoc-...-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org> *Im 
> Auftrag von *Vin Cent
> *Gesendet:* Freitag, 3. September 2021 11:09
> *An:* pandoc-discuss <pandoc-...-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org>
> *Betreff:* LateX to epub -- label rendering
>
>  
>
> Hi,
>
>  
>
> I'm quite new to pandoc, with some experience in LateX.
>
> I'm trying to convert a book (\documentclass{memoir} ) into a epub 
> document.
>
>  
>
> I have been able to get something quite fine (thanks pandoc! this is 
> really amazing) but now I seem to be stuck on a detail.
>
>  
>
> Each chapter from my source starts with a label, such as :
>
>  
>
> \chapter{First chapter head}
>
> \markboth{}{I. First chapter head}
>
> \label{ch:un}
>
>  
>
> Foo bar
>
>  
>
> \chapter{Second chapter head}
>
> \markboth{}{II. Second chapter head}
>
> \label{ch:deux}
>
>  
>
> Which I compile with (I have removed a bunch of option in order to just 
> isolate my problem) :
>
> pandoc -o ebook.epub epub.tex --epub-metadata=metadata.xml --toc 
> --toc-depth=2
>
>  
>
> The result of this is a render with my label name being displayed into 
> brackets.
>
> [ch:un]
>
>  
>
> My expectation is that the label is not displayed, but serves only 
> anchors/links/navigation if a ref is defined pointing to it.
>
>  
>
> Can you suggest how I can achieve this result ?
>
> I tried to look for this problem and found 
> https://github.com/lierdakil/pandoc-crossref/issues/319 but to be 
> honnest, I'm too much a pandoc newb to understand that thread. I have tried 
> quite a number of suggestions (adding the LUA script, adding a similar yaml 
> file, but this has changed nothing as far as my problem is concerned).
>
>  
>
> Cheers,
>
>  
>
> Vincent
>
>  
>
> -- 
> 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/84cefde8-0943-43e2-8b7a-96efe6a0949cn%40googlegroups.com 
> <https://groups.google.com/d/msgid/pandoc-discuss/84cefde8-0943-43e2-8b7a-96efe6a0949cn%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/7a388540-5381-4e98-bda9-ebcac91a20a7n%40googlegroups.com.

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

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

* AW: LateX to epub -- label rendering
       [not found]             ` <7a388540-5381-4e98-bda9-ebcac91a20a7n-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org>
@ 2021-09-03 11:38               ` denis.maier-NSENcxR/0n0
       [not found]                 ` <0a0b065768ca449095035c65e5dabd6c-NSENcxR/0n0@public.gmane.org>
  0 siblings, 1 reply; 10+ messages in thread
From: denis.maier-NSENcxR/0n0 @ 2021-09-03 11:38 UTC (permalink / raw)
  To: pandoc-discuss-/JYPxA39Uh5TLH3MbocFFw

What happens if you remove \markboth? Shouldn't there be a mechanism to deal with this automatically?
________________________________________
Von: pandoc-discuss-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org <pandoc-discuss-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org> im Auftrag von Vin Cent <irakay17-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
Gesendet: Freitag, 3. September 2021 12:00:20
An: pandoc-discuss
Betreff: Re: LateX to epub -- label rendering

Hi Denis,

Thanks for your reply and suggestion.

markdown rendering goes as follows :

.

First chapter head
==================

[\[ch:un\]]{#ch:un label="ch:un"}

Foo bar

Second chapter head
===================

[\[ch:deux\]]{#ch:deux label="ch:deux"}


On Friday, September 3, 2021 at 11:21:39 AM UTC+2 denis...-NSENcxR/0n0@public.gmane.org wrote:
Don’t really know much about epub, but what happens if you go to other formats, say markdown? Or pandoc’s native format? That’s always really helpful for debugging.
Denis

Von: pandoc-...-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org <pandoc-...-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org> Im Auftrag von Vin Cent
Gesendet: Freitag, 3. September 2021 11:09
An: pandoc-discuss <pandoc-...-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org>
Betreff: LateX to epub -- label rendering

Hi,

I'm quite new to pandoc, with some experience in LateX.
I'm trying to convert a book (\documentclass{memoir} ) into a epub document.

I have been able to get something quite fine (thanks pandoc! this is really amazing) but now I seem to be stuck on a detail.

Each chapter from my source starts with a label, such as :

\chapter{First chapter head}
\markboth{}{I. First chapter head}
\label{ch:un}

Foo bar

\chapter{Second chapter head}
\markboth{}{II. Second chapter head}
\label{ch:deux}

Which I compile with (I have removed a bunch of option in order to just isolate my problem) :
pandoc -o ebook.epub epub.tex --epub-metadata=metadata.xml --toc --toc-depth=2

The result of this is a render with my label name being displayed into brackets.
[ch:un]

My expectation is that the label is not displayed, but serves only anchors/links/navigation if a ref is defined pointing to it.

Can you suggest how I can achieve this result ?
I tried to look for this problem and found https://github.com/lierdakil/pandoc-crossref/issues/319 but to be honnest, I'm too much a pandoc newb to understand that thread. I have tried quite a number of suggestions (adding the LUA script, adding a similar yaml file, but this has changed nothing as far as my problem is concerned).

Cheers,

Vincent

--
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/84cefde8-0943-43e2-8b7a-96efe6a0949cn%40googlegroups.com<https://groups.google.com/d/msgid/pandoc-discuss/84cefde8-0943-43e2-8b7a-96efe6a0949cn%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-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org<mailto:pandoc-discuss+unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org>.
To view this discussion on the web visit https://groups.google.com/d/msgid/pandoc-discuss/7a388540-5381-4e98-bda9-ebcac91a20a7n%40googlegroups.com<https://groups.google.com/d/msgid/pandoc-discuss/7a388540-5381-4e98-bda9-ebcac91a20a7n%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/0a0b065768ca449095035c65e5dabd6c%40unibe.ch.


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

* Re: LateX to epub -- label rendering
       [not found]                 ` <0a0b065768ca449095035c65e5dabd6c-NSENcxR/0n0@public.gmane.org>
@ 2021-09-03 12:02                   ` Vin Cent
  0 siblings, 0 replies; 10+ messages in thread
From: Vin Cent @ 2021-09-03 12:02 UTC (permalink / raw)
  To: pandoc-discuss


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

Hi,

Removing markboth removes the rendering I don't want to see.
And getting the \label to stick to \chapter, (\markboth goes under \label) 
provides exactly what I need.

Thanks. This is enough for me to stop asking :)

Vincent


On Friday, September 3, 2021 at 1:38:26 PM UTC+2 denis...-NSENcxR/0n0@public.gmane.org wrote:

> What happens if you remove \markboth? Shouldn't there be a mechanism to 
> deal with this automatically?
> ________________________________________
> Von: pandoc-...-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org <pandoc-...-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org> im Auftrag 
> von Vin Cent <irak...-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
> Gesendet: Freitag, 3. September 2021 12:00:20
> An: pandoc-discuss
> Betreff: Re: LateX to epub -- label rendering
>
> Hi Denis,
>
> Thanks for your reply and suggestion.
>
> markdown rendering goes as follows :
>
> .
>
> First chapter head
> ==================
>
> [\[ch:un\]]{#ch:un label="ch:un"}
>
> Foo bar
>
> Second chapter head
> ===================
>
> [\[ch:deux\]]{#ch:deux label="ch:deux"}
>
>
> On Friday, September 3, 2021 at 11:21:39 AM UTC+2 denis...-NSENcxR/0n0@public.gmane.org wrote:
> Don’t really know much about epub, but what happens if you go to other 
> formats, say markdown? Or pandoc’s native format? That’s always really 
> helpful for debugging.
> Denis
>
> Von: pandoc-...-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org <pandoc-...-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org> Im Auftrag 
> von Vin Cent
> Gesendet: Freitag, 3. September 2021 11:09
> An: pandoc-discuss <pandoc-...-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org>
> Betreff: LateX to epub -- label rendering
>
> Hi,
>
> I'm quite new to pandoc, with some experience in LateX.
> I'm trying to convert a book (\documentclass{memoir} ) into a epub 
> document.
>
> I have been able to get something quite fine (thanks pandoc! this is 
> really amazing) but now I seem to be stuck on a detail.
>
> Each chapter from my source starts with a label, such as :
>
> \chapter{First chapter head}
> \markboth{}{I. First chapter head}
> \label{ch:un}
>
> Foo bar
>
> \chapter{Second chapter head}
> \markboth{}{II. Second chapter head}
> \label{ch:deux}
>
> Which I compile with (I have removed a bunch of option in order to just 
> isolate my problem) :
> pandoc -o ebook.epub epub.tex --epub-metadata=metadata.xml --toc 
> --toc-depth=2
>
> The result of this is a render with my label name being displayed into 
> brackets.
> [ch:un]
>
> My expectation is that the label is not displayed, but serves only 
> anchors/links/navigation if a ref is defined pointing to it.
>
> Can you suggest how I can achieve this result ?
> I tried to look for this problem and found 
> https://github.com/lierdakil/pandoc-crossref/issues/319 but to be 
> honnest, I'm too much a pandoc newb to understand that thread. I have tried 
> quite a number of suggestions (adding the LUA script, adding a similar yaml 
> file, but this has changed nothing as far as my problem is concerned).
>
> Cheers,
>
> Vincent
>
> --
> 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/84cefde8-0943-43e2-8b7a-96efe6a0949cn%40googlegroups.com
> <
> https://groups.google.com/d/msgid/pandoc-discuss/84cefde8-0943-43e2-8b7a-96efe6a0949cn%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...-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org<mailto:
> pandoc-discus...-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org>.
> To view this discussion on the web visit 
> https://groups.google.com/d/msgid/pandoc-discuss/7a388540-5381-4e98-bda9-ebcac91a20a7n%40googlegroups.com
> <
> https://groups.google.com/d/msgid/pandoc-discuss/7a388540-5381-4e98-bda9-ebcac91a20a7n%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/53b2b5c9-985e-4a38-9884-c58b97bf0adfn%40googlegroups.com.

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

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

* Re: LateX to epub -- label rendering
       [not found]     ` <84cefde8-0943-43e2-8b7a-96efe6a0949cn-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org>
  2021-09-03  9:21       ` AW: " denis.maier-NSENcxR/0n0
@ 2021-09-03 16:36       ` John MacFarlane
       [not found]         ` <m2ilzhobts.fsf-jF64zX8BO0+FqBokazbCQ6OPv3vYUT2dxr7GGTnW70NeoWH0uzbU5w@public.gmane.org>
  1 sibling, 1 reply; 10+ messages in thread
From: John MacFarlane @ 2021-09-03 16:36 UTC (permalink / raw)
  To: Vin Cent, pandoc-discuss


I'm guessing you're not using the most recent version of pandoc?
(2.14.2)  If not, try upgrading.


Vin Cent <irakay17-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> writes:

> Hi,
>
> I'm quite new to pandoc, with some experience in LateX.
> I'm trying to convert a book (\documentclass{memoir} ) into a epub document.
>
> I have been able to get something quite fine (thanks pandoc! this is really 
> amazing) but now I seem to be stuck on a detail.
>
> Each chapter from my source starts with a label, such as :
>
> \chapter{First chapter head}
> \markboth{}{I. First chapter head}
> \label{ch:un}
>
> Foo bar
>
> \chapter{Second chapter head}
> \markboth{}{II. Second chapter head}
> \label{ch:deux}
>
> Which I compile with (I have removed a bunch of option in order to just 
> isolate my problem) :
> pandoc -o ebook.epub epub.tex --epub-metadata=metadata.xml --toc 
> --toc-depth=2
>
> The result of this is a render with my label name being displayed into 
> brackets.
> [ch:un]
>
> My expectation is that the label is not displayed, but serves only 
> anchors/links/navigation if a ref is defined pointing to it.
>
> Can you suggest how I can achieve this result ?
> I tried to look for this problem and 
> found https://github.com/lierdakil/pandoc-crossref/issues/319 but to be 
> honnest, I'm too much a pandoc newb to understand that thread. I have tried 
> quite a number of suggestions (adding the LUA script, adding a similar yaml 
> file, but this has changed nothing as far as my problem is concerned).
>
> Cheers,
>
> Vincent
>
> -- 
> 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/84cefde8-0943-43e2-8b7a-96efe6a0949cn%40googlegroups.com.


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

* Re: LateX to epub -- label rendering
       [not found]         ` <m2ilzhobts.fsf-jF64zX8BO0+FqBokazbCQ6OPv3vYUT2dxr7GGTnW70NeoWH0uzbU5w@public.gmane.org>
@ 2021-09-06  5:10           ` Vin Cent
       [not found]             ` <0e877773-9a0a-4b4d-8f8b-b2d3f62d9fc6n-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org>
  0 siblings, 1 reply; 10+ messages in thread
From: Vin Cent @ 2021-09-06  5:10 UTC (permalink / raw)
  To: pandoc-discuss


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

For the record, your guess is correct. I'm using debian unstable's version, 
which is currently 2.9.2.1.


On Friday, September 3, 2021 at 6:37:03 PM UTC+2 John MacFarlane wrote:

>
> I'm guessing you're not using the most recent version of pandoc?
> (2.14.2) If not, try upgrading.
>
>
> Vin Cent <irak...-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> writes:
>
> > Hi,
> >
> > I'm quite new to pandoc, with some experience in LateX.
> > I'm trying to convert a book (\documentclass{memoir} ) into a epub 
> document.
> >
> > I have been able to get something quite fine (thanks pandoc! this is 
> really 
> > amazing) but now I seem to be stuck on a detail.
> >
> > Each chapter from my source starts with a label, such as :
> >
> > \chapter{First chapter head}
> > \markboth{}{I. First chapter head}
> > \label{ch:un}
> >
> > Foo bar
> >
> > \chapter{Second chapter head}
> > \markboth{}{II. Second chapter head}
> > \label{ch:deux}
> >
> > Which I compile with (I have removed a bunch of option in order to just 
> > isolate my problem) :
> > pandoc -o ebook.epub epub.tex --epub-metadata=metadata.xml --toc 
> > --toc-depth=2
> >
> > The result of this is a render with my label name being displayed into 
> > brackets.
> > [ch:un]
> >
> > My expectation is that the label is not displayed, but serves only 
> > anchors/links/navigation if a ref is defined pointing to it.
> >
> > Can you suggest how I can achieve this result ?
> > I tried to look for this problem and 
> > found https://github.com/lierdakil/pandoc-crossref/issues/319 but to be 
> > honnest, I'm too much a pandoc newb to understand that thread. I have 
> tried 
> > quite a number of suggestions (adding the LUA script, adding a similar 
> yaml 
> > file, but this has changed nothing as far as my problem is concerned).
> >
> > Cheers,
> >
> > Vincent
> >
> > -- 
> > 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/84cefde8-0943-43e2-8b7a-96efe6a0949cn%40googlegroups.com
> .
>

-- 
You received this message because you are subscribed to the Google Groups "pandoc-discuss" group.
To unsubscribe from this group and stop receiving emails from it, send an email to pandoc-discuss+unsubscribe-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org
To view this discussion on the web visit https://groups.google.com/d/msgid/pandoc-discuss/0e877773-9a0a-4b4d-8f8b-b2d3f62d9fc6n%40googlegroups.com.

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

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

* Re: LateX to epub -- label rendering
       [not found]             ` <0e877773-9a0a-4b4d-8f8b-b2d3f62d9fc6n-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org>
@ 2021-09-06  5:15               ` Vin Cent
       [not found]                 ` <5f5cf592-c5cb-42b9-89dd-e718519d57e6n-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org>
  0 siblings, 1 reply; 10+ messages in thread
From: Vin Cent @ 2021-09-06  5:15 UTC (permalink / raw)
  To: pandoc-discuss


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

I have tried the static version of pandoc distributed on the website (so 
this is now pandoc 2.14.2).
For the record, the same problem still shows up with this version.
However, this is no big deal for me, as I have an easy and unintrusive fix 
by simply changing line order of my .tex source

On Monday, September 6, 2021 at 7:10:00 AM UTC+2 Vin Cent wrote:

> For the record, your guess is correct. I'm using debian unstable's 
> version, which is currently 2.9.2.1.
>
>
> On Friday, September 3, 2021 at 6:37:03 PM UTC+2 John MacFarlane wrote:
>
>>
>> I'm guessing you're not using the most recent version of pandoc?
>> (2.14.2) If not, try upgrading.
>>
>>
>> Vin Cent <irak...-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> writes:
>>
>> > Hi,
>> >
>> > I'm quite new to pandoc, with some experience in LateX.
>> > I'm trying to convert a book (\documentclass{memoir} ) into a epub 
>> document.
>> >
>> > I have been able to get something quite fine (thanks pandoc! this is 
>> really 
>> > amazing) but now I seem to be stuck on a detail.
>> >
>> > Each chapter from my source starts with a label, such as :
>> >
>> > \chapter{First chapter head}
>> > \markboth{}{I. First chapter head}
>> > \label{ch:un}
>> >
>> > Foo bar
>> >
>> > \chapter{Second chapter head}
>> > \markboth{}{II. Second chapter head}
>> > \label{ch:deux}
>> >
>> > Which I compile with (I have removed a bunch of option in order to just 
>> > isolate my problem) :
>> > pandoc -o ebook.epub epub.tex --epub-metadata=metadata.xml --toc 
>> > --toc-depth=2
>> >
>> > The result of this is a render with my label name being displayed into 
>> > brackets.
>> > [ch:un]
>> >
>> > My expectation is that the label is not displayed, but serves only 
>> > anchors/links/navigation if a ref is defined pointing to it.
>> >
>> > Can you suggest how I can achieve this result ?
>> > I tried to look for this problem and 
>> > found https://github.com/lierdakil/pandoc-crossref/issues/319 but to 
>> be 
>> > honnest, I'm too much a pandoc newb to understand that thread. I have 
>> tried 
>> > quite a number of suggestions (adding the LUA script, adding a similar 
>> yaml 
>> > file, but this has changed nothing as far as my problem is concerned).
>> >
>> > Cheers,
>> >
>> > Vincent
>> >
>> > -- 
>> > 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/84cefde8-0943-43e2-8b7a-96efe6a0949cn%40googlegroups.com
>> .
>>
>

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

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

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

* Re: LateX to epub -- label rendering
       [not found]                 ` <5f5cf592-c5cb-42b9-89dd-e718519d57e6n-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org>
@ 2021-09-06 16:25                   ` John MacFarlane
  0 siblings, 0 replies; 10+ messages in thread
From: John MacFarlane @ 2021-09-06 16:25 UTC (permalink / raw)
  To: Vin Cent, pandoc-discuss


The LaTeX reader will do some resolution of labels/references,
but in your case the intervening `\markboth` seems to be messing
it up.  See what happens when that is removed:

% pandoc -f latex -t html  
\chapter{First chapter}\label{ch:un}

Foo bar

See chapter \ref{ch:un}
^D
<h1 id="ch:un">First chapter</h1>
<p>Foo bar</p>
<p>See chapter <a href="#ch:un" data-reference-type="ref" data-reference="ch:un">1</a></p>

This is something that could be improved, if you'd like to
create a bug report.

Vin Cent <irakay17-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> writes:

> I have tried the static version of pandoc distributed on the website (so 
> this is now pandoc 2.14.2).
> For the record, the same problem still shows up with this version.
> However, this is no big deal for me, as I have an easy and unintrusive fix 
> by simply changing line order of my .tex source
>
> On Monday, September 6, 2021 at 7:10:00 AM UTC+2 Vin Cent wrote:
>
>> For the record, your guess is correct. I'm using debian unstable's 
>> version, which is currently 2.9.2.1.
>>
>>
>> On Friday, September 3, 2021 at 6:37:03 PM UTC+2 John MacFarlane wrote:
>>
>>>
>>> I'm guessing you're not using the most recent version of pandoc?
>>> (2.14.2) If not, try upgrading.
>>>
>>>
>>> Vin Cent <irak...-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> writes:
>>>
>>> > Hi,
>>> >
>>> > I'm quite new to pandoc, with some experience in LateX.
>>> > I'm trying to convert a book (\documentclass{memoir} ) into a epub 
>>> document.
>>> >
>>> > I have been able to get something quite fine (thanks pandoc! this is 
>>> really 
>>> > amazing) but now I seem to be stuck on a detail.
>>> >
>>> > Each chapter from my source starts with a label, such as :
>>> >
>>> > \chapter{First chapter head}
>>> > \markboth{}{I. First chapter head}
>>> > \label{ch:un}
>>> >
>>> > Foo bar
>>> >
>>> > \chapter{Second chapter head}
>>> > \markboth{}{II. Second chapter head}
>>> > \label{ch:deux}
>>> >
>>> > Which I compile with (I have removed a bunch of option in order to just 
>>> > isolate my problem) :
>>> > pandoc -o ebook.epub epub.tex --epub-metadata=metadata.xml --toc 
>>> > --toc-depth=2
>>> >
>>> > The result of this is a render with my label name being displayed into 
>>> > brackets.
>>> > [ch:un]
>>> >
>>> > My expectation is that the label is not displayed, but serves only 
>>> > anchors/links/navigation if a ref is defined pointing to it.
>>> >
>>> > Can you suggest how I can achieve this result ?
>>> > I tried to look for this problem and 
>>> > found https://github.com/lierdakil/pandoc-crossref/issues/319 but to 
>>> be 
>>> > honnest, I'm too much a pandoc newb to understand that thread. I have 
>>> tried 
>>> > quite a number of suggestions (adding the LUA script, adding a similar 
>>> yaml 
>>> > file, but this has changed nothing as far as my problem is concerned).
>>> >
>>> > Cheers,
>>> >
>>> > Vincent
>>> >
>>> > -- 
>>> > 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/84cefde8-0943-43e2-8b7a-96efe6a0949cn%40googlegroups.com
>>> .
>>>
>>
>
> -- 
> You received this message because you are subscribed to the Google Groups "pandoc-discuss" group.
> To unsubscribe from this group and stop receiving emails from it, send an email to pandoc-discuss+unsubscribe-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org
> To view this discussion on the web visit https://groups.google.com/d/msgid/pandoc-discuss/5f5cf592-c5cb-42b9-89dd-e718519d57e6n%40googlegroups.com.


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

* Re: AW: LateX to epub -- label rendering
       [not found]         ` <c5aefee88458436f8ef800629a5c7686-NSENcxR/0n0@public.gmane.org>
  2021-09-03 10:00           ` Vin Cent
@ 2021-09-06 16:28           ` John MacFarlane
  1 sibling, 0 replies; 10+ messages in thread
From: John MacFarlane @ 2021-09-06 16:28 UTC (permalink / raw)
  To: denis.maier-NSENcxR/0n0, pandoc-discuss-/JYPxA39Uh5TLH3MbocFFw


Note also that you could use a filter to remove or change this:

The label gets parsed as

Span ("ch:un",[],[("label","ch:un")]) [Str "[ch:un]"]

And the reference as

Link ("",[],[("reference-type","ref"),("reference","ch:un")])
[Str "[ch:un]"] ("#ch:un","")]

A simple Lua filter could be used to match Span elements with
attribute "label" and remove their contents; this would make
[ch:un] disappear but retain an empty span with the label.


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

end of thread, other threads:[~2021-09-06 16:28 UTC | newest]

Thread overview: 10+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
     [not found] <AQHXoKNoYEHAej8q7UWdpdbA8+V+mauSCKOg///pkQCAADx/1g==>
     [not found] ` <AQHXoKNoYEHAej8q7UWdpdbA8+V+mauSCKOg>
2021-09-03  9:09   ` LateX to epub -- label rendering Vin Cent
     [not found]     ` <84cefde8-0943-43e2-8b7a-96efe6a0949cn-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org>
2021-09-03  9:21       ` AW: " denis.maier-NSENcxR/0n0
     [not found]         ` <c5aefee88458436f8ef800629a5c7686-NSENcxR/0n0@public.gmane.org>
2021-09-03 10:00           ` Vin Cent
     [not found]             ` <7a388540-5381-4e98-bda9-ebcac91a20a7n-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org>
2021-09-03 11:38               ` AW: " denis.maier-NSENcxR/0n0
     [not found]                 ` <0a0b065768ca449095035c65e5dabd6c-NSENcxR/0n0@public.gmane.org>
2021-09-03 12:02                   ` Vin Cent
2021-09-06 16:28           ` AW: " John MacFarlane
2021-09-03 16:36       ` John MacFarlane
     [not found]         ` <m2ilzhobts.fsf-jF64zX8BO0+FqBokazbCQ6OPv3vYUT2dxr7GGTnW70NeoWH0uzbU5w@public.gmane.org>
2021-09-06  5:10           ` Vin Cent
     [not found]             ` <0e877773-9a0a-4b4d-8f8b-b2d3f62d9fc6n-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org>
2021-09-06  5:15               ` Vin Cent
     [not found]                 ` <5f5cf592-c5cb-42b9-89dd-e718519d57e6n-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org>
2021-09-06 16:25                   ` John MacFarlane

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).