GetRD / academic-file-converter

📚 Import Bibtex publications and Jupyter Notebook blog posts into your Markdown website or book. 将Bibtex转换为Markdown网站

Home Page:https://docs.hugoblox.com/reference/content-types/#automatically-import-publications-from-bibtex

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Handle linebreaks in BibTeX leading to invalid TOML strings

andreas-h opened this issue · comments

first of all: it is so cool that you made this -- thanks a lot!

Now to my problem: I have the bibtex files which do contain newlines. This tool works, but then when I run Hugo, I get errors like this one:

ERROR 2018/10/19 21:47:29 failed to parse page metadata for "publication/Behrens2018AMT/index.md": Near line 1 (last key parsed 'title'): strings cannot contain newlines for publication/Behrens2018AMT/index.md

in case of the bibtex

@Article{Behrens2018AMT,
  title =	 {{GOME-2A} retrievals of tropospheric {NO2} in
                  different spectral ranges -- influence of
                  penetration depth},
  AUTHOR =	 {Behrens, L. K. and Hilboll, A. and Richter, A. and
                  Peters, E. and Eskes, H. and Burrows, J. P.},
  DOI =		 {10.5194/amt-11-2769-2018},
  journal =	 {Atmos. Meas. Tech.},
  NUMBER =	 5,
  PAGES =	 {2769--2795},
  VOLUME =	 11,
  YEAR =	 2018,
}

which leads to this markdown:

+++
title = "GOME-2A retrievals of tropospheric NO2 in
different spectral ranges -- influence of
penetration depth"
date = 2018-01-01
authors = ["L. K. Behrens", "A. Hilboll", "A. Richter", "E. Peters", "H. Eskes", "J. P. Burrows"]
publication_types = ["2"]
abstract = ""
selected = "false"
publication = "*Atmos. Meas. Tech.*"
doi = "10.5194/amt-11-2769-2018"
+++
commented

Thanks for reporting this.

Handling of newlines in BibTeX has been improved in v0.2.1