4

How can I make the reference list as: 4 letters a gap and the two numbers of the year,

[Taja 00a] E. Tajahuerce and B. Javidi, "Encrypting
three-dimensional information with digital holography," Appl. Opt., 39, 6595-6601, (2000).

where [Taja 00a] means the first four letter of the author's surname, a space, and the year (only two numbers).

Also, I would like to cite this reference as [Taja 00a].

I have been reading the natbib package and trying different things such as \citep or \citealp, and the \setcitestyle command. Nothing lucky so far. Could anyone help me define this please?

This is a minimal example I am testing on.

\documentclass{article}

\usepackage{xstring}
\usepackage[style=alphabetic,maxbibnames=99]{biblatex}
\addbibresource{Thesis_References.bib}

\DeclareLabelalphaTemplate{
  \labelelement{
    \field[strwidth=4,strside=left,names=1,lowercase]{labelname}
    }
  \labelelement{
    \field[strwidth=2,strside=right]{year}
    }
}

\renewcommand{\labelalphaothers}{}

\DeclareFieldFormat{labelalpha}{\padded{#1}}

\begin{document}

\cite{JavidiBOOK:2005}, \cite{Matoba:09}. \cite{Matoba:04, Unnikrishnan:06}

\printbibliography

\end{document}
Shea
  • 93
  • If you're ready to use the biblatex package, you might want to check out: http://tex.stackexchange.com/questions/105690/custom-biblatex-reference-style – Christoph B. Apr 16 '13 at 17:29
  • Are you already using a bibliography style such as alpha? Please advise. – Mico Apr 16 '13 at 18:16
  • Thanks very much for your tips. I am testing the biblatex using alphaTemplate. Haven't got what I want yet. Please help. – Shea Apr 17 '13 at 15:06
  • @Shea: Which "alphaTemplate"? Can you provide a minimal working example with your current settings? – Marco Daniel Apr 17 '13 at 15:20
  • @MarcoDaniel How do I get the \printbibliography work. The reference list can not be shown. – Shea Apr 17 '13 at 15:45
  • @Shea: Did you run pdflatex->biber->pdflatex->pdflatex – Marco Daniel Apr 17 '13 at 15:46
  • @MarcoDaniel I added Biber into the typesetting in TeXworks. I am using XeLaTeX, and I am guessing this wouldn't be a problem. The console gives me: Entity: line 1855: parser error : expected '>' bcf:fieldtitle</bcf ^ Entity: line 1855: parser error : Opening and ending tag mismatch: field line 0 and bcf bcf:fieldtitle</bcf ^ – Shea Apr 17 '13 at 16:10
  • I am trying to fix this biber problem first. – Shea Apr 17 '13 at 16:10
  • @Shea: First you should remove all auxiliary files. To simplify the compilation you can use the tool arara. – Marco Daniel Apr 17 '13 at 16:55
  • @MarcoDaniel I successfully installed arara (which is really amazing), and used the following derectives: % arara: xelatex: { synctex: true } % arara: makeindex: { style: stylefile.ist } % arara: biber % arara: xelatex: { synctex: true } % arara: xelatex: { synctex: true } and this error can not be solved: \abx@ffd@*@labelalpha #1->\padded {#1} l.56 \endentry – Shea Apr 17 '13 at 18:14
  • @Shea: The command \padded is undefined. That's the reason for the error. Remove the command and everything works fine. – Marco Daniel Apr 17 '13 at 18:31
  • @MarcoDaniel Thanks Marco. BTW, arara is very cool. – Shea Apr 17 '13 at 19:16
  • @MarcoDaniel Just a small question, how do I put a space between the two labelelements, like [Taja 00a] – Shea Apr 17 '13 at 20:48
  • @Shea: Currently I can't test. I will answer later. – Marco Daniel Apr 18 '13 at 06:30
  • @Shea: You can do the following addition to \DeclareLabelalphaTemplate: Use: \labelelement{\literal{~}} The complete code is: \DeclareLabelalphaTemplate{ \labelelement{ \field[strwidth=4,strside=left,names=1,lowercase]{labelname} } \labelelement{ \literal{~} } \labelelement{ \field[strwidth=2,strside=right]{year} } } – Marco Daniel Apr 18 '13 at 15:22
  • @MarcoDaniel Thanks for your reply. I was testing the \literal earlier and got this biber error that I cann't get through: like the same question in http://tex.stackexchange.com/questions/66459/biblatex-with-biber-backend-results-in-undefined-control-sequences-but-not-with I use Texworks + MikTeX, and the biblatex is downloaded by MikTex automatically. Therefore I think the version of biblatex should be the latest. – Shea Apr 18 '13 at 16:08
  • @Shea: Sorry. I am using the development version of biblatex (version 2.5+) and biber (biber version: 1.6 (beta)). With the current version you should try \literal{{ }} – Marco Daniel Apr 18 '13 at 16:20
  • @MarcoDaniel It works! I'd better update to the new version of biblatex. Now I am going to define the entry format (volume, number, and etc.) to meet the requirements. Thanks a million for your time!! – Shea Apr 18 '13 at 16:31
  • @Shea: I think your original question has changed. Maybe you should ask a new question with your current biblatex settings and we can close this question. – Marco Daniel Apr 18 '13 at 17:53
  • @MarcoDaniel Yes, the basic customized settings for my case can be found in http://tex.stackexchange.com/questions/12806/guidelines-for-customizing-biblatex-styles and if I run into some problems with this I will open a new question. Let's close this. Thanks again:-) – Shea Apr 18 '13 at 18:42

0 Answers0