bugGNU TeXmacs - Bugs: bug #35794, Bibliography generation fails for...

 
 

You are not allowed to post comments on this tracker with your current authentication level.

bug #35794: Bibliography generation fails for bibtex entries with no year

Submitted by:  Miguel de Benito <mdbenito>
Submitted on:  Sun 11 Mar 2012 10:35:11 PM UTC  
 
Category: PluginsPriority: 5 - Normal
Item Group: ErrorStatus: Fixed
Privacy: PublicAssigned to: Francois Poulain <fpoulain>
Originator Name: Open/Closed: Closed
Release: 1.0.7.14Release: None
Fixed Release: NoneFixed Release: 
Keywords: 

(Jump to the original submission Jump to the original submission)

Wed 21 Mar 2012 05:42:51 PM UTC, comment #10:

I applied patch file #25434. Thanks.

Joris van der Hoeven <vdhoeven>
Project Administrator
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)

Francois Poulain <fpoulain>
Project MemberIn charge of this item.
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.

Francois Poulain <fpoulain>
Project MemberIn charge of this item.
Wed 14 Mar 2012 10:25:30 PM UTC, comment #7:

I think that BibTeX would make it empty.

Joris van der Hoeven <vdhoeven>
Project Administrator
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.

Miguel de Benito <mdbenito>
Project Member
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).

Joris van der Hoeven <vdhoeven>
Project Administrator
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 ;)

Miguel de Benito <mdbenito>
Project Member
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.
Joris van der Hoeven <vdhoeven>
Project Administrator
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

Miguel de Benito <mdbenito>
Project Member
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*).

Joris van der Hoeven <vdhoeven>
Project Administrator
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.

Miguel de Benito <mdbenito>
Project Member

 

Attached Files
file #25434:  bug_35794.diff added by fpoulain (1KiB - text/x-patch)
file #25431:  bug_35794_minus_year.tm added by fpoulain (4KiB - text/texmacs)
file #25432:  bug_35794_minus_year.bib added by fpoulain (2KiB - text/x-bibtex)
file #25433:  bug_35794_minus_year.dvi added by fpoulain (2KiB - application/x-dvi)
file #25327:  fix-missing-year_rev4215.diff added by mdbenito (2KiB - application/octet-stream)

 

Depends on the following items: None found

Items that depend on this one: None found

 

Carbon-Copy List
  • -unavailable- added by vdhoeven (Posted a comment)
  • -unavailable- added by mdbenito (Submitted the item)
  •  

    Do you think this task is very important?
    If so, you can click here to add your encouragement to it.
    This task has 0 encouragements so far.

    Only logged-in users can vote.

     

    Please enter the title of George Orwell's famous dystopian book (it's a date):

     

     

    Follow 11 latest changes.

    Date Changed By Updated Field Previous Value => Replaced By
    Fri 07 Sep 2012 04:48:27 PM UTCfpoulainStatusIn Progress=>Fixed
      Open/ClosedOpen=>Closed
    Wed 21 Mar 2012 05:24:27 PM UTCfpoulainAttached File-=>Added bug_35794.diff, #25434
    Wed 21 Mar 2012 05:23:03 PM UTCfpoulainAttached File-=>Added bug_35794_minus_year.tm, #25431
      Attached File-=>Added bug_35794_minus_year.bib, #25432
      Attached File-=>Added bug_35794_minus_year.dvi, #25433
    Wed 21 Mar 2012 03:19:50 PM UTCfpoulainStatusConfirmed=>In Progress
      Open/ClosedAccepted=>Open
    Wed 14 Mar 2012 01:25:08 PM UTCvdhoevenAssigned tomdbenito=>fpoulain
    Mon 12 Mar 2012 10:22:15 PM UTCmdbenitoOpen/ClosedOpen=>Accepted
    Sun 11 Mar 2012 10:35:11 PM UTCmdbenitoAttached File-=>Added fix-missing-year_rev4215.diff, #25327

    Back to the top


    Powered by Savane 3.1-cleanup1