1

I'm writing a document in Hebrew, but my references are entirely in English. Because of issues with text alignment in RTL languages, the bibliography is contained in an English block:

\addcontentsline{toc}{chapter}{ביבליוגרפיה} %Ideally this will be removed when a solution is found
\begin{english}
\bibliographystyle{apalike}
\bibliography{./bibliography}
\end{english}

Even so, because the document is in Hebrew, the title of the bibliography needs to be right-aligned and manually set to be in Hebrew. If I remove the \begin{english} block, the bibliography title is correctly formatted fits Hebrew (I assume this is the work of polyglossia), but the references themselves are badly muddled up - punctuation in particular is ruined entirely.

I imagine the solution will either be to render the bibliography without the title and add it in manually or to override whatever it is polyglossia does to change the bibliography title. I have found no way to do either.

MWE:

% Compiled with XeLaTeX
\documentclass[12pt]{report}

\usepackage[sort]{natbib}
\usepackage{polyglossia}
\usepackage{bidi}
\setdefaultlanguage{hebrew}
\setotherlanguage{english}
\addto\captionsenglish{
  \renewcommand{\bibname}{ביבליוגרפיה} % Swap bibliography title to Hebrew
}
\begin{document}
\setRL
לורם איפסום דולור סיט אמת

% Bibliography:
\clearpage %This replaces the page break at the start of the bibliography
\addcontentsline{toc}{chapter}{ביבליוגרפיה} 
\begin{english} % Insert the bibliography in English
    \bibliographystyle{apalike}
    \bibliography{./bibliography}
\end{english}
\end{document}
  • @Werner I thought it was the RTL issue which was really the focus of this question. If so, I don't think it can be a duplicate. – cfr Dec 18 '14 at 3:26
  • Welcome to TeX.SX! Please help us to help you and complete your code to create a minimal working example (MWE). We want something we can copy-paste-compile to see the issue. Not only does this make it easier to help, but it also avoids people posting solutions which turn out to depend on mistaken assumptions (e.g. about your document class or the options you are passing to a polyglossia or whatever). That is, people are more able and more willing to help if you help them to help you. – cfr Dec 18 '14 at 3:28
  • @Werner, unfortunately the title is still left-aligned. I also tried to set the command to \RL{ביבליוגרפיה} but it seems the \RL directive was overridden by something else. – Noamyoungerm Dec 19 '14 at 14:20
1

In the technical sense of the word, this is an answer, but it's not acceptable because there is bound to be a more elegant solution. It is at best an example of the desired effect.

\documentclass[12pt]{report}

\usepackage[sort]{natbib}
\usepackage{polyglossia}
\usepackage{bidi}
\setdefaultlanguage{hebrew}
\setotherlanguage{english}
\addto\captionsenglish{
  \renewcommand{\bibname}{} % Empty bibliography title
}
\begin{document}
\setRL
לורם איפסום דולור סיט אמת

% Bibliography:
\clearpage %This replaces the page break at the start of the bibliography
\begingroup
    \let\clearpage\relax % Omit the page break at the start of the bibliography
    \addcontentsline{toc}{chapter}{ביבליוגרפיה} % Because starred chapters don't add to the TOC
    \chapter*{ביבליוגרפיה} % Manually add the title without numbering
    \vspace{-86pt} % Empty chapters add lots of vspace which is normally useful. Manually remove it
    \begin{english} % Insert the bibliography in English
        \bibliographystyle{apalike}
        \bibliography{./bibliography}
    \end{english}
\endgroup
\end{document}
0

Yes, there definitely is an easier way to change the bibliography heading for natbib:

\renewcommand{\bibsection}{\section{Whatever You Prefer}}

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.