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
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
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
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
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
participants (2)
-
Aditya Mahajan
-
Taco Hoekwater