From mboxrd@z Thu Jan 1 00:00:00 1970 X-Msuck: nntp://news.gmane.io/gmane.text.pandoc/29583 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Newsgroups: gmane.text.pandoc Subject: AW: Automaticly creating bibliography in md? Date: Wed, 24 Nov 2021 08:59:59 +0000 Message-ID: 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/alternative; boundary="_000_bb5a3b682ae748a09280ba75cb8b05c3unibech_" Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="36263"; mail-complaints-to="usenet@ciao.gmane.io" To: Original-X-From: pandoc-discuss+bncBCZ27W53TUFBBE7666GAMGQEOHESODY-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org Wed Nov 24 10:00:07 2021 Return-path: Envelope-to: gtp-pandoc-discuss@m.gmane-mx.org Original-Received: from mail-lj1-f190.google.com ([209.85.208.190]) by ciao.gmane.io with esmtps (TLS1.3:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.92) (envelope-from ) id 1mpo8N-00098V-50 for gtp-pandoc-discuss@m.gmane-mx.org; Wed, 24 Nov 2021 10:00:07 +0100 Original-Received: by mail-lj1-f190.google.com with SMTP id b16-20020a2ebc10000000b00218d00045c4sf585622ljf.5 for ; Wed, 24 Nov 2021 01:00:07 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1637744406; cv=pass; d=google.com; s=arc-20160816; b=iA7zEVyzcNunvEyJc/Meh/oUvy/Kc4QcqxlAbVjWiQ6tt02sz+Ozlt+0P90CD/nhI8 PEx1wy7eZbVoKikj3o4irwR6Uyi0cnnZ05sFneJIJUzWanoL2dw2zYj+YLbLqjy6N3kd VFvz8+RBZSHG82vcc3vBEIgrsSYo9WZOIIh2KP/1Ng5SD7QiH37kK8qVtD9vhWuVyzbu cB7FM91hfg9ABMYrtYMOav66u3L8Ha6mqPEX/l0PQUDHHZR2rpGB2daOoqGeNHGED32F Kg0vVymJdWO7yspKY5dG615sdrOhaXc4ADUrdYrcFuxR3oE4NW1kbsscwuAjpvDH5o4A GOLg== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-unsubscribe:list-subscribe:list-archive:list-help:list-post :list-id:mailing-list:precedence:reply-to:mime-version :content-language:accept-language:in-reply-to:references:message-id :date:thread-index:thread-topic:subject:to:from:sender :dkim-signature; bh=G34O7e8FRIwFmZpLIjBBCIXp0ma9dDocevBaBMQlsTQ=; b=yP9R8uyS/s6bWCdoM0nrfIASCgURCsMYpdl7D50poxrrg+ya3EAgkhvGh6V7gpzpeL B2OuyNnJpGtUiC0tNRyy7NYiQuYv9C9S5AjfheKqNaPhM0lBq6F3VW5S0yoSXwX7c3Yr mDd2rHvm3IIova5qVxQvuyJOLuAA6osLJggPgPQUawbQvf50C86ZxcUlbtMXAG/w86Ia UA2RZVSyuIdlczC/X+FzVGGBGQa6pOufAHWFG3tEBkGiNufdWUKSiIEW83ShY+GXwlFT rgr6c4rVE+3zBplHtBxL0WVBMoNQlgvVeOOgJLZDO9majMZ0WgEG1Vjkcc4NFKAm9BrU PfYw== ARC-Authentication-Results: i=2; gmr-mx.google.com; spf=pass (google.com: domain of denis.maier-NSENcxR/0n0@public.gmane.org designates 130.92.0.84 as permitted sender) smtp.mailfrom=denis.maier-NSENcxR/0n0@public.gmane.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=unibe.ch DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=googlegroups.com; s=20210112; h=sender:from:to:subject:thread-topic:thread-index:date:message-id :references:in-reply-to:accept-language:content-language :mime-version:x-original-sender:x-original-authentication-results :reply-to:precedence:mailing-list:list-id:list-post:list-help :list-archive:list-subscribe:list-unsubscribe; bh=G34O7e8FRIwFmZpLIjBBCIXp0ma9dDocevBaBMQlsTQ=; b=SqKSA9ILRxa7t1/RGd77sld5Ry9tr47se5ncxmsaMp+5GnjefGeVNg+d6OyLRvXVP2 HF8I4zt/W5/IkXUWyRDT9Mkq9TKLeEIXf8dEs/iL92to0wNMfhW9WaaIUq28Npe2IZ7i PUTZQ8altgdEz86pMS1fa0Z4KFJ1Ql8bB2uU0Ex+d/shxv/i4TBWy6z/jKrbGelhoMAw +NOvXB7eHNDGk3Xq11ohvWDF48iQ2LTcEyFlKeJNWWYwU0RWS+YC08hBKfifbWnPPXzJ GJSmq7Yck7r5NMI0FiB/aFaziqVjm0pD06dr+1JZwx+IeTkRa+GKCo3jDbg3zrGv/DMm MWpQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=sender:x-gm-message-state:from:to:subject:thread-topic:thread-index :date:message-id:references:in-reply-to:accept-language :content-language:mime-version:x-original-sender :x-original-authentication-results:reply-to:precedence:mailing-list :list-id:x-spam-checked-in-group:list-post:list-help:list-archive :list-subscribe:list-unsubscribe; bh=G34O7e8FRIwFmZpLIjBBCIXp0ma9dDocevBaBMQlsTQ=; b=b3AqdfXZoj2vl12WlwmMTOCYrbG+b90jteopP4RlL3gmqtkPGiPEbvDZ0zz34UBgFc /lPWlluU0czkWpV7RVSUmblZKdYpWRCChTJd7AL9iS6hEXQWEZa9CFO8cKlCo2oeWqtE GX2Zibx3YPin+H9BqG3C8JkvsgQawuNnw+sbksW7ZvlhelIiX3qJos1f1aDVYksShkQR iVX5in3s6mBKmaRLzdp/8zVVixCA3jiBYpgr1zmMSZiTY27KRiGvRAfFQZ3PBimEHqbU Rwv4enU1SYFhj5FjPBsX26haswNPNao Original-Sender: pandoc-discuss-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org X-Gm-Message-State: AOAM530nbxOI97xpEg+maqbyRttpQkyRH2Q0xWrKqtTtrMZwlNTzFw5y SHDGUfVYHav6vcIbio++1DI= X-Google-Smtp-Source: ABdhPJwokjJ0jFuLJ1TV8Lw7uYbMFj13FcDJB6O9CWZLy1y+WTEWKAR4cvkHsJE5ZGr0VzC5EHcvnA== X-Received: by 2002:a05:6512:4024:: with SMTP id br36mr12598406lfb.137.1637744406029; Wed, 24 Nov 2021 01:00:06 -0800 (PST) X-BeenThere: pandoc-discuss-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org Original-Received: by 2002:a05:6512:3499:: with SMTP id v25ls2030122lfr.0.gmail; Wed, 24 Nov 2021 01:00:03 -0800 (PST) X-Received: by 2002:a05:6512:30d:: with SMTP id t13mr12453024lfp.322.1637744403159; Wed, 24 Nov 2021 01:00:03 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1637744403; cv=none; d=google.com; s=arc-20160816; b=vTvsOHZNShLb08nY2TUq75tBUWs7U5ZK8wxVJ6VG7UKEVauQ16RNP2W1XOg+vFpPfD 1GChhoiR7b6xorCrUfsrrBbuLPV6zSg9gCUN9/0vZRKwszF0IU3mghnmsalGpqsmKjcW VMmgZM21SYdPSuQ+QzeSbMaqeJNBjDAhPO8dt3pLrwZ/PYssu2TUDD01eIwVUvmT93Pp qU7QiMe5vYViBLgP1j1EVLNf3F065HGRbzRY5RdPs0ppIWQj0NS863VTx4kpwzHCu1il hAv3hku/NHfv/L+b+dYyMo2BlaJ81YSt+FMSfgyb8mWYNwPPo1VJRQWPPcw9N7184OBg n9+Q== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=mime-version:content-language:accept-language:in-reply-to :references:message-id:date:thread-index:thread-topic:subject:to :from; bh=BzM3dNDhIH5ELSjw/d+QD+LvmNNlbM3jd3WUkkNElbE=; b=X139+E4a6wpXD+xDNiCQR/8Og4CGNJFNNYolxGO9KSUfPZ1nurTpQBLlRWGQqiwJlr oIQ3/spBT2ikNkGim7GjocB8oQtzM8RVMaci/zGFv96JZuCg+lN6Q1o24xhA4PuUF3CZ sHze6p1h8Oas3Kb3h2r+9SU3jHeED6Dk5yyYslt1wgi6wPhrcCgJeBDqhmQR6DmVCHBR jgME3fesx0k5xh8ivfm0wZuqtvqQ4YxeoDjN0MD/BFVCv52chpitzL56e6/5kTCDSe9e e0THGuz6OFxgPTdiKntUbeGAingqnL1U5qyyx7S0V8/uvUVvZDfzKxcsjZTgBn2QT2ZG p+Yg== ARC-Authentication-Results: i=1; gmr-mx.google.com; spf=pass (google.com: domain of denis.maier-NSENcxR/0n0@public.gmane.org designates 130.92.0.84 as permitted sender) smtp.mailfrom=denis.maier-NSENcxR/0n0@public.gmane.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=unibe.ch Original-Received: from mailhub-lb3.unibe.ch (mailhub-lb3.unibe.ch. [130.92.0.84]) by gmr-mx.google.com with ESMTPS id b29si1123064ljf.6.2021.11.24.01.00.02 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 24 Nov 2021 01:00:03 -0800 (PST) Received-SPF: pass (google.com: domain of denis.maier-NSENcxR/0n0@public.gmane.org designates 130.92.0.84 as permitted sender) client-ip=130.92.0.84; X-Virus-Scanned: By University of Bern - MGW Original-Received: from mail.campus.unibe.ch (aai-edge-01.campus.unibe.ch [130.92.13.20]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by mailhub-lb3.unibe.ch (Postfix) with ESMTPS id 9B8165000AA for ; Wed, 24 Nov 2021 10:00:00 +0100 (CET) Thread-Topic: Automaticly creating bibliography in md? Thread-Index: AQHX4EmdUkyuGVJXmkeJzQdUDcZ8NawQ0w0wgAAAejD///PhAIAAESEggAAl94CAABGvUP//9QOAgAAemMCAAAJK0IAAAgGAgAE5aNA= In-Reply-To: <7181c39d-c239-4a63-bbae-800bc4d8b523n-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org> Accept-Language: de-CH, en-US Content-Language: de-DE x-originating-ip: [172.18.72.2] X-Original-Sender: denis.maier-NSENcxR/0n0@public.gmane.org X-Original-Authentication-Results: gmr-mx.google.com; spf=pass (google.com: domain of denis.maier-NSENcxR/0n0@public.gmane.org designates 130.92.0.84 as permitted sender) smtp.mailfrom=denis.maier-NSENcxR/0n0@public.gmane.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=unibe.ch 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:29583 Archived-At: --_000_bb5a3b682ae748a09280ba75cb8b05c3unibech_ Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable You mean wiki-style links [[20200719191401]] being transformed to this: \[\= [20200719191401\]\]? I don=E2=80=99t have a solution for this. Maybe someone knows how escaping of brackets can be suppressed when going f= rom markdown to markdown ? Denis Von: pandoc-discuss-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org Im A= uftrag von Alan Gesendet: Dienstag, 23. November 2021 16:14 An: pandoc-discuss Betreff: Re: Automaticly creating bibliography in md? Thank you for your patience Denis. 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 On Tuesday, November 23, 2021 at 3:09:05 PM UTC+1 denis...-NSENcxR/0n0@public.gmane.org wrote: Ok. Take this input file: ``` --- 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 --- bla bla [@WatsonCrick1953, 5] ``` Convert with pandoc inputfile.md -o outputfile.md =E2=80=93citeproc -t markdown-citation= s gives me : ``` --- 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 --- bla bla (Watson and Crick 1953, 5) ::: {#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. ::: ::: ``` Denis Von: pandoc-...-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org Im Auftrag v= on 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? Not sure, but the xml is your style file. Can only guess since I don=E2=80=99t have your bibfile, but maybe the comma= nd line arguments were a bit messed up : pandoc inputfile.md -o inputfile.md --csl sage-harvard.csl --citeproc -t ma= rkdown-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 files= anyway. But, if you want the bibliography to appear like in your sublime example, y= ou=E2=80=99ll need to use a filter for this. Denis Von: pandoc-...-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org Im Auftrag v= on Alan Gesendet: Dienstag, 23. November 2021 14:09 An: pandoc-discuss Betreff: Re: Automaticly creating bibliography in md? Sure. I noticed that my yaml is missing. The same file, before this command, prod= uce normal pdf and word output 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? Von: pandoc-...-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org Im Auftrag v= on Alan Gesendet: Dienstag, 23. November 2021 13:45 An: pandoc-discuss Betreff: Re: Automaticly creating bibliography in md? I am afraid I miss something here. I try the command, ad receive huge xml c= ode in the end + my citation is like this \[@alexanderTheoryCulturalTrauma2004, 1\] > P.S. : 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 :-) 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 output file. If you have your references in your metadata you can probably just do this = : pandoc inputfile.md -o inputfile.md =E2=80=93csl sage-harvard.csl =E2=80=93= citeproc -t markdown-citations (The important part is `-t markdown-citations`. That=E2=80=99s a big counte= r-intuitive : It does not mean =C2=AB give me a markdown file without citat= ions=C2=BB , but rather =C2=AB give me a markdown file without the citation= s extension, i.e., with citations being resolved =C2=BB.) If that does not work, convert to a temp file first, then rename. You can a= utomate the process with a script or makefile. Denis P.S. : Why do you use reference-doc here? You=E2=80=99re converting from ma= rkdown to markdown. Von: pandoc-...-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org Im Auftrag v= on Alan Gesendet: Dienstag, 23. November 2021 10:28 An: pandoc-discuss Betreff: Re: Automaticly creating bibliography in md? I know (and use) this command pandoc --reference-doc my-reference.docx -s text1.md --citeproc --csl sage-= harvard.csl -o text2.md and my bib file is referenced in YAML head. The question is how to achieve to have bibliography in SAME file I am worki= ng with? I have an animated gif in imgur to show the process, but google doesn't let= me post link, message is automatically deleted. 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 reference library, of course. --bibliography=3Dyou_bibfile.bib Von: pandoc-...-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org Im Auftrag v= on 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? Sure, you can convert from markdown to markdown with resolved citations. pandoc inputfile.md -o outputfile-md -C -t markdown-citations Denis Von: pandoc-...-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org Im Auftrag v= on Alan Gesendet: Dienstag, 23. November 2021 10:08 An: pandoc-discuss Betreff: Automaticly creating bibliography in md? Hi, In sublime_zk package for Sublime Text, you can create auto bibliography fr= om citations in document and place it at the end of current .md document. I= s it possible to do that with command or some script, which can be executed= in Windows 10 :-) Thanks -- You received this message because you are subscribed to the Google Groups "= pandoc-discuss" group. To unsubscribe from this group and stop receiving emails from it, send an e= mail 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/ac73582b-8acc-469a-94ff-38160275d4a1n%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 e= mail 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/504e0de4e201441ea14525b281bba30c%40unibe.ch. -- 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-discus...-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org To view this discussion on the web visit https://groups.google.com/d/msgid/= pandoc-discuss/ab3295e2-0e57-459f-a626-84b632f02ef6n%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 e= mail 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/a24adbdb-f2ef-4bbc-8199-5aab0bee653cn%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 e= mail 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/5bec2468-843a-4196-ada8-7b42200dc2d6n%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 e= mail 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/5676cd49db054de980fb31d2f3fda9b4%40unibe.ch. -- 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-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org. To view this discussion on the web visit https://groups.google.com/d/msgid/= pandoc-discuss/7181c39d-c239-4a63-bbae-800bc4d8b523n%40googlegroups.com. --=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/bb5a3b682ae748a09280ba75cb8b05c3%40unibe.ch. --_000_bb5a3b682ae748a09280ba75cb8b05c3unibech_ Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable

You mean = wiki-style links [[20200719191401]] being transformed to this: \[\[20200719= 191401\]\]?

&nbs= p;

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

 

Maybe someone knows how escaping of brackets can be suppressed when g= oing from markdown to markdown ?

 

Denis

&nbs= p;

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

 

Thank you for your patience Denis.

 

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

 

 

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

Ok. Take this input file:

 

```

---

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'<= /span>

  title-short: Molecular structure of nu= cleic 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

---

 

bla bla  [@WatsonCrick1953, 5]

```

 

Convert with

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

gives me :

 

```

---

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<= /p>

  issue: 4356

  issued:

    date-parts:

    - - 1953=

      - 4

      - 25

  language: en-GB

  page: 737-738

  title: "Molecular structure of nu= cleic acids: a structure for

    deoxyribose nucleic acid&q= uot;

  title-short: Molecular structure of nu= cleic acids

  type: article-journal

  URL: http= s://www.nature.com/articles/171737a0

  volume: 171

title: Test

---

 

bla bla (Watson and Crick 1953, 5)

 

::: {#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 Ac= id." *Nature* 171 (4356):

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

:::

:::

```

 

Denis

 

 

Von: pandoc-...-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org <pandoc-...-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org> Im Auftrag von denis...-NSENcxR/0n0@public.gmane.org=
Gesendet: Dienstag, 23. November 2021 15:03
An: pandoc-...-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org<= br> Betreff: AW: Automaticly creating bibliography in md?

 

Not sure, but the xml is your style file.

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

pandoc inputfile.md -o inputfile.md --csl sag= e-harvard.csl --citeproc -t markdown-citations

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

Or, can also just omit the style since you ha= ve that in your markdown files anyway.

 

But, if you want the bibliography to appear l= ike in your sublime example, you=E2=80=99ll need to use a filter for this.<= /span>

 

Denis

 

 

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

 

 

Sure.

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

 

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?

 

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

 

I am afraid I miss something here. I try the command, ad receive h= uge xml code in the end + my citation is like this

 

\[@alexanderTheoryCulturalTrauma2004, 1\]

 

> P.S. : 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 :-)

 

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 output file.

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

 

pandoc inputfile.md -o inputfile.md =E2=80=93= csl sage-harvard.csl =E2=80=93citeproc -t markdown-citations

 

(The important part is `-t markdown-citations= `. That=E2=80=99s a big counter-intuitive : It does not mean =C2=AB&nb= sp;give me a markdown file without citations=C2=BB , but rather =C2=AB = ;give me a markdown file without the citations extension, i.e., with citations b= eing resolved =C2=BB.)

 

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

 

Denis

 

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

 

 

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

 

I know (and use) this command

 

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

 

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 do= esn't let me post link, message is automatically deleted.

 

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 reference libra= ry, of course.

--bibliography=3Dyou_bibfile.bib<= /o:p>

 

Von: pandoc-...-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org <pandoc-...-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org> Im Auftrag von denis...-NSENcxR/0n0@public.gmane.org=
Gesendet: Dienstag, 23. November 2021 10:11
An: pandoc-...-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org<= br> Betreff: AW: Automaticly creating bibliography in md?

 

Sure, you can convert from markdown to markdo= wn with resolved citations.

 

pandoc inputfile.md -o outputfile-md -C -t ma= rkdown-citations

 

Denis

 

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

 

Hi,

In sublime_zk package for Sublime Text, you can create auto biblio= graphy from citations in document and place it at the end of current .md do= cument. Is it possible to do that with command or some script, which can be executed in Windows 10 :-)=

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...-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org.
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...-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org.=

--
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...-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org.=

--
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...-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org.=

--
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...-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org.
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...-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org.=

--
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-d= iscuss+unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org.
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 pand= oc-discuss+unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org.
To view this discussion on the web visit https://groups.google.com/d/msgid/pandoc= -discuss/bb5a3b682ae748a09280ba75cb8b05c3%40unibe.ch.
--_000_bb5a3b682ae748a09280ba75cb8b05c3unibech_--