public inbox archive for pandoc-discuss@googlegroups.com
 help / color / mirror / Atom feed
* law student with no lambda experience
@ 2020-10-30 13:18 Alejandro
       [not found] ` <f65dbd8f-a756-43ff-b773-3d208f797095n-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org>
  0 siblings, 1 reply; 5+ messages in thread
From: Alejandro @ 2020-10-30 13:18 UTC (permalink / raw)
  To: pandoc-discuss


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

Hi everybody!
I am just a law student, my computer-science level is medium-low.
I am trying to make my own legal epubs for reading on bus or library.
I have found Pandoc and I felt in love with it! But I have a few problems 
now...

I have a .md file like this:
*% Name of act*

*% Name of ruler*
*% Date of publication*
*Article XX.*
*1. Lorem ipsum...*
*a) ...*

*b) ...*
*2. ...*

I would like to convert this markdown files to an .epub but Pandoc changes 
my headings!

If I export to .html (pandoc -s law.md -o law.html) I get:
*1. Lorem ipsum...*
*a) ...*

*b) ...*
*2. ...* (Perfect and beautiful!)

If I export to .pdf (pandoc -s law.md -o law.pdf) I get:
*1. Lorem ipsum...*
*a) ...*

*b) ...*
*2. ...* (Perfect and beautiful but heavy!)

However if I export to .epub (pandoc -s law.md -o law.epub) I get:
*1. Lorem ipsum...*
*a) ...*

*b) ...*
*1. ...* (why this??? Pandoc restarts heading after sub-level??)

I have Pandoc 2.11, Debian 4.9 and Bash 4.4
I have read some tutorials and blogs and tried some solutions but I can't 
fix this.
Thanks a lot!

-- 
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/f65dbd8f-a756-43ff-b773-3d208f797095n%40googlegroups.com.

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

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

* Re: law student with no lambda experience
       [not found] ` <f65dbd8f-a756-43ff-b773-3d208f797095n-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org>
@ 2020-10-30 14:31   ` Pablo Rodríguez
       [not found]     ` <23ad38f8-f371-2a73-f3b6-ab570b4863fa-S0/GAf8tV78@public.gmane.org>
  0 siblings, 1 reply; 5+ messages in thread
From: Pablo Rodríguez @ 2020-10-30 14:31 UTC (permalink / raw)
  To: pandoc-discuss-/JYPxA39Uh5TLH3MbocFFw

On 10/30/20 2:18 PM, Alejandro wrote:
> Hi everybody!
> I am just a law student, my computer-science level is medium-low.
> I am trying to make my own legal epubs for reading on bus or library.
> I have found Pandoc and I felt in love with it! But I have a few
> problems now...
> [...]
Hi Alejandro,

I use Fedora and pandoc-2.7.3. I think there must be something weird in
your file.

Test the following samples:

Source Markdown file (saved as act.md):

```
% Act
% Congress
% 2020

## Section 1

1. Lorem ipsum...
    a) ...
    b) ...
2. ...
```

Invocation command for pandoc:

  pandoc -o act.epub act.md

I get the right thing. And even if pandoc would restart a new list, it
would have to start from 2 (since this is the number in your code).

But you probably wrote `1. ...` as the last line in your sample.

How could you restart a new list? By adding a paragraph between items,
which stops a list and starts a new list.

Test the sample above adding the following list at the end of the code
(in both cases, don’t forget to remove the "```" markings for code):

```
1. Lorem ipsum...
    a) ...
    b) ...

paragraph that breaks the list

5. ...
```

The list after the paragraph should start from 5, not from 1.

I hope it helps,

Pablo

PS: if you deal with Spanish law, https://www.boe.es is your friend.
--
http://www.ousia.tk

-- 
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/23ad38f8-f371-2a73-f3b6-ab570b4863fa%40web.de.


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

* Re: law student with no lambda experience
       [not found]     ` <23ad38f8-f371-2a73-f3b6-ab570b4863fa-S0/GAf8tV78@public.gmane.org>
@ 2020-10-30 17:57       ` Alejandro
       [not found]         ` <55730f4a-d324-4587-90c8-30d99bb38242n-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org>
  0 siblings, 1 reply; 5+ messages in thread
From: Alejandro @ 2020-10-30 17:57 UTC (permalink / raw)
  To: pandoc-discuss


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

Thanks a lot for answering me, Pablo! (The only one, jajaja)

I don't know what to do... I have revised the .md file ten times and I have 
written 1. a) b) 2. 3. but Pandoc changes 2 with 1 again!! :(
In fact I have opened at least twenty new files, jajaja all the times the 
same weird thing happens to my .epub

It doesn't matter the number I write under b) Pandoc always changes it to 1 
:(
Maybe there is an internal option in Pandoc, I am reading the man page of 
Pandoc...

El viernes, 30 de octubre de 2020 a las 15:31:20 UTC+1, ousia escribió:

> On 10/30/20 2:18 PM, Alejandro wrote:
> > Hi everybody!
> > I am just a law student, my computer-science level is medium-low.
> > I am trying to make my own legal epubs for reading on bus or library.
> > I have found Pandoc and I felt in love with it! But I have a few
> > problems now...
> > [...]
> Hi Alejandro,
>
> I use Fedora and pandoc-2.7.3. I think there must be something weird in
> your file.
>
> Test the following samples:
>
> Source Markdown file (saved as act.md):
>
> ```
> % Act
> % Congress
> % 2020
>
> ## Section 1
>
> 1. Lorem ipsum...
> a) ...
> b) ...
> 2. ...
> ```
>
> Invocation command for pandoc:
>
> pandoc -o act.epub act.md
>
> I get the right thing. And even if pandoc would restart a new list, it
> would have to start from 2 (since this is the number in your code).
>
> But you probably wrote `1. ...` as the last line in your sample.
>
> How could you restart a new list? By adding a paragraph between items,
> which stops a list and starts a new list.
>
> Test the sample above adding the following list at the end of the code
> (in both cases, don’t forget to remove the "```" markings for code):
>
> ```
> 1. Lorem ipsum...
> a) ...
> b) ...
>
> paragraph that breaks the list
>
> 5. ...
> ```
>
> The list after the paragraph should start from 5, not from 1.
>
> I hope it helps,
>
> Pablo
>
> PS: if you deal with Spanish law, https://www.boe.es is your friend.
> --
> http://www.ousia.tk
>

-- 
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/55730f4a-d324-4587-90c8-30d99bb38242n%40googlegroups.com.

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

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

* Re: law student with no lambda experience
       [not found]         ` <55730f4a-d324-4587-90c8-30d99bb38242n-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org>
@ 2020-10-30 18:03           ` Alejandro
       [not found]             ` <24e1e9f2-e957-4c80-8eff-437618e7c59fn-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org>
  0 siblings, 1 reply; 5+ messages in thread
From: Alejandro @ 2020-10-30 18:03 UTC (permalink / raw)
  To: pandoc-discuss


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

I have found the solution... Tachaaaan!! The problem was not Pandoc but my 
markdown syntax!! Jajaja
I had written:
1....
a)...
b)...
2...
3...

But reading a short tutorial about lists in Markdown I have found I MUST 
use tabs!!! Stupid law student...
1...
tabulator a)
tabulator b)
2...
3...

Now Pandoc doesn't restart the list, after b) Pandoc writes a beautiful 2!! 
Jajaja
Thanks a lot Pablo! Yes, Boe is my friend, my only friend. I am trying to 
pass an "oposición" to Hacienda.
I will visit your Bitácora, I promise!
El viernes, 30 de octubre de 2020 a las 18:57:38 UTC+1, Alejandro escribió:

> Thanks a lot for answering me, Pablo! (The only one, jajaja)
>
> I don't know what to do... I have revised the .md file ten times and I 
> have written 1. a) b) 2. 3. but Pandoc changes 2 with 1 again!! :(
> In fact I have opened at least twenty new files, jajaja all the times the 
> same weird thing happens to my .epub
>
> It doesn't matter the number I write under b) Pandoc always changes it to 
> 1 :(
> Maybe there is an internal option in Pandoc, I am reading the man page of 
> Pandoc...
>
> El viernes, 30 de octubre de 2020 a las 15:31:20 UTC+1, ousia escribió:
>
>> On 10/30/20 2:18 PM, Alejandro wrote: 
>> > Hi everybody! 
>> > I am just a law student, my computer-science level is medium-low. 
>> > I am trying to make my own legal epubs for reading on bus or library. 
>> > I have found Pandoc and I felt in love with it! But I have a few 
>> > problems now... 
>> > [...] 
>> Hi Alejandro, 
>>
>> I use Fedora and pandoc-2.7.3. I think there must be something weird in 
>> your file. 
>>
>> Test the following samples: 
>>
>> Source Markdown file (saved as act.md): 
>>
>> ``` 
>> % Act 
>> % Congress 
>> % 2020 
>>
>> ## Section 1 
>>
>> 1. Lorem ipsum... 
>> a) ... 
>> b) ... 
>> 2. ... 
>> ``` 
>>
>> Invocation command for pandoc: 
>>
>> pandoc -o act.epub act.md 
>>
>> I get the right thing. And even if pandoc would restart a new list, it 
>> would have to start from 2 (since this is the number in your code). 
>>
>> But you probably wrote `1. ...` as the last line in your sample. 
>>
>> How could you restart a new list? By adding a paragraph between items, 
>> which stops a list and starts a new list. 
>>
>> Test the sample above adding the following list at the end of the code 
>> (in both cases, don’t forget to remove the "```" markings for code): 
>>
>> ``` 
>> 1. Lorem ipsum... 
>> a) ... 
>> b) ... 
>>
>> paragraph that breaks the list 
>>
>> 5. ... 
>> ``` 
>>
>> The list after the paragraph should start from 5, not from 1. 
>>
>> I hope it helps, 
>>
>> Pablo 
>>
>> PS: if you deal with Spanish law, https://www.boe.es is your friend. 
>> -- 
>> http://www.ousia.tk 
>>
>

-- 
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/24e1e9f2-e957-4c80-8eff-437618e7c59fn%40googlegroups.com.

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

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

* Re: law student with no lambda experience
       [not found]             ` <24e1e9f2-e957-4c80-8eff-437618e7c59fn-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org>
@ 2020-10-31 15:55               ` Pablo Rodríguez
  0 siblings, 0 replies; 5+ messages in thread
From: Pablo Rodríguez @ 2020-10-31 15:55 UTC (permalink / raw)
  To: pandoc-discuss-/JYPxA39Uh5TLH3MbocFFw

On 10/30/20 7:03 PM, Alejandro wrote:
> [...]
> But reading a short tutorial about lists in Markdown I have found I MUST
> use tabs!!! Stupid law student...

Or properly, one needs four spaces to nest lists.

Your issue has nothing to do with intelligence. Computers have no mercy
with human mistakes or misunderstandings. They only follow instructions,
they don’t read your mind (from D. Knuth, “The TeXbook”, p. 9).

After all, this is the way of learning in practice.

> Now Pandoc doesn't restart the list, after b) Pandoc writes a beautiful
> 2!! Jajaja

You started a new list from 2. But if you don’t indent the second-level
list, how could pandoc know that the list is a second-level one?

> Thanks a lot Pablo! Yes, Boe is my friend, my only friend. I am trying
> to pass an "oposición" to Hacienda.

I mean, take the «Ley General Tributaria»
(https://www.boe.es/buscar/act.php?id=BOE-A-2003-23186). With the
“consolidated texts” you always have the newest version.

From those “consolidated versions”, BOE also provides PDF and ePub
versions (in this case,
https://www.boe.es/buscar/pdf/2003/BOE-A-2003-23186-consolidado.pdf and
https://www.boe.es/buscar/epub/2003/BOE-A-2003-23186-consolidado.epub).

I wouldn’t invest my time converting what is already generated as ePub
(they are fine editions).

Best luck with your study,

Pablo
--
http://www.ousia.tk

-- 
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/c05bd560-3811-353e-6ed0-ee73e83c1985%40web.de.


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

end of thread, other threads:[~2020-10-31 15:55 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-10-30 13:18 law student with no lambda experience Alejandro
     [not found] ` <f65dbd8f-a756-43ff-b773-3d208f797095n-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org>
2020-10-30 14:31   ` Pablo Rodríguez
     [not found]     ` <23ad38f8-f371-2a73-f3b6-ab570b4863fa-S0/GAf8tV78@public.gmane.org>
2020-10-30 17:57       ` Alejandro
     [not found]         ` <55730f4a-d324-4587-90c8-30d99bb38242n-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org>
2020-10-30 18:03           ` Alejandro
     [not found]             ` <24e1e9f2-e957-4c80-8eff-437618e7c59fn-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org>
2020-10-31 15:55               ` Pablo Rodríguez

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