unofficial mirror of help-gnu-emacs@gnu.org
 help / color / mirror / Atom feed
* Required empty fields in BibTeX mode
@ 2007-11-19 10:42 Sven Bretfeld
  0 siblings, 0 replies; 4+ messages in thread
From: Sven Bretfeld @ 2007-11-19 10:42 UTC (permalink / raw)
  To: help-gnu-emacs


[-- Attachment #1.1: Type: text/plain, Size: 897 bytes --]

Hello

This might be quite unusual, so I don't expect a quick answer. Due to
a bug in biblatex I need a field in certain Bibtex entries empty, but
ALWAYS present.

By default Emacs kills empty fields when the function
bibtex-clean-entry is called. Is it possible to exclude a certain type
of field from deletion?

A more detailed description of the problem:

Biblatex knows the field "subtitle". If this field is not present in
InCollection entries, it is added via crossref from the corresponding
Collection entry. But this field, then, has the wrong value, since it
is the Collection's subtitle, not the InCollection's. So, the output
is spoiled. An empty subtitle field in the InCollection entry is a
workaround until this is fixed by the developer. But this makes the
function bibtex-clean-entry unusable unless it can be told to leave
empty subtitle fields in InCollections.

Greetings

Sven

[-- Attachment #1.2: Type: application/pgp-signature, Size: 188 bytes --]

[-- Attachment #2: Type: text/plain, Size: 152 bytes --]

_______________________________________________
help-gnu-emacs mailing list
help-gnu-emacs@gnu.org
http://lists.gnu.org/mailman/listinfo/help-gnu-emacs

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: Required empty fields in BibTeX mode
       [not found] <mailman.3782.1195468968.18990.help-gnu-emacs@gnu.org>
@ 2007-11-19 14:42 ` Roland Winkler
  2007-11-19 14:46   ` Roland Winkler
  0 siblings, 1 reply; 4+ messages in thread
From: Roland Winkler @ 2007-11-19 14:42 UTC (permalink / raw)
  To: help-gnu-emacs

Sven Bretfeld <sven.bretfeld@gmx.ch> writes:
> By default Emacs kills empty fields when the function
> bibtex-clean-entry is called. Is it possible to exclude a certain type
> of field from deletion?

Formatting of BibTeX entries is controlled by the variable
bibtex-entry-format which contains a list of formatting options.
Empty fields are deleted if this list contains 'opts-or-alts. Remove
this from the list and you should get what you want.

Roland

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: Required empty fields in BibTeX mode
  2007-11-19 14:42 ` Roland Winkler
@ 2007-11-19 14:46   ` Roland Winkler
  2007-11-19 22:00     ` Sven Bretfeld
  0 siblings, 1 reply; 4+ messages in thread
From: Roland Winkler @ 2007-11-19 14:46 UTC (permalink / raw)
  To: help-gnu-emacs

Roland Winkler <Roland.Winkler@physik.uni-erlangen.de> writes:
> Sven Bretfeld <sven.bretfeld@gmx.ch> writes:
>> By default Emacs kills empty fields when the function
>> bibtex-clean-entry is called. Is it possible to exclude a certain type
>> of field from deletion?
>
> Formatting of BibTeX entries is controlled by the variable
> bibtex-entry-format which contains a list of formatting options.
> Empty fields are deleted if this list contains 'opts-or-alts. Remove
> this from the list and you should get what you want.

Ooops, this is just part one of your more specific question. With
the above you will keep all empty fields. You could then put a
function into bibtex-clean-entry-hook that deletes all empty fields
except for the one you want to keep.

Roland

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: Required empty fields in BibTeX mode
  2007-11-19 14:46   ` Roland Winkler
@ 2007-11-19 22:00     ` Sven Bretfeld
  0 siblings, 0 replies; 4+ messages in thread
From: Sven Bretfeld @ 2007-11-19 22:00 UTC (permalink / raw)
  To: help-gnu-emacs


[-- Attachment #1.1: Type: text/plain, Size: 767 bytes --]

Roland Winkler <Roland.Winkler@physik.uni-erlangen.de> writes:

> Roland Winkler <Roland.Winkler@physik.uni-erlangen.de> writes:
>> Formatting of BibTeX entries is controlled by the variable
>> bibtex-entry-format which contains a list of formatting options.
>> Empty fields are deleted if this list contains 'opts-or-alts. Remove
>> this from the list and you should get what you want.
>
> Ooops, this is just part one of your more specific question. With
> the above you will keep all empty fields. You could then put a
> function into bibtex-clean-entry-hook that deletes all empty fields
> except for the one you want to keep.

Thank you, I've done it that way now. At least half of it. For the
second part, the hook, I have to experiment a bit.

Greetings

Sven

[-- Attachment #1.2: Type: application/pgp-signature, Size: 188 bytes --]

[-- Attachment #2: Type: text/plain, Size: 152 bytes --]

_______________________________________________
help-gnu-emacs mailing list
help-gnu-emacs@gnu.org
http://lists.gnu.org/mailman/listinfo/help-gnu-emacs

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2007-11-19 22:00 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2007-11-19 10:42 Required empty fields in BibTeX mode Sven Bretfeld
     [not found] <mailman.3782.1195468968.18990.help-gnu-emacs@gnu.org>
2007-11-19 14:42 ` Roland Winkler
2007-11-19 14:46   ` Roland Winkler
2007-11-19 22:00     ` Sven Bretfeld

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).