From mboxrd@z Thu Jan 1 00:00:00 1970 X-Msuck: nntp://news.gmane.io/gmane.text.pandoc/29603 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Alan Newsgroups: gmane.text.pandoc Subject: Re: Automaticly creating bibliography in md? Date: Wed, 24 Nov 2021 08:09:55 -0800 (PST) Message-ID: <14327db1-9d76-448b-a4ae-e11a74cccc37n@googlegroups.com> References: <504e0de4e201441ea14525b281bba30c@unibe.ch> <77539b7686aa450cb87fb3ec489410e0@unibe.ch> <5bec2468-843a-4196-ada8-7b42200dc2d6n@googlegroups.com> <5676cd49db054de980fb31d2f3fda9b4@unibe.ch> <7181c39d-c239-4a63-bbae-800bc4d8b523n@googlegroups.com> Reply-To: pandoc-discuss-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="----=_Part_2512_116267849.1637770195163" Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="17604"; mail-complaints-to="usenet@ciao.gmane.io" To: pandoc-discuss Original-X-From: pandoc-discuss+bncBCMOFOPUYUBBBVGH7GGAMGQE25EFEMY-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org Wed Nov 24 17:10:00 2021 Return-path: Envelope-to: gtp-pandoc-discuss@m.gmane-mx.org Original-Received: from mail-oi1-f190.google.com ([209.85.167.190]) by ciao.gmane.io with esmtps (TLS1.3:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.92) (envelope-from ) id 1mpuqN-0004Nz-N4 for gtp-pandoc-discuss@m.gmane-mx.org; Wed, 24 Nov 2021 17:09:59 +0100 Original-Received: by mail-oi1-f190.google.com with SMTP id r65-20020aca4444000000b002bce52a8122sf1769242oia.14 for ; Wed, 24 Nov 2021 08:09:59 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=googlegroups.com; s=20210112; h=sender: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=lWOfrLJ7+5NjZh95bXk8ZFg1bp8RvRr4quRRkQc1H4I=; b=RAOeba0yIAvVdTVxKNTfyZgzuDzLtl4+2LAS04LhkfDq4D0VRLj6wgHH5c477cvYi3 0HAEvWJG6Kxrrx+LYUmvZ1Y8+8c/zJIYpTFoehGAUxCxWg5loeWqCfY2jRxSah3WboE+ nj23CmhCwRsY2QxdNVwHn6KyAHubIXGj8p3uGaAykiWcseSBmqtrH4rzMdAGgleBqY8v 9NICAswbx9i9llYzUv3BfvosUO5PFr7AzkK/VkwVJT2v3H95RZA4/nRFcE6q08S5XANC I2IfgeOhTvRsJ8R5FR5PC+YLRw231W02ggc90j2iI2VnIbGfUPBPl2yE0+SOPfqNt55s LBkA== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; 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=lWOfrLJ7+5NjZh95bXk8ZFg1bp8RvRr4quRRkQc1H4I=; b=Zc3XCEPi7dZhJwGA9Gjh07YaAu40EcDQH/KQbzKoULTh2EEZ/Mr65biYIp+0L/ISI6 LKG36lLYYd0KUCJZGjNyVUNo1FnGpcGS1wvOtbVA2yfK1zewqR3HpZAbM6WLKp+FP2ga XqwPyK3p3PAW/U4vfGo3xgSkoM0/Ipv8NxBKM9yRRHVHiE2XXT5C/PCtE+emzsIje9s+ 6Lt21/ykZ70uSiPWNkspJg3EXiOFgtTZLMNP0M7B5tUQO3CqG6/7S4cN6RKgXlPKviKK NWKbMWZUpzNdXzfgMncTzC9mkm1PSVG5+StJI+KZ7XNCEIBUf2VgkvP6qDjtRXbOclqm /qUA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=sender: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=lWOfrLJ7+5NjZh95bXk8ZFg1bp8RvRr4quRRkQc1H4I=; b=f+mjuxXVZzACf3q199UJxuntlvnpecqos4KCdgJSDzmDTrb63lbhlVA7DStoBAn/qW aL2o+wmpHRjyd++DPyszwVKip23zBpWuPc1+tYLJs2t+2IjyIhdh4iMxskPfN1Jnj+OV EaCxbMlSH+PD2LpuWhGK9u/Nmj6CNDVBeRUCwoKCxx22JZ/bPmVSZK4Itn78CJczzua9 aehrbu4TkW+3VkvwcgbcGL43RTAA4kiOToX6iRYJQKCgN+C+xXYT442g1q2pNAKx8jdT 86PNn9KI9x9jC0NRvKEK17NzZNk1TMifnF3cnWFrtTB7SPhJkwcFvrGq3Eqew2F4JA1c Uk2g== Original-Sender: pandoc-discuss-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org X-Gm-Message-State: AOAM531qoTCRxCqGeRuOrPV78IGWdGJqdEHM+MFcEnIQVeqaQJj2twJn Xf6DWa99IZSio1oKGxfwjfs= X-Google-Smtp-Source: ABdhPJwSYEwth0wULmgRIseOtscRz1dLWcNTD+pepWAnUC7wu3j8QNms5xO+FDw1BKp/2pnL1zCmDg== X-Received: by 2002:aca:a941:: with SMTP id s62mr7170645oie.87.1637770197605; Wed, 24 Nov 2021 08:09:57 -0800 (PST) X-BeenThere: pandoc-discuss-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org Original-Received: by 2002:aca:3108:: with SMTP id x8ls38432oix.11.gmail; Wed, 24 Nov 2021 08:09:56 -0800 (PST) X-Received: by 2002:a05:6808:1aa8:: with SMTP id bm40mr7099533oib.38.1637770195827; Wed, 24 Nov 2021 08:09:55 -0800 (PST) In-Reply-To: X-Original-Sender: omvvardar-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org 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:29603 Archived-At: ------=_Part_2512_116267849.1637770195163 Content-Type: multipart/alternative; boundary="----=_Part_2513_2016244321.1637770195163" ------=_Part_2513_2016244321.1637770195163 Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable Thank you! Obviously, I will need lua filter... Which I have no idea how to= =20 make :-) Well I'll try search and replace in all files from=20 Sublime/VSCodium.=20 On Wednesday, November 24, 2021 at 10:06:03 AM UTC+1 denis...-NSENcxR/0n0@public.gmane.org=20 wrote: > See this discussion:=20 > https://groups.google.com/g/pandoc-discuss/c/GfcNA_zCdzc/m/uT3Ivc4aCgAJ > > =20 > > *Von:* Maier, Denis Christian (UB)=20 > *Gesendet:* Mittwoch, 24. November 2021 10:01 > *An:* 'pandoc-...-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org' > *Betreff:* AW: Automaticly creating bibliography in md? > > =20 > > You could probably devise a simple lua-filter for this. But maybe there= =E2=80=99s=20 > an easier solution. > > =20 > > *Von:* pandoc-...-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org *Im=20 > Auftrag von *denis...-NSENcxR/0n0@public.gmane.org > *Gesendet:* Mittwoch, 24. November 2021 10:00 > *An:* pandoc-...-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org > *Betreff:* AW: Automaticly creating bibliography in md? > > =20 > > You mean wiki-style links [[20200719191401]] being transformed to this:= =20 > \[\[20200719191401\]\]? > > =20 > > I don=E2=80=99t have a solution for this. > > =20 > > Maybe someone knows how escaping of brackets can be suppressed when going= =20 > from markdown to markdown ? > > =20 > > Denis > > =20 > > *Von:* pandoc-...-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org *Im=20 > Auftrag von *Alan > *Gesendet:* Dienstag, 23. November 2021 16:14 > *An:* pandoc-discuss > *Betreff:* Re: Automaticly creating bibliography in md? > > =20 > > Thank you for your patience Denis. > > =20 > > Finally, I have references in file, but... It messed my zettel links...= =20 > :-(=20 > > I dont care how references look, I just need them at the end > > =20 > > =20 > > On Tuesday, November 23, 2021 at 3:09:05 PM UTC+1 denis...-NSENcxR/0n0@public.gmane.org wrote= : > > Ok. Take this input file: > > =20 > > ``` > > --- > > author: DM > > title: Test > > date: 18-Jul-2020 > > references: > > - type: article-journal > > id: WatsonCrick1953 > > author: > > - family: Watson > > given: J. D. > > - family: Crick > > given: F. H. C. > > issued: > > date-parts: > > - - 1953 > > - 4 > > - 25 > > title: 'Molecular structure of nucleic acids: a structure for > > deoxyribose nucleic acid' > > title-short: Molecular structure of nucleic acids > > container-title: Nature > > volume: 171 > > issue: 4356 > > page: 737-738 > > DOI: 10.1038/171737a0 > > URL: https://www.nature.com/articles/171737a0 > > language: en-GB > > --- > > =20 > > bla bla [@WatsonCrick1953, 5] > > ``` > > =20 > > Convert with=20 > > pandoc inputfile.md -o outputfile.md =E2=80=93citeproc -t markdown-citati= ons > > gives me : > > =20 > > ``` > > --- > > author: DM > > date: 18-Jul-2020 > > references: > > - author: > > - family: Watson > > given: J. D. > > - family: Crick > > given: F. H. C. > > container-title: Nature > > DOI: 10.1038/171737a0 > > id: WatsonCrick1953 > > issue: 4356 > > issued: > > date-parts: > > - - 1953 > > - 4 > > - 25 > > language: en-GB > > page: 737-738 > > title: "Molecular structure of nucleic acids: a structure for > > deoxyribose nucleic acid" > > title-short: Molecular structure of nucleic acids > > type: article-journal > > URL: https://www.nature.com/articles/171737a0 > > volume: 171 > > title: Test > > --- > > =20 > > bla bla (Watson and Crick 1953, 5) > > =20 > > ::: {#refs .references .csl-bib-body .hanging-indent} > > ::: {#ref-WatsonCrick1953 .csl-entry} > > Watson, J. D., and F. H. C. Crick. 1953. "Molecular Structure of Nucleic > > Acids: A Structure for Deoxyribose Nucleic Acid." *Nature* 171 (4356): > > 737--38. https://doi.org/10.1038/171737a0. > > ::: > > ::: > > ``` > > =20 > > Denis > > =20 > > =20 > > *Von:* pandoc-...-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org *Im=20 > Auftrag von *denis...-NSENcxR/0n0@public.gmane.org > *Gesendet:* Dienstag, 23. November 2021 15:03 > *An:* pandoc-...-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org > *Betreff:* AW: Automaticly creating bibliography in md? > > =20 > > Not sure, but the xml is your style file.=20 > > Can only guess since I don=E2=80=99t have your bibfile, but maybe the com= mand line=20 > arguments were a bit messed up : > > pandoc inputfile.md -o inputfile.md --csl sage-harvard.csl --citeproc -t= =20 > markdown-citations > > Add a =3D between --csl and the style =3D> --csl=3Dsage-harvard.csl > > Or, can also just omit the style since you have that in your markdown=20 > files anyway. > > =20 > > But, if you want the bibliography to appear like in your sublime example,= =20 > you=E2=80=99ll need to use a filter for this. > > =20 > > Denis > > =20 > > =20 > > *Von:* pandoc-...-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org *Im=20 > Auftrag von *Alan > *Gesendet:* Dienstag, 23. November 2021 14:09 > *An:* pandoc-discuss > *Betreff:* Re: Automaticly creating bibliography in md? > > =20 > > =20 > > Sure. > > I noticed that my yaml is missing. The same file, before this command,=20 > produce normal pdf and word output > > =20 > > Note: sublime.md is the same note I generated auto bibliography in ST > > On Tuesday, November 23, 2021 at 1:48:33 PM UTC+1 denis...-NSENcxR/0n0@public.gmane.org wrote= : > > Can you post a real example? > > =20 > > *Von:* pandoc-...-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org *Im=20 > Auftrag von *Alan > *Gesendet:* Dienstag, 23. November 2021 13:45 > *An:* pandoc-discuss > *Betreff:* Re: Automaticly creating bibliography in md? > > =20 > > I am afraid I miss something here. I try the command, ad receive huge xml= =20 > code in the end + my citation is like this > > =20 > > \[@alexanderTheoryCulturalTrauma2004, 1\] > > =20 > > > P.S. : Why do you use reference-doc here? You=E2=80=99re converting fro= m=20 > markdown to markdown.=20 > > My bad, I just copy from my docx command :-) > > =20 > > On Tuesday, November 23, 2021 at 10:35:25 AM UTC+1 denis...-NSENcxR/0n0@public.gmane.org=20 > wrote: > > Well, IIUC, pandoc works from an input file to an output file.=20 > > If you have your references in your metadata you can probably just do=20 > this : > > =20 > > pandoc inputfile.md -o inputfile.md =E2=80=93csl sage-harvard.csl =E2=80= =93citeproc -t=20 > markdown-citations > > =20 > > (The important part is `-t markdown-citations`. That=E2=80=99s a big=20 > counter-intuitive : It does not mean =C2=AB give me a markdown file witho= ut=20 > citations=C2=BB , but rather =C2=AB give me a markdown file without the c= itations=20 > extension, i.e., with citations being resolved =C2=BB.) > > =20 > > If that does not work, convert to a temp file first, then rename. You can= =20 > automate the process with a script or makefile. > > =20 > > Denis > > =20 > > P.S. : Why do you use reference-doc here? You=E2=80=99re converting from = markdown=20 > to markdown. > > =20 > > =20 > > *Von:* pandoc-...-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org *Im=20 > Auftrag von *Alan > *Gesendet:* Dienstag, 23. November 2021 10:28 > *An:* pandoc-discuss > *Betreff:* Re: Automaticly creating bibliography in md? > > =20 > > I know (and use) this command > > =20 > > pandoc --reference-doc my-reference.docx -s text1.md --citeproc --csl=20 > sage-harvard.csl -o text2.md > > =20 > > and my bib file is referenced in YAML head.=20 > > The question is how to achieve to have bibliography in SAME file I am=20 > working with? > > I have an animated gif in imgur to show the process, but google doesn't= =20 > let me post link, message is automatically deleted. > > =20 > > On Tuesday, November 23, 2021 at 10:11:59 AM UTC+1 denis...-NSENcxR/0n0@public.gmane.org=20 > wrote: > > You will need to specify your reference library, of course. > > --bibliography=3Dyou_bibfile.bib > > =20 > > *Von:* pandoc-...-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org *Im=20 > Auftrag von *denis...-NSENcxR/0n0@public.gmane.org > *Gesendet:* Dienstag, 23. November 2021 10:11 > *An:* pandoc-...-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org > *Betreff:* AW: Automaticly creating bibliography in md? > > =20 > > Sure, you can convert from markdown to markdown with resolved citations. > > =20 > > pandoc inputfile.md -o outputfile-md -C -t markdown-citations > > =20 > > Denis > > =20 > > *Von:* pandoc-...-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org *Im=20 > Auftrag von *Alan > *Gesendet:* Dienstag, 23. November 2021 10:08 > *An:* pandoc-discuss > *Betreff:* Automaticly creating bibliography in md? > > =20 > > Hi, > > In sublime_zk package for Sublime Text, you can create auto bibliography= =20 > from citations in document and place it at the end of current .md documen= t.=20 > Is it possible to do that with command or some script, which can be=20 > executed in Windows 10 :-) > > Thanks > > --=20 > You received this message because you are subscribed to the Google Groups= =20 > "pandoc-discuss" group. > To unsubscribe from this group and stop receiving emails from it, send an= =20 > email to pandoc-discus...-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org > To view this discussion on the web visit=20 > https://groups.google.com/d/msgid/pandoc-discuss/ac73582b-8acc-469a-94ff-= 38160275d4a1n%40googlegroups.com=20 > > . > > --=20 > You received this message because you are subscribed to the Google Groups= =20 > "pandoc-discuss" group. > To unsubscribe from this group and stop receiving emails from it, send an= =20 > email to pandoc-discus...-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org > > To view this discussion on the web visit=20 > https://groups.google.com/d/msgid/pandoc-discuss/504e0de4e201441ea14525b2= 81bba30c%40unibe.ch=20 > > . > > --=20 > You received this message because you are subscribed to the Google Groups= =20 > "pandoc-discuss" group. > To unsubscribe from this group and stop receiving emails from it, send an= =20 > email to pandoc-discus...-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org > > To view this discussion on the web visit=20 > https://groups.google.com/d/msgid/pandoc-discuss/ab3295e2-0e57-459f-a626-= 84b632f02ef6n%40googlegroups.com=20 > > . > > --=20 > You received this message because you are subscribed to the Google Groups= =20 > "pandoc-discuss" group. > To unsubscribe from this group and stop receiving emails from it, send an= =20 > email to pandoc-discus...-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org > > To view this discussion on the web visit=20 > https://groups.google.com/d/msgid/pandoc-discuss/a24adbdb-f2ef-4bbc-8199-= 5aab0bee653cn%40googlegroups.com=20 > > . > > --=20 > You received this message because you are subscribed to the Google Groups= =20 > "pandoc-discuss" group. > To unsubscribe from this group and stop receiving emails from it, send an= =20 > email to pandoc-discus...-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org > To view this discussion on the web visit=20 > https://groups.google.com/d/msgid/pandoc-discuss/5bec2468-843a-4196-ada8-= 7b42200dc2d6n%40googlegroups.com=20 > > . > > --=20 > You received this message because you are subscribed to the Google Groups= =20 > "pandoc-discuss" group. > To unsubscribe from this group and stop receiving emails from it, send an= =20 > email to pandoc-discus...-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org > > To view this discussion on the web visit=20 > https://groups.google.com/d/msgid/pandoc-discuss/5676cd49db054de980fb31d2= f3fda9b4%40unibe.ch=20 > > . > > --=20 > You received this message because you are subscribed to the Google Groups= =20 > "pandoc-discuss" group. > To unsubscribe from this group and stop receiving emails from it, send an= =20 > email to pandoc-discus...-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org > To view this discussion on the web visit=20 > https://groups.google.com/d/msgid/pandoc-discuss/7181c39d-c239-4a63-bbae-= 800bc4d8b523n%40googlegroups.com=20 > > . > > --=20 > You received this message because you are subscribed to the Google Groups= =20 > "pandoc-discuss" group. > To unsubscribe from this group and stop receiving emails from it, send an= =20 > email to pandoc-discus...-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org > To view this discussion on the web visit=20 > https://groups.google.com/d/msgid/pandoc-discuss/bb5a3b682ae748a09280ba75= cb8b05c3%40unibe.ch=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 e= mail 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/14327db1-9d76-448b-a4ae-e11a74cccc37n%40googlegroups.com. ------=_Part_2513_2016244321.1637770195163 Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable
Thank you! Obviously, I will need lua filter... Which I have no idea h= ow to make :-)  Well I'll try search and replace in all files from Sub= lime/VSCodium.


On Wednesday, November 24, 2021 at 10:06= :03 AM UTC+1 denis...-NSENcxR/0n0@public.gmane.org wrote:

=C2=A0

Von: Maier, Denis Christian (UB)
Gesendet: Mittwoch, 24. November 2021 10:01
An: 'pandoc-...@googl= egroups.com' <pandoc-= ...@googlegroups.com>
Betreff: AW: Automaticly creating bibliography in md?<= /span>

=C2=A0

You could probably devise a sim= ple lua-filter for this. But maybe there=E2=80=99s an easier solution.

=C2=A0

Von: pandoc-...-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org <pandoc-...-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org> Im Auftrag von denis...@u= nibe.ch
Gesendet: Mittwoch, 24. November 2021 10:00
An: pandoc-...@googlegrou= ps.com
Betreff: AW: Automaticly creating bibliography in md?<= /span>

=C2=A0

You mean wiki-style links [[20200719191401]] b= eing transformed to this: \[\[20200719191401\]\]?

=C2=A0

I don=E2=80=99t have a solution= for this.

=C2=A0

Maybe someone knows how escapin= g of brackets can be suppressed when going from markdown to markdown=C2=A0?=

=C2=A0

Denis

=C2=A0

Von: pandoc-...-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org <pandoc-...-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org> Im Auftrag von Alan
Gesendet: Dienstag, 23. November 2021 16:14
An: pandoc-discuss <pa= ndoc-...-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org>
Betreff: Re: Automaticly creating bibliography in md?<= /span>

=C2=A0

Thank you for your patience Denis.

=C2=A0

Finally, I have references in file, but... It messed= my zettel links... :-(

I dont care how references look, I just need them at= the end

=C2=A0

=C2=A0

On Tuesday, November 23, 2021 at 3:09:05 PM UTC+1 denis...-NSENcxR/0n0@public.gmane.org wrote:

Ok. Take this input file:

=C2=A0

```

---

author: DM=

title: Test

date: 18-Jul-2020=

references:

- type: article-journal<= u>

=C2=A0 id: WatsonCrick1953

=C2=A0 author:

=C2=A0 - family: Watson

=C2=A0=C2=A0=C2=A0 given: J. D.

=C2=A0 - family: Crick

=C2=A0=C2=A0=C2=A0 given: F. H. C.

=C2=A0 issued:

=C2=A0=C2=A0=C2=A0 date-parts:<= /span>

=C2=A0=C2=A0=C2=A0 - - 1953

=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 = - 4

=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 = - 25

=C2=A0 title: 'Molecular st= ructure of nucleic acids: a structure for

=C2=A0 =C2=A0=C2=A0deoxyribose = nucleic acid'

=C2=A0 title-short: Molecular s= tructure of nucleic acids

=C2=A0 container-title: Nature<= /span>

=C2=A0 volume: 171

=C2=A0 issue: 4356

=C2=A0 page: 737-738<= /u>

=C2=A0 DOI: 10.1038/171737a0

=C2=A0 URL: https://www.nature.com/articles/171737a0

=C2=A0 language: en-GB

---

=C2=A0

bla bla=C2=A0 [@WatsonCrick1953= , 5]

```

=C2=A0

Convert with

pandoc inputfile.md -o outputfi= le.md =E2=80=93citeproc -t markdown-citations

gives me=C2=A0:

=C2=A0

```

---

author: DM

date: 18-Jul-2020

references:

- author:

=C2=A0 - family: Watson

=C2=A0=C2=A0=C2=A0 given: J. D.

=C2=A0 - family: Crick

=C2=A0=C2=A0=C2=A0 given: F. H. C.

=C2=A0 container-title: Nature

=C2=A0 DOI: 10.1038/171737a0

=C2=A0 id: WatsonCrick1953

=C2=A0 issue: 4356

=C2=A0 issued:=

=C2=A0=C2=A0=C2=A0 date-parts:<= /span>

=C2=A0=C2=A0=C2=A0 - - 1953

=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 = - 4

=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 = - 25

=C2=A0 language: en-GB

=C2=A0 page: 737-738<= /u>

=C2=A0 title: "Molecular s= tructure of nucleic acids: a structure for

=C2=A0=C2=A0=C2=A0 deoxyribose = nucleic acid"

=C2=A0 title-short: Molecular s= tructure of nucleic acids

=C2=A0 type: article-journal

=C2=A0 URL: https://w= ww.nature.com/articles/171737a0

=C2=A0 volume: 171

title: Test

---

=C2=A0

bla bla (Watson and Crick 1953,= 5)

=C2=A0

::: {#refs .references .csl-bib-body .hanging-indent= }

::: {#ref-WatsonCrick1953 .csl-entry}<= /p>

Watson, J. D., and F. H. C. Crick. 1953. "Molecular Structure of Nucleic

Acids: A Structure for Deoxyrib= ose Nucleic Acid." *Nature* 171 (4356):

737--38. https://doi.org/10.1038/1717= 37a0.

:::

:::

```

=C2=A0

Denis

=C2=A0

=C2=A0

Von: pandoc-...-/JYPxA39Uh4Ykp1iOSErHA@public.gmane.org= m <pandoc-..= .@googlegroups.com> Im Auftrag von deni= s...-NSENcxR/0n0@public.gmane.org
Gesendet: Dienstag, 23. November 2021 15:03
An: pandoc-...@goog= legroups.com
Betreff: AW: Automaticly creating bibliography in md?
<= u>

=C2=A0

Not sure, but the xml is your s= tyle file.

Can only guess since I don=E2= =80=99t have your bibfile, but maybe the command line arguments were a bit = messed up=C2=A0:

pandoc inputfile.md -o inputfil= e.md --csl sage-harvard.csl --citeproc -t markdown-citations<= u>

Add a =3D between --csl and the= style =3D> --csl=3Dsage-harvard.csl

Or, can also just omit the styl= e since you have that in your markdown files anyway.

=C2=A0

But, if you want the bibliograp= hy to appear like in your sublime example, you=E2=80=99ll need to use a fil= ter for this.

=C2=A0

Denis

=C2=A0

=C2=A0

Von: pandoc-...-/JYPxA39Uh4Ykp1iOSErHA@public.gmane.org= m <pandoc-..= .@googlegroups.com> Im Auftrag von Alan
Gesendet: Dienstag, 23. November 2021 14:09
An: pandoc-discuss <pandoc-...-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org>
Betreff: Re: Automaticly creating bibliography in md?
<= u>

=C2=A0

=C2=A0

Sure.

I noticed that my yaml is missing. The same file, be= fore this command, produce normal pdf and word output

=C2=A0

Note: sublime.md is the same note I generated auto b= ibliography in ST

On Tuesday, November 23, 2021 at 1:48:33 PM UTC+1 denis...-NSENcxR/0n0@public.gmane.org wrote:

Can you post a real example?

=C2=A0

Von: pandoc-...-/JYPxA39Uh4Ykp1iOSErHA@public.gmane.org= m <pandoc-..= .@googlegroups.com> Im Auftrag von Alan
Gesendet: Dienstag, 23. November 2021 13:45
An: pandoc-discuss <pandoc-...-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org>
Betreff: Re: Automaticly creating bibliography in md?
<= u>

=C2=A0

I am afraid I miss something here. I try the command= , ad receive huge xml code in the end + my citation is like this<= /u>

=C2=A0

\[@alexanderTheoryCulturalTrauma2004, 1\]<= /u>

=C2=A0

> P.S.=C2=A0: Why do you use reference-doc here? = You=E2=80=99re converting from markdown to markdown.

My bad, I just copy from my docx command :-)<= u>

=C2=A0

On Tuesday, November 23, 2021 at 10:35:25 AM UTC+1 denis...-NSENcxR/0n0@public.gmane.org wrote:

Well, IIUC, pandoc works from an input file to an ou= tput file.

If you have your references in = your metadata you can probably just do this=C2=A0:

=C2=A0

pandoc inputfile.md -o inputfil= e.md =E2=80=93csl sage-harvard.csl =E2=80=93citeproc -t markdown-citations<= /span>

=C2=A0

(The important part is `-t mark= down-citations`. That=E2=80=99s a big counter-intuitive=C2=A0: It does not = mean =C2=AB=C2=A0give me a markdown file without citations=C2=BB , but rath= er =C2=AB=C2=A0give me a markdown file without the citations extension, i.e., with citations b= eing resolved=C2=A0=C2=BB.)

=C2=A0

If that does not work, convert = to a temp file first, then rename. You can automate the process with a scri= pt or makefile.

=C2=A0

Denis

=C2=A0

P.S.=C2=A0: Why do you use reference-doc here? You= =E2=80=99re converting from markdown to markdown.

=C2=A0

=C2=A0

Von: pandoc-...-/JYPxA39Uh4Ykp1iOSErHA@public.gmane.org= m <pandoc-..= .@googlegroups.com> Im Auftrag von Alan
Gesendet: Dienstag, 23. November 2021 10:28
An: pandoc-discuss <pandoc-...-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org>
Betreff: Re: Automaticly creating bibliography in md?
<= u>

=C2=A0

I know (and use) this command

=C2=A0

pandoc --reference-doc my-reference.docx -s text1.md= --citeproc --csl sage-harvard.csl -o text2.md

=C2=A0

and my bib file is referenced in YAML head.

The question is how to achieve to have bibliography = in SAME file I am working with?

I have an animated gif in imgur to show the process,= but google doesn't let me post link, message is automatically deleted.=

=C2=A0

On Tuesday, November 23, 2021 at 10:11:59 AM UTC+1 denis...-NSENcxR/0n0@public.gmane.org wrote:

You will need to specify your r= eference library, of course.

--bibliography=3Dyou_bibfile.bi= b

=C2=A0

Von: pandoc-...-/JYPxA39Uh4Ykp1iOSErHA@public.gmane.org= m <pandoc-..= .@googlegroups.com> Im Auftrag von deni= s...-NSENcxR/0n0@public.gmane.org
Gesendet: Dienstag, 23. November 2021 10:11
An: pandoc-...@goog= legroups.com
Betreff: AW: Automaticly creating bibliography in md?
<= u>

=C2=A0

Sure, you can convert from mark= down to markdown with resolved citations.

=C2=A0

pandoc inputfile.md -o outputfi= le-md -C -t markdown-citations

=C2=A0

Denis

=C2=A0

Von: pandoc-...-/JYPxA39Uh4Ykp1iOSErHA@public.gmane.org= m <pandoc-..= .@googlegroups.com> Im Auftrag von Alan
Gesendet: Dienstag, 23. November 2021 10:08
An: pandoc-discuss <pandoc-...-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org>
Betreff: Automaticly creating bibliography in md?

=C2=A0

Hi,

In sublime_zk package for Sublime Text, you can crea= te auto bibliography from citations in document and place it at the end of = current .md document. Is it possible to do that with command or some script, which can be executed in Windows 10 :-)<= /u>

Thanks

--
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 pandoc-discus...@googlegro= ups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/pandoc-discuss/ac73582b-8acc-469a-94ff-38= 160275d4a1n%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 pandoc-discus...@googlegro= ups.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 pandoc-discus...@googlegro= ups.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 pandoc-discus...@googlegro= ups.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 pandoc-discus...@googlegro= ups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/pandoc-discuss/5bec2468-843a-4196-ada8-7b= 42200dc2d6n%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 pandoc-discus...@googlegro= ups.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 pandoc-discus...-/JYPxA39Uh4Ykp1iOSErHA@public.gmane.org= m.
To view this discussion on the web visit https://groups.google.com/d/msgid/pandoc-discuss/7181c39d-c239-4a63-bbae-80= 0bc4d8b523n%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 pandoc-discus...-/JYPxA39Uh4Ykp1iOSErHA@public.gmane.org= m.
To view this discussion on the web visit https://groups.google.com/d/msgid/pandoc-discuss/bb5a3b682ae748a09280ba75cb= 8b05c3%40unibe.ch.

--
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/14327db1-9d76-448b-a4ae-e11a74cccc37n%40googlegroups.= com.
------=_Part_2513_2016244321.1637770195163-- ------=_Part_2512_116267849.1637770195163--