Make file field easily usable in LaTeX documents

I’d like to embed the pdf file associated with a biblatex entry into my LaTeX document using the value of the file field. Currently it not only stores the file path (be it full or relative) but also a description and the file type, which makes it hard to retrieve only the path. Even though biblatex styles don’t use this field afaik, the documentation specifies that the field should (olny) contain the link:

file field (verbatim)
A local link to a pdf or other version of the work. Not used by the standard bibliography
styles.

The additional information about the file type and description could probably be stored in some other, custom field, since it is only used by JabRef.

Related discussion on tex.sx: How to embed a PDF file specified in the file field via JabRef?


Please vote if you support this proposal:

  • I would like to have this feature, too!
  • I don’t care.

0 voters

Although I agree that just storing the link would actually be nice, changes in the syntax of the serialization are quite critical. The problem is that the syntax of the file field has existed for a long time and by now other editors and systems depend on it, it is not just used by JabRef, see also this discussion. Hence, we cannot modify it easily without breaking other tools and such a decision is not easy to make. We need very convincing and very strong arguments for doing such a change. A mandatory predefined syntax in the specification would be such a very strong argument, but this does not exist. At least the description you cite is far too vague for me to justify (i) the effort that would be involved in such a change and (ii) to annoy all the people who depend on the current format.

I agree, this backwards-compatability is important. Here’s an idea to cater for everybody’s needs: Introducing an option in the preferences for the file field:

  • Use the description;path;type format
  • Use the bare path …
    • … with escaping
    • … without escaping

Or the bare path option could just always be unescaped. The first option would be the standard, presumably. Always using forward slashes to specify directories should work best for LaTeX, I think.

One thing I can’t judge is the amount of work involved in this, but I would definitely appreciate having the bare path!

A preference option that allows you to explicitly switch to a bare format might be a compromise. This would also ease migration from the old format in a sense.

Someone would need to implement it of course. I’ll be honest: Refactoring the file field is not our top-most priority at the moment. So, unless someone volunteers, you probably won’t see an advance on this very soon. I cannot speak for the others of course. Maybe one of the developers really wants the feature and then it can be very quick.

I totally understand, and I’ve found a workaround for my specific use case: Manually putting the file path into the addendum field of the entries where I need it. But for general cases, you don’t happen to have an idea how to extract the path from the file field (as it currently is) in LaTeX, do you? :confused:

Good to hear you have a workaround!

Unfortunately, I cannot give a solution for the extraction in LaTeX. My LaTeX programming skills are confined to simple macros and layouting hacks for meeting paper size constraints :wink:

Hi,

while I have no advanced LaTeX knowledge, you might want to look into the offiial BibLaTeX documentation, there is also a lot content refering on creating/modifying styles.
https://www.ctan.org/pkg/biblatex

Regards

Thanks for the tip, but this problem isn’t really on the side of biblatex. It’s either about modifying strings in LaTeX, or about changing the way JabRef stores this information. I’ve tried the former and asked about in on tex.sx (see my original post), but couldn’t find a solution. Hence my post here, i.e. the latter :slight_smile:.