Re: [Bibdesk-users] Macro expansion for month field broken if region language != english
>> > If you don't want to expand the macros in the month, then why do you > want to expand macros in other fields? Because all BibTeX styles me and my colleagues use, provide expansions for month macros, but I cannot assume that my colleagues have the same definitions e.g. for journal or conference names. > On the Wiki there's a template to export unexpanded bibtex strings. If > you want to expand all fields except for the Month, you can use the > following: > > <$publications> > @<$pubType/>{<$citeKey/><$allfiel...@nonempty>, > <$name/> = <$name=Month?><$bibTeXString/>{<$value/>} $name?> > } > Works like a charm. Thanks a lot for your help. BibDesk's features are continuing to amaze me! Best regards, Christian -- This SF.net email is sponsored by: SourcForge Community SourceForge wants to tell your story. http://p.sf.net/sfu/sf-spreadtheword ___ Bibdesk-users mailing list Bibdesk-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/bibdesk-users
Re: [Bibdesk-users] Macro expansion for month field broken if region language != english
On 13 Jan 2009, at 9:35 AM, Christian Plessl wrote: > > On 12.01.2009, at 22:57, Christiaan Hofman wrote: >>> My tests showed that this doesn't work as I would like. I think most >>> BibTeX styles expect that the months are written with three letter >>> abbreviations, jan, feb, ... If I define a @String{jan = {January}} >>> or >>> @String{jan = {jan}} macro, January or jan will be included in curly >>> braces and thus treated literally. >> >> Well, that's what you were asking for: you asked it to be expanded as >> "January", and that's what this does. If not, then please tell me >> what >> you want to achieve. > [...] > > I understand your point, that expanding macros should expand all > macros. > > However, my intent is to share BibTeX entries with others, such that > the BibTeX entries can be directly used which is not possible if the > month is expanded to localized names. And if I define macros for the > english names of the months in my BibTeX file, these strings are > defined literally. > > This will cause problems, since some common BibTeX styles, e.g., the > IEEE Transaction style defines macros to expand 3 letter month > abbreviations with @String{jan={"Jan."}} while other styles, e.g. the > standard plain defines @String{jan={"January"}}. This is double. You either use braces OR quotes, not both. This way you get a string value that includes the quotes in the expanded value. > > Hence, my wish to expand all macros, but for the month field. > If you don't want to expand the macros in the month, then why do you want to expand macros in other fields? >> No array modifiers, wouldn't even be possible. You can use condition >> tags to >> treat some fields differently. But is that really what you want? > > I will give it a try tonight. > > Thanks for your help, > Christian On the Wiki there's a template to export unexpanded bibtex strings. If you want to expand all fields except for the Month, you can use the following: <$publications> @<$pubType/>{<$citeKey/><$allfiel...@nonempty>, <$name/> = <$name=Month?><$bibTeXString/>{<$value/>} } Christiaan -- This SF.net email is sponsored by: SourcForge Community SourceForge wants to tell your story. http://p.sf.net/sfu/sf-spreadtheword ___ Bibdesk-users mailing list Bibdesk-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/bibdesk-users
Re: [Bibdesk-users] Macro expansion for month field broken if region language != english
On 12.01.2009, at 22:57, Christiaan Hofman wrote: >> My tests showed that this doesn't work as I would like. I think most >> BibTeX styles expect that the months are written with three letter >> abbreviations, jan, feb, ... If I define a @String{jan = {January}} >> or >> @String{jan = {jan}} macro, January or jan will be included in curly >> braces and thus treated literally. > > Well, that's what you were asking for: you asked it to be expanded as > "January", and that's what this does. If not, then please tell me what > you want to achieve. [...] I understand your point, that expanding macros should expand all macros. However, my intent is to share BibTeX entries with others, such that the BibTeX entries can be directly used which is not possible if the month is expanded to localized names. And if I define macros for the english names of the months in my BibTeX file, these strings are defined literally. This will cause problems, since some common BibTeX styles, e.g., the IEEE Transaction style defines macros to expand 3 letter month abbreviations with @String{jan={"Jan."}} while other styles, e.g. the standard plain defines @String{jan={"January"}}. Hence, my wish to expand all macros, but for the month field. > No array modifiers, wouldn't even be possible. You can use condition > tags to > treat some fields differently. But is that really what you want? I will give it a try tonight. Thanks for your help, Christian -- This SF.net email is sponsored by: SourcForge Community SourceForge wants to tell your story. http://p.sf.net/sfu/sf-spreadtheword ___ Bibdesk-users mailing list Bibdesk-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/bibdesk-users
Re: [Bibdesk-users] Macro expansion for month field broken if region language != english
On 12 Jan 2009, at 7:58 PM, Christian Plessl wrote: > Hi Christiaan > >>> Is this intended behavior? A possible workaround might be to re- >>> define >>> each month with a macro @{jan = January}, but this seems too hackish >>> for me. >>> >>> Best regards, >>> Christian >> >> Yes, BibDesk uses the month names from the user localization for the >> default month name macros. If you want to change this, you can >> override the macros for the month name. Either in your document or in >> BD's Fields prefs. > > > My tests showed that this doesn't work as I would like. I think most > BibTeX styles expect that the months are written with three letter > abbreviations, jan, feb, ... If I define a @String{jan = {January}} or > @String{jan = {jan}} macro, January or jan will be included in curly > braces and thus treated literally. Well, that's what you were asking for: you asked it to be expanded as "January", and that's what this does. If not, then please tell me what you want to achieve. > > Is there a way how I can iterate over all fields but the month field > and use the bibTeXString key instead of value for month in my template > (see below)? Why would you want to treat the month differently from the other fields? Do you want to expand macros in the exported bibtex or not? > Is there an array modifier for excluding a key, I > couldn't find any. No array modifiers, wouldn't even be possible. You can use condition tags to treat some fields differently. But is that really what you want? > > <$publications> > @<$pubType/>{<$citeKey/><$allfiel...@nonempty>, > <$name/> = {<$value/>}} > > > Best regards, > Christian -- This SF.net email is sponsored by: SourcForge Community SourceForge wants to tell your story. http://p.sf.net/sfu/sf-spreadtheword ___ Bibdesk-users mailing list Bibdesk-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/bibdesk-users
Re: [Bibdesk-users] Macro expansion for month field broken if region language != english
Hi Christiaan >> Is this intended behavior? A possible workaround might be to re- >> define >> each month with a macro @{jan = January}, but this seems too hackish >> for me. >> >> Best regards, >> Christian > > Yes, BibDesk uses the month names from the user localization for the > default month name macros. If you want to change this, you can > override the macros for the month name. Either in your document or in > BD's Fields prefs. My tests showed that this doesn't work as I would like. I think most BibTeX styles expect that the months are written with three letter abbreviations, jan, feb, ... If I define a @String{jan = {January}} or @String{jan = {jan}} macro, January or jan will be included in curly braces and thus treated literally. Is there a way how I can iterate over all fields but the month field and use the bibTeXString key instead of value for month in my template (see below)? Is there an array modifier for excluding a key, I couldn't find any. <$publications> @<$pubType/>{<$citeKey/><$allfiel...@nonempty>, <$name/> = {<$value/>}} Best regards, Christian -- This SF.net email is sponsored by: SourcForge Community SourceForge wants to tell your story. http://p.sf.net/sfu/sf-spreadtheword ___ Bibdesk-users mailing list Bibdesk-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/bibdesk-users
Re: [Bibdesk-users] Macro expansion for month field broken if region language != english
On 12 Jan 2009, at 5:46 PM, Christian Plessl wrote: > Hi everyone > > I make quite extensive use of BibTeX macros. When sending BibTeX > entries to my colleagues I'm using the following template to expand > all macros: > > <$publications> > @<$pubType/>{<$citeKey/><$allfiel...@nonempty>, > <$name/> = {<$value/>}} > > > This works fine for all macros, only the BibTeX month field causes > troubles. I'm storing the month name always with its 3 letter > abbreviation, i.e., jan, feb, ... > > The problem is that when expanding the name of the month in the > template BibDesk seems to apply the date format from my region/locale. > That is, in my setup (language set to English, but Region set to > Switzerland (German)) the month names are written in German. For > example, if I have a BibTeX entry with Month = jan, it is expanded to > "Januar", instead of "January" or "jan". This causes problems with > common BibTeX styles. > > The same problem also occurs in the edit dialog for a BibTeX entry. > > Is this intended behavior? A possible workaround might be to re-define > each month with a macro @{jan = January}, but this seems too hackish > for me. > > Best regards, > Christian Yes, BibDesk uses the month names from the user localization for the default month name macros. If you want to change this, you can override the macros for the month name. Either in your document or in BD's Fields prefs. Christiaan -- This SF.net email is sponsored by: SourcForge Community SourceForge wants to tell your story. http://p.sf.net/sfu/sf-spreadtheword ___ Bibdesk-users mailing list Bibdesk-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/bibdesk-users
[Bibdesk-users] Macro expansion for month field broken if region language != english
Hi everyone I make quite extensive use of BibTeX macros. When sending BibTeX entries to my colleagues I'm using the following template to expand all macros: <$publications> @<$pubType/>{<$citeKey/><$allfiel...@nonempty>, <$name/> = {<$value/>}} This works fine for all macros, only the BibTeX month field causes troubles. I'm storing the month name always with its 3 letter abbreviation, i.e., jan, feb, ... The problem is that when expanding the name of the month in the template BibDesk seems to apply the date format from my region/locale. That is, in my setup (language set to English, but Region set to Switzerland (German)) the month names are written in German. For example, if I have a BibTeX entry with Month = jan, it is expanded to "Januar", instead of "January" or "jan". This causes problems with common BibTeX styles. The same problem also occurs in the edit dialog for a BibTeX entry. Is this intended behavior? A possible workaround might be to re-define each month with a macro @{jan = January}, but this seems too hackish for me. Best regards, Christian -- This SF.net email is sponsored by: SourcForge Community SourceForge wants to tell your story. http://p.sf.net/sfu/sf-spreadtheword ___ Bibdesk-users mailing list Bibdesk-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/bibdesk-users