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

 

I don’t have a solution for this.

 

Maybe someone knows how escaping of brackets can be suppressed when going from markdown to markdown ?

 

Denis

 

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'

  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 –citeproc -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

  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 <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
Betreff: AW: Automaticly creating bibliography in md?

 

Not sure, but the xml is your style file.

Can only guess since I don’t have your bibfile, but maybe the command line arguments were a bit messed up :

pandoc inputfile.md -o inputfile.md --csl sage-harvard.csl --citeproc -t markdown-citations

Add a = between --csl and the style => --csl=sage-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, you’ll need to use a filter for this.

 

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-...@googlegroups.com>
Betreff: Re: Automaticly creating bibliography in md?

 

 

Sure.

I noticed that my yaml is missing. The same file, before this command, 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-...@googlegroups.com>
Betreff: Re: Automaticly creating bibliography in md?

 

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

 

\[@alexanderTheoryCulturalTrauma2004, 1\]

 

> P.S. : Why do you use reference-doc here? You’re 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 –csl sage-harvard.csl –citeproc -t markdown-citations

 

(The important part is `-t markdown-citations`. That’s a big counter-intuitive : It does not mean « give me a markdown file without citations» , but rather « give me a markdown file without the citations extension, i.e., with citations being resolved ».)

 

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’re converting 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-...@googlegroups.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 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=you_bibfile.bib

 

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
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 <pandoc-...-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org> Im Auftrag von Alan
Gesendet: Dienstag, 23. November 2021 10:08
An: pandoc-discuss <pandoc-...@googlegroups.com>
Betreff: Automaticly creating bibliography in md?

 

Hi,

In sublime_zk package for Sublime Text, you can create 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 :-)

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 email 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-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 email to pandoc-discus...-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org.

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

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

--
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.
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 email to pandoc-discus...-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org.

--
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.
To view this discussion on the web visit https://groups.google.com/d/msgid/pandoc-discuss/7181c39d-c239-4a63-bbae-800bc4d8b523n%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-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org.
To view this discussion on the web visit https://groups.google.com/d/msgid/pandoc-discuss/bb5a3b682ae748a09280ba75cb8b05c3%40unibe.ch.