* Bib bug in using months
@ 2006-05-08 6:18 Aditya Mahajan
2006-05-08 13:08 ` Taco Hoekwater
0 siblings, 1 reply; 5+ messages in thread
From: Aditya Mahajan @ 2006-05-08 6:18 UTC (permalink / raw)
Hi Taco,
In my bib file, I have month enteries like
month=jan,
month=feb,
and so on. While I was learning latex, I read somewhere that this is
better than writing explicit names for the month as the bst file can
then choose whether to use long names or short names. It is also
possible to choose the month names according to the language of the
main document. I followed that advice and now I have HUGE bib file
with such enteries.
However, the bib module does not support this naming scheme. I get
\month{1}
\month{2}
etc in my bbl file. Can this be corrected?
This is not urgent at all, as I can correct everything in my editor,
changing \month{1} to \month{Jan.} or \month{January} depending on
what citation style I want. It will be nice if the context bst style
did this by default.
Aditya
--
Aditya Mahajan, EECS Systems, University of Michigan
http://www.eecs.umich.edu/~adityam || Ph: 7342624008
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: Bib bug in using months
2006-05-08 6:18 Bib bug in using months Aditya Mahajan
@ 2006-05-08 13:08 ` Taco Hoekwater
2006-05-09 19:09 ` Aditya Mahajan
0 siblings, 1 reply; 5+ messages in thread
From: Taco Hoekwater @ 2006-05-08 13:08 UTC (permalink / raw)
Hi Aditya,
Aditya Mahajan wrote:
> However, the bib module does not support this naming scheme. I get
>
> \month{1}
> \month{2}
>
> etc in my bbl file. Can this be corrected?
Sure, it is just an oversight. For this to work, only a redefinition
of \insertmonth is needed (I had intented that all along, just
forgot to implement it), For now, just add this somewhere after
the loading of the bib module.
\unprotect
\def\insertmonth#1#2#3%
{\bibdoifelse{\@@pb@month}%
{#1\doifnumberelse{\@@pb@month}%
{\@EA\doconvertmonth\@EA{\@@pb@month}}%
{\@@pb@month}#2}{#3}}
\protect
That will give you the full month name according to the current
language labeltext for the month names. Not perfect yet, but better.
I'll ask Hans to provide true \numberconversions for month names in
short and long format, so I can extend the module officially.
Cheers, Taco
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: Bib bug in using months
2006-05-08 13:08 ` Taco Hoekwater
@ 2006-05-09 19:09 ` Aditya Mahajan
2006-05-09 19:26 ` Taco Hoekwater
0 siblings, 1 reply; 5+ messages in thread
From: Aditya Mahajan @ 2006-05-09 19:09 UTC (permalink / raw)
On Mon, 8 May 2006, Taco Hoekwater wrote:
>
> Hi Aditya,
>
>
> Aditya Mahajan wrote:
>> However, the bib module does not support this naming scheme. I get
>>
>> \month{1}
>> \month{2}
>>
>> etc in my bbl file. Can this be corrected?
>
> Sure, it is just an oversight. For this to work, only a redefinition
> of \insertmonth is needed (I had intented that all along, just
> forgot to implement it), For now, just add this somewhere after
> the loading of the bib module.
>
> \unprotect
> \def\insertmonth#1#2#3%
> {\bibdoifelse{\@@pb@month}%
> {#1\doifnumberelse{\@@pb@month}%
> {\@EA\doconvertmonth\@EA{\@@pb@month}}%
> {\@@pb@month}#2}{#3}}
> \protect
>
> That will give you the full month name according to the current
> language labeltext for the month names. Not perfect yet, but better.
Thanks. For my present project I need short month names, and the
deadline is tomorrow. So, I will stick to the manual solution at the
moment.
> I'll ask Hans to provide true \numberconversions for month names in
> short and long format, so I can extend the module officially.
That will be great.
Aditya
--
Aditya Mahajan, EECS Systems, University of Michigan
http://www.eecs.umich.edu/~adityam || Ph: 7342624008
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: Bib bug in using months
2006-05-09 19:09 ` Aditya Mahajan
@ 2006-05-09 19:26 ` Taco Hoekwater
2006-05-10 23:53 ` Aditya Mahajan
0 siblings, 1 reply; 5+ messages in thread
From: Taco Hoekwater @ 2006-05-09 19:26 UTC (permalink / raw)
Aditya Mahajan wrote:
>
>
> Thanks. For my present project I need short month names, and the
> deadline is tomorrow. So, I will stick to the manual solution at the
> moment.
There should be no need for manual fixes, just do this:
\unprotect
\def\insertmonth#1#2#3%
{\bibdoifelse{\@@pb@month}%
{#1\doifnumberelse{\@@pb@month}%
{\@EA\doconvertshortmonth\@EA{\@@pb@month}}%
{\@@pb@month}#2}{#3}}
\protect
\def\doconvertshortmonth#1%
{\ifcase#1\or % adjust names as you like
jan\or feb\or mar\or apr\or may\or jun\or
jul\or aug\or sep\or oct\or nov\or dec\else !!!\fi }
Cheers, Taco
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: Bib bug in using months
2006-05-09 19:26 ` Taco Hoekwater
@ 2006-05-10 23:53 ` Aditya Mahajan
0 siblings, 0 replies; 5+ messages in thread
From: Aditya Mahajan @ 2006-05-10 23:53 UTC (permalink / raw)
On Tue, 9 May 2006, Taco Hoekwater wrote:
> Aditya Mahajan wrote:
>>
>>
>> Thanks. For my present project I need short month names, and the
>> deadline is tomorrow. So, I will stick to the manual solution at the
>> moment.
>
> There should be no need for manual fixes, just do this:
>
> \unprotect
> \def\insertmonth#1#2#3%
> {\bibdoifelse{\@@pb@month}%
> {#1\doifnumberelse{\@@pb@month}%
> {\@EA\doconvertshortmonth\@EA{\@@pb@month}}%
> {\@@pb@month}#2}{#3}}
> \protect
> \def\doconvertshortmonth#1%
> {\ifcase#1\or % adjust names as you like
> jan\or feb\or mar\or apr\or may\or jun\or
> jul\or aug\or sep\or oct\or nov\or dec\else !!!\fi }
Thanks,
\def\doconvertshortmonth#1%
{\ifcase#1\or % adjust names as you like
Jan.\or Feb.\or Mar.\or Apr.\or May\or June\or
July\or Aug.\or Sep.\or Oct.\or Nov.\or Dec.\else !!!\fi }
gives me exactly what I want.
Aditya
--
Aditya Mahajan, EECS Systems, University of Michigan
http://www.eecs.umich.edu/~adityam || Ph: 7342624008
^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2006-05-10 23:53 UTC | newest]
Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2006-05-08 6:18 Bib bug in using months Aditya Mahajan
2006-05-08 13:08 ` Taco Hoekwater
2006-05-09 19:09 ` Aditya Mahajan
2006-05-09 19:26 ` Taco Hoekwater
2006-05-10 23:53 ` Aditya Mahajan
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 NNTP newsgroup(s).