Wed 21 Mar 2012 05:42:51 PM UTC, comment #10:
I applied patch file #25434. Thanks.
|
Wed 21 Mar 2012 05:23:03 PM UTC, comment #9:
I commited the jointed path. It has been tested with the jointed {.tm,.bib} files with each TeXmacs bibstyle.
The result is globally is Ok. But there are some minors behaviors differences (compared to bibtex -- see the .dvi) in alpha mode. I will work on this later.
(file #25431, file #25432, file #25433)
|
Wed 21 Mar 2012 03:19:50 PM UTC, comment #8:
Hi, I just discover how the bibliography works in TeXmacs.
As far as bibtex is concerned:
- an empty field return an empty content;
- if the field was mandatory relatively to the entry type(*), a warning is produced;
- if the field was needed to compute the cite key, the cite key is made without (**),
- if the cite keys are unsortable due to the lack of fields, a warning is produced.
(*) Each entry type has a minimum required fields : see e.g. http://en.wikibooks.org/wiki/LaTeX/Bibliography_Management#Standard_templates
(**) This means that a biblio entry like :
@article{,
title = "Latex is ugly",
journal = "TUGBoat",
volume = "14",
number = "3",
pages = "342--351"
}
will have an empty cite key [] in alpha style.
|
Wed 14 Mar 2012 10:25:30 PM UTC, comment #7:
I think that BibTeX would make it empty.
|
Wed 14 Mar 2012 04:03:49 PM UTC, comment #6:
Perfect. Just a note: below we discussed the possibility of letting bib-field return the empty string whenever there is no field, but I think we'd better not do that because not being there and being empty are two different things, even though in principle for a bibliography it wouldn't matter.
|
Wed 14 Mar 2012 01:25:08 PM UTC, comment #5:
I assign this bug to Francois who is working on all the LaTeX related stuff. Francois: please change "--" for "" in the patch that Miguel applied to SVN and adopt a more systematic approach for dealing with this kind of problem (best would be to somehow ignore all missing fields).
|
Mon 12 Mar 2012 10:22:15 PM UTC, comment #4:
Ok. Yet Another Item To The List. (YAITTL (tm), I'm sure you're more familiar with the concept than I am ;)
|
Mon 12 Mar 2012 09:59:47 PM UTC, comment #3:
- Yes, please investigate further.
- Examples of cases where one relies on #f as a possible return value? Are there many, or only a few exceptional ones?
- If would use "" as a replacement.
- BiBTeX is a plug-in because of the support of the bibtex command.
|
Mon 12 Mar 2012 09:01:47 PM UTC, comment #2:
- Yes, I think there are more such cases, that's another reason why I didn't commit the changes. I will look into it.
- Yes, it is sometimes explicitly relied upon that the return value may be #f. But wouldn't it be better to fix those than to add yet another function? I'd say a review of the code and sticking to a convention would be better.
- What do I do with the missing year? Is "--" ok as a replacement? Or should I fix the places which rely on it being some non-empty string?
A question: shouldn't Data/Convert/BibTeX/* make more sense inside Plugins/Bibtex ?
Another question: "Benito"? X-DD
|
Mon 12 Mar 2012 08:04:36 PM UTC, comment #1:
Thanks Benito for this patch.
Could you please check whether there are other
cases in which a missing field may cause trouble?
Maybe we should let bib-field return the empty string
whenever there is no field (or do we sometimes explicitly
rely on the fact that bib-field may be #f, in which case
we might introduce a routine bib-field*).
|
Sun 11 Mar 2012 10:35:11 PM UTC, original submission:
Precisely that. An error is displayed instead of an entry in the bibliography section.
A sanity check for missing "year" fields is needed at least in progs/bibtex/alpha.scm and plain.scm.
The attached patch does this. However:
- It is not clear to me whether the string "--" is a desirable replacement for a missing year. Leaving it empty raises lots of problems elsewhere.
- Other places might need fixing: the function bib-field is heavily used and its output piped to functions expecting inputs of given types, like string-length in the particular case treated.
When this is cleared I'll commit a fix.
|