1

I use biblatex and biber. I want "edition" part of my bibliography appears "edisi pertama","edisi kedua","edisi ketiga",etc instead of "1st edition","2nd edition","3rd edition",etc. I have successfully changed "edition" to "edisi" and but how to put it before "pertama","kedua"...

UPDATED: I write my thesis in separated latex files. Here is the main one:

\documentclass[12pt, a4paper, onecolumn, oneside, final]{report}
\usepackage{uithesis}
\input{laporan_setting}
\begin{document}
\include{sampul}
\setcounter{page}{1}
\pagenumbering{arabic}
\include{bab1}
\singlespacing
\printbibliography
\end{document}

And this is uithesis.sty:

\usepackage[english]{babel}
\usepackage{csquotes}
\usepackage{comment}
\usepackage{tikz}
  \usetikzlibrary{patterns}
\usepackage{Sweave}
\usepackage{booktabs}
\usepackage{bigstrut}
\usepackage{multirow}
\usepackage{pgfplots}
\pgfmathdeclarefunction{gauss}{2}{
 \pgfmathparse{1/(#2*sqrt(2*pi))*exp(-((x-#1)^2)/(2*#2^2))}}
\usepackage{placeins}
\usepackage{tocloft}
\usepackage{tocbibind}
\usepackage{url}
   \urlstyle{same}
\usepackage{graphicx}
\usepackage{setspace}
\usepackage[paper=a4paper,headheight=0pt,headsep=2.5cm,footskip=1.4cm,
 left=4cm,top=4cm,right=3cm,bottom=3cm]{geometry}
\usepackage{changepage}
\usepackage[font=footnotesize,format=plain,labelfont=bf,up,textfont=up]{caption}
\usepackage{floatrow}
   \floatsetup[table]{style=plaintop,objectset=centering,footskip=3.5pt}
   \floatsetup[figure]{style=plain,floatwidth=1.2\textwidth}
   \renewcommand\FBbskip{2pt} 
\usepackage{amsmath}
\usepackage{amssymb}
\usepackage{stmaryrd}
\usepackage{pslatex}
\usepackage{fancyhdr}
\usepackage{pdfpages}
\usepackage[ConnyRevised]{fncychap}
\usepackage{colortbl}
\usepackage{float}
   \floatplacement{figure}{H}
   \floatplacement{table}{H}
\usepackage[style=authoryear,backend=biber,abbreviate=false]{biblatex}
 \addbibresource{dafpus.bib}
 \bibitemsep .5cm
 \ifmorenames{true}
 \NewBibliographyString{in}
 \NewBibliographyString{and}
 \NewBibliographyString{bibliography}
 \NewBibliographyString{edition}
 \DefineBibliographyStrings{english}{%
    in = {dalam},
    and = {dan},
    bibliography = {Daftar Pustaka},
    edition = {edisi}}
  • 1
    Welcome to TeX.SX! What kind of language is edisi? Is \usepackage[yourlanguage]{babel} not an option? Please help us to help you and add a minimal working example (MWE) that illustrates your problem. It will be much easier for us to reproduce your situation and find out what the issue is when we see compilable code, starting with \documentclass{...} and ending with \end{document}. – user31729 Feb 20 '15 at 10:48
  • @Christian: It's bahasa, I just have edited my question – cubic Feb 20 '15 at 14:34
  • Your example is still not compilable for us. Also, I might add that it is not really minimal in the strictest (and probably not even in the loosest) sense of the word, the .sty file certainly contains a lot of packages not at all related to the issue at hand (changepage, fancyhdr, pgfplots to name but a few randomly chosen ones, basically everything but biblatex and its commands and babel/csquotes is unnecessary). – moewe Feb 20 '15 at 15:31
  • You could go with \DeclareFieldFormat{edition}{\ifinteger{#1}{\bibstring{edition}~\mkbibordedition{#1}}{#1\isdot}} to have the word "edition" before the number, but you also seem to want to change any positive integer to a "word" which seems quite hard, but has been implemented for some languages. The easiest way would probably be to just change the edition field to edition = {edisi ketiga}. – moewe Feb 20 '15 at 15:36
  • @moewe, Oh silly me, I just changed the edition field as you suggested and it works perfectly. Thank you very much. – cubic Feb 21 '15 at 2:31
1

The easiest way is to input the text as you want to see it into the edition field, for example

edition = {edisi ketiga}

This, of course, is not that automatic, as we would like it to be. For some languages (where the word for edition does not vary with the number of the edition)

\DeclareFieldFormat{edition}{%
  \ifinteger{#1}
    {\bibstring{edition}~\mkbibordeditio‌​n{#1}}
    {#1\isdot}}

might suffice. Here, the number stays an ordinal formatted as defined in the .lbx file.

There are some solutions to convert an integer into the corresponding words, see Convert any number to corresponding word, you will have to go through great lengths though if there has to be some change of the word for "edition" depending on the value of the edition field.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.