From mboxrd@z Thu Jan 1 00:00:00 1970 X-Msuck: nntp://news.gmane.io/gmane.text.pandoc/26255 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: "'Karl Weber' via pandoc-discuss" Newsgroups: gmane.text.pandoc Subject: Re: How to specify number-offset? Date: Mon, 28 Sep 2020 12:10:31 -0700 (PDT) Message-ID: References: <200b15bc-f323-487e-b39d-e6be8845eacan@googlegroups.com> <1c0310ae-6348-4ba6-8d9d-746aab5e0c09n@googlegroups.com> Reply-To: pandoc-discuss-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="----=_Part_32_1218008198.1601320231625" Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="16420"; mail-complaints-to="usenet@ciao.gmane.io" To: pandoc-discuss Original-X-From: pandoc-discuss+bncBCSM5U75QMDBBKHKZD5QKGQEEDLZTUY-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org Mon Sep 28 21:10:36 2020 Return-path: Envelope-to: gtp-pandoc-discuss@m.gmane-mx.org Original-Received: from mail-oi1-f192.google.com ([209.85.167.192]) by ciao.gmane.io with esmtps (TLS1.3:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.92) (envelope-from ) id 1kMyXk-000481-F8 for gtp-pandoc-discuss@m.gmane-mx.org; Mon, 28 Sep 2020 21:10:36 +0200 Original-Received: by mail-oi1-f192.google.com with SMTP id k7sf524287oif.22 for ; Mon, 28 Sep 2020 12:10:36 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=googlegroups.com; s=20161025; h=date:from:to:message-id:in-reply-to:references:subject:mime-version :x-original-sender:reply-to:precedence:mailing-list:list-id :list-post:list-help:list-archive:list-subscribe:list-unsubscribe; bh=NZ893o5DakhHwPjRpgXy18h2e4BmW9bcfnai7xbyB1E=; b=LYOIy6bQOv9J1Grtk/ldxPke2yW2LC8D1rtmNFHCSljAQZsZ7u8sSE0PzAcO5IF/JO U6KwSdxEYQy7HLwH7rCS6+VrsSKLit1Dw6hf5s2YZPXrO8RbKjSf0YizSH8tSx8WG6DC LVQmY5ERDML3x8y6lPUTF6CuinMNqhUkew078DNBkNanfB4kT+Wy6wdKX8iVRuVBlptP HMsGXevaWfTgg2mrtpskLViDdOFhLToSf3NNKp/Qox0b+cx3/+8I4Fy446p1ss6JagIQ dbzPazvnwrWMgz50yZ6Dp7wb2aQI7HAfURThwxpH04ajkeuykfXRJa2tpG12pVL6ENrJ 0m4w== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:date:from:to:message-id:in-reply-to:references :subject:mime-version:x-original-sender:reply-to:precedence :mailing-list:list-id:x-spam-checked-in-group:list-post:list-help :list-archive:list-subscribe:list-unsubscribe; bh=NZ893o5DakhHwPjRpgXy18h2e4BmW9bcfnai7xbyB1E=; b=jNJnUbRh3vbYma8AUy46HrnhrfdXDhGIQ8H7lzjMbOLtPMIzCBSvDfjoFS4hMHzarv lF7eqlVRw1v5xXntex5qXi61ErNXmx6oWlC/cjlvllGnxm5JOnuyTAQoWeam61qhVNmt LRg8ayrGPhxXPUH5ZtMaCZQHs5xY/EFPOMpcwUEUrz4jr7ApyXxEy+WWSo22f0ASAAk5 JHMIXF/e0sGg9QQ/OI9Lhp3fBTgycN454pRc/JVT7/mCn7a1W+DsZyZGOe4dAzVXUoCK gUKu0IHibdY3ZGr0ADz2okqr+iHRcg44V9xYWNFGANbD3gmXPaBfYHT23KXpveHVJKNH Mytw== X-Gm-Message-State: AOAM531XP556CRJoFcsNs0qf0/n3JGgi4vgGeVhwwZbu8fZ7vTdGLSyy 1owNfAS0UeNJmkziE0KFKlU= X-Google-Smtp-Source: ABdhPJz/RqL2CefeKDRHkSI0JI+FRTTntTUpD8Ad6vtXd2iUG2NCsOiUinZDZo45OsxkLH+rII7mng== X-Received: by 2002:a4a:3ec6:: with SMTP id t189mr1857976oot.23.1601320235397; Mon, 28 Sep 2020 12:10:35 -0700 (PDT) X-BeenThere: pandoc-discuss-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org Original-Received: by 2002:a9d:6a86:: with SMTP id l6ls512241otq.11.gmail; Mon, 28 Sep 2020 12:10:32 -0700 (PDT) X-Received: by 2002:a9d:718a:: with SMTP id o10mr317496otj.262.1601320232328; Mon, 28 Sep 2020 12:10:32 -0700 (PDT) In-Reply-To: X-Original-Sender: karl.weber99-gM/Ye1E23mwN+BqQ9rBEUg@public.gmane.org X-Original-From: Karl Weber Precedence: list Mailing-list: list pandoc-discuss-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org; contact pandoc-discuss+owners-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org List-ID: X-Google-Group-Id: 1007024079513 List-Post: , List-Help: , List-Archive: , List-Unsubscribe: , Xref: news.gmane.io gmane.text.pandoc:26255 Archived-At: ------=_Part_32_1218008198.1601320231625 Content-Type: multipart/alternative; boundary="----=_Part_33_1869120276.1601320231625" ------=_Part_33_1869120276.1601320231625 Content-Type: text/plain; charset="UTF-8" Hi John, thanks, this should solve the --number-offset problem. Hence, I could close this thread, if I would know how :) Nevertheless, now I am getting hooked on writing my own custom writer, or at least to understand how it would work. This brings me back to my questions in my previous post in this thread. Can I find some more documentation, should I open another thread for these questions or how should I procceed? Thanks again in advance! Karl John MacFarlane schrieb am Montag, 28. September 2020 um 21:02:48 UTC+2: > > I wouldn't use a custom writer for this. > > An easier approach would be to use a wrapper shell script. > The script would peek into the markdown file, find the > setting for --number-offset, and call pandoc with the > same arguments as the shell script PLUS the relevant > --number-offset. > > > "'Karl Weber' via pandoc-discuss" > writes: > > > Hi John, > > > > thank you for your answer. I would think it should be possible to do > that > > with my own custom writer (in Lua). Is that right? > > > > If so, how much work would it be? My starting point would be the > sample.lua > > obtained though the command > > > > pandoc --print-default-data-file sampla.lua > > > > Is there an easier way to do this? How close is this sample.lua to what > > pandoc is doing for output format html5? I.e. how much would I have to > add > > to sample.lua? Is it only my desired functionality or are there more > > differences? (I am using, for instance, --toc and --sections-div, which > > does not seem to be part of the sample.lua...) I did't find > > template-processing as well, but I am just starting to learn how to > build > > my own custom writer... > > > > Im am using pandoc 2.10.1 > > > > This solution (if feasible) would have the advantage, that I could add > more > > functionality I am currently missing (there may indeed be one or two > > things), but it would also have the disadvantage, that I would have to > > adapt my own custom writer, whenever pandoc evolves. However, this > should > > only be necessary if the datamodel of pandoc is changing, or isn't it? I > am > > still undecided. > > > > Thanks in advance > > Karl > > > > John MacFarlane schrieb am Montag, 28. September 2020 um 01:02:41 UTC+2: > > > >> > >> No, you can't specify it in YAML metadata. > >> > >> "'Karl Weber' via pandoc-discuss" > >> writes: > >> > >> > Hi, > >> > > >> > I do want to specify number-offset neither on the commandline of > pandoc > >> nor > >> > in the defaults yaml file. The reason is, that I have a project > >> consisting > >> > of a number of documents in markdown format, that I want to convert > to > >> > html5 using make. Hence I need to specify number-offset for each file > >> > individually. > >> > > >> > Is there some way to do this? > >> > > >> > I tried to specify it in a yaml block at the beginning of each file, > >> > something like the following: > >> > > >> > --- > >> > output: > >> > html_document: > >> > pandoc_args: [ > >> > "--number-offset=4,0" > >> > ] > >> > --- > >> > > >> > I tried different variations of this example, but none worked. Note, > >> that > >> > my input format ist pandoc markdown. > >> > > >> > It would be great, if something like that would work. I would > appreciate > >> > any help. > >> > > >> > Thanks in advance, > >> > Karl > >> > > >> > > >> > -- > >> > 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/200b15bc-f323-487e-b39d-e6be8845eacan%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-discus...-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org > > To view this discussion on the web visit > https://groups.google.com/d/msgid/pandoc-discuss/1c0310ae-6348-4ba6-8d9d-746aab5e0c09n%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/c8b8ecf4-1f85-497d-ad85-aedeb96a4f2an%40googlegroups.com. ------=_Part_33_1869120276.1601320231625 Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable
Hi John,

thanks, this should solve the --numb= er-offset problem. Hence, I could close this thread, if I would know how :)=

Nevertheless, now I am getting hooked on writing = my own custom writer, or at least to understand how it would work. This bri= ngs me back to my questions in my previous post in this thread. Can I find = some more documentation, should I open another thread for these questions o= r how should I procceed?

Thanks again in advance!<= /div>
Karl

John MacFarlane schrieb am Montag, 28. September 2020 um= 21:02:48 UTC+2:

I wouldn't use a custom writer for this.

An easier approach would be to use a wrapper shell script.
The script would peek into the markdown file, find the
setting for --number-offset, and call pandoc with the
same arguments as the shell script PLUS the relevant
--number-offset.


"'Karl Weber' via pandoc-discuss"
<pandoc-...@googlegroups.= com> writes:

> Hi John,
>
> thank you for your answer. I would think it should be possible to = do that=20
> with my own custom writer (in Lua). Is that right?
>
> If so, how much work would it be? My starting point would be the s= ample.lua=20
> obtained though the command
>
> pandoc --print-default-data-file sampla.lua
>
> Is there an easier way to do this? How close is this sample.lua to= what=20
> pandoc is doing for output format html5? I.e. how much would I hav= e to add=20
> to sample.lua? Is it only my desired functionality or are there mo= re=20
> differences? (I am using, for instance, --toc and --sections-div, = which=20
> does not seem to be part of the sample.lua...) I did't find=20
> template-processing as well, but I am just starting to learn how t= o build=20
> my own custom writer...=20
>
> Im am using pandoc 2.10.1
>
> This solution (if feasible) would have the advantage, that I could= add more=20
> functionality I am currently missing (there may indeed be one or t= wo=20
> things), but it would also have the disadvantage, that I would hav= e to=20
> adapt my own custom writer, whenever pandoc evolves. However, this= should=20
> only be necessary if the datamodel of pandoc is changing, or isn&#= 39;t it? I am=20
> still undecided.
>
> Thanks in advance
> Karl
>
> John MacFarlane schrieb am Montag, 28. September 2020 um 01:02:41 = UTC+2:
>
>>
>> No, you can't specify it in YAML metadata.=20
>>
>> "'Karl Weber' via pandoc-discuss"=20
>> <pandoc-...@goog= legroups.com> writes:=20
>>
>> > Hi,=20
>> >=20
>> > I do want to specify number-offset neither on the command= line of pandoc=20
>> nor=20
>> > in the defaults yaml file. The reason is, that I have a p= roject=20
>> consisting=20
>> > of a number of documents in markdown format, that I want = to convert to=20
>> > html5 using make. Hence I need to specify number-offset f= or each file=20
>> > individually.=20
>> >=20
>> > Is there some way to do this?=20
>> >=20
>> > I tried to specify it in a yaml block at the beginning of= each file,=20
>> > something like the following:=20
>> >=20
>> > ---=20
>> > output:=20
>> > html_document:=20
>> > pandoc_args: [=20
>> > "--number-offset=3D4,0"=20
>> > ]=20
>> > ---=20
>> >=20
>> > I tried different variations of this example, but none wo= rked. Note,=20
>> that=20
>> > my input format ist pandoc markdown.=20
>> >=20
>> > It would be great, if something like that would work. I w= ould appreciate=20
>> > any help.=20
>> >=20
>> > Thanks in advance,=20
>> > Karl=20
>> >=20
>> >=20
>> > --=20
>> > You received this message because you are subscribed to t= he Google=20
>> Groups "pandoc-discuss" group.=20
>> > To unsubscribe from this group and stop receiving emails = from it, send=20
>> an email to pandoc-= discus...-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org.=20
>> > To view this discussion on the web visit=20
>> https://groups.go= ogle.com/d/msgid/pandoc-discuss/200b15bc-f323-487e-b39d-e6be8845eacan%40goo= glegroups.com.=20
>>
>>
>
> --=20
> 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..= .@googlegroups.com.
> To view this discussion on the web visit https://groups.google.com/d/msgid/pandoc-discuss/1c03= 10ae-6348-4ba6-8d9d-746aab5e0c09n%40googlegroups.com.

--
You received this message because you are subscribed to the Google Groups &= quot;pandoc-discuss" group.
To unsubscribe from this group and stop receiving emails from it, send an e= mail to pand= oc-discuss+unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org.
To view this discussion on the web visit https://groups.google.com/d= /msgid/pandoc-discuss/c8b8ecf4-1f85-497d-ad85-aedeb96a4f2an%40googlegroups.= com.
------=_Part_33_1869120276.1601320231625-- ------=_Part_32_1218008198.1601320231625--