# Change month from jan to Jan. in reference

I am using Mendeley to manage my references. Mendeley generates library.bib, I am using when I write a paper.

The library.bib file is generated by Mendeley, it looks like

Automatically generated by Mendeley Desktop 1.17.11
Any changes to this file will be lost if it is regenerated by Mendeley.
BibTeX export options can be customized via Options -> BibTeX in Mendeley Desktop
@article{citationkey,
abstract = {...},
author = {...},
doi = {...},
file = {:path.pdf:pdf},
isbn = {-},
issn = {-},
journal = {-},
keywords = {a,b,c},
mendeley-tags = {a,b,c},
month = {apr},
number = {4},
pages = {100--105},
pmid = {0000},
title = {{TITLE}},
url = {http://abc.com},
volume = {100},
year = {2016}
}

@inproceedings{citation2,
...


, even I change this manually, it is returned based on the entries in Mendeley.

If I open the library.bib by JabRef, then I can see this month = {nov}, item from every entry.

The problem is when I import the references in my mytex.tex using

\bibliographystyle{IEEEtran}
\bibliography{library}


, it shows

[1] Author, “Title,” Journal, jun 2017.


But what I want to do is

[1] Author, “Title,” Journal, Jun. 2017.


You can see .bst what I am using from here: ctan.org.

I tried to change this IEEEtran.bst file, I only could find the code below

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%% PREDEFINED STRING MACROS %%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

MACRO {jan} {"Jan."}
MACRO {feb} {"Feb."}
MACRO {mar} {"Mar."}
MACRO {apr} {"Apr."}
MACRO {may} {"May"}
MACRO {jun} {"Jun."}
MACRO {jul} {"Jul."}
MACRO {aug} {"Aug."}
MACRO {sep} {"Sep."}
MACRO {oct} {"Oct."}
MACRO {nov} {"Nov."}
MACRO {dec} {"Dec."}


Unfortunately, I do not know how to use these macros.

Even there seems to be related to publication date item in IEEEtran.bst, but still I could not find the way to use the above macros.

FUNCTION {format.date}
{
month "month" bibinfo.check duplicate$empty$
year  "year" bibinfo.check duplicate$empty$
{ swap$'skip$
{ this.to.prev.status
this.status.std
cap.status.std
"there's a month but no year in " cite$* warning$ }
if$* } { this.to.prev.status this.status.std cap.status.std swap$ 'skip${ swap$
" " * swap$} if$
*
}
if\$
}


.

And I would like to know how to edit or modify .bst, but I could not find any manual yet.

If someone knows it, please let me know.

• Can you please show a minimal compilable document that shows the code you use to generate the bibliography, along with a sample .bib file item that shows the problem. Because the conversion should be done automatically. – Alan Munn Oct 24 '17 at 16:31
• @AlanMunn Thank you for your interest. Here is the link, I will update the question. Here is the link, ctan.org/tex-archive/macros/latex/contrib/IEEEtran/… – Creatlee Oct 24 '17 at 16:40
• That's not what I asked for. The link isn't helpful. See How to write a MWEB (Minimal working example with Bibliography)?. – Alan Munn Oct 24 '17 at 16:48
• @AlanMunn I will revise it now :) thank you! – Creatlee Oct 24 '17 at 16:55
• Look at @mico 's answer and then your question. The .bib entry is helpful, but you also need to show the document code that produces the problem. (And the rest of your question is really not necessary.) The point is a bit moot now, since you have a correct answer, but for future questions you should really post minimal compilable documents that show the problem you're having. – Alan Munn Oct 24 '17 at 17:11

You need to remove the curly braces from the argument of the month field. E.g., instead of

month = {nov},


you need

month = nov,


A full MWE (minimum working example):

\RequirePackage{filecontents}
\begin{filecontents}{mybib.bib}
@misc{aa,
author = "Anne Author",
title  = "Thoughts",
year   = 3001,
month  = jan,
}
\end{filecontents}

\documentclass{article}
\bibliographystyle{IEEEtran}
\begin{document}
\nocite{*}
\bibliography{mybib}
\end{document}

• Thank you for your comment. But it is not what I write, it is generated by Mendeley. And I cannot revise it manually unless I don't use Mendeley. – Creatlee Oct 24 '17 at 17:05
• @Creatlee - Can't you edit the Mendeley database? – Mico Oct 24 '17 at 17:17
• This is a problem with Mendeley, not TeX. And it has further ramifications too. See mendeley.uservoice.com/forums/4941-general/suggestions/… – Alan Munn Oct 24 '17 at 17:18
• @AlanMunn, Mico I really appreciate to you for the answer! The link, Alan you shared here, is what I looked for! I didnt know about these known errors in Mendeley. I definitely have a look, and do it . And about my MWEB,, I really have almost nothing particular lines in .tex file. But I really appreciate to you! Have a good day! – Creatlee Oct 25 '17 at 7:20
• @Creatlee -You're most welcome! I suspect that until and unless Mendeley fixes what should be considered to be a bug, viz., its insistence on automatically surrounding the contents of a field with curly braces, you may be stuck with having to write month = {Jan.}, etc. A better bet may be to export the Mendeley database to a .bib file and to strip off the surplus curly braces from the month` fields. (Of course, do this only once the list of bib entries is more or less final.) – Mico Oct 25 '17 at 8:14