Closed crystalfp closed 4 years ago
You can condigure abstract
to be a verbatim field, or replace <
and >
with $<$
and $>$
before parsing, but the latter will give you wrong results if you actually do have formulas with <
or >
somewhere.
How did you get this bibtex? No bibtex fields are expected to hold markdown, and from a latex point of view, the interpretation you found is the correct one. Outside formulas, <
and >
really do mean those upside down !
and ?
to latex.
Unescaped %
signs in bibtex is also likely to give you unwanted behavior in bibtex. %
means "ignore the rest of this line" in latex.
Thanks @retorquere for your observations!
I have notes written in markdown that contains a BibTeX reference as verbatim block. What I was trying to do is to put the note inside the reference in the abstract field and use tools like JabRef to manage the reference files. This way I don't lose my notes and can cite the entry in a document.
So seems better if I put my markdown notes in a different field (notes or comment) and declare this field verbatim for the library.
Thanks! mario
Leaving under abstract
the first paragraph, moving the 2nd and 3rd to a note
field and calling the library this way: const bibliography = parse(src, {verbatimFields: ["url", "note", "doi"]}) as Bibliography;
solved the problem.
BTW, the percentages (22%, 66% etc.) in the abstract fields seems to be not interpreted by BibTex as comments.
Thanks! mario
In my experience percent-handling is inconsistent, which I think is worse than it just failing. But this parser will just read them as percent.
Problem understood, issue solved, so I close it. Thanks!
Thanks for the library! I have the entry below that contains some markdown in the abstract field. Maybe it is a bibtex rule I don't remember, but my links
<http://something.com>
are changed to¡http://something¿
. Is setting the optionraw: true
the only alternative to preserve<>
? I tried to use{markup: {enquote: {open: "<", close: ">"}}}
but has no effect. Any suggestions about how to change the interpretation of only<>
? Thanks a lot! mario