LyXHow to change the bibliography language?

Information and discussion about LyX, a WYSIWYM editor, available for Linux, Windows and Mac OS X systems.
Post Reply
ExecutorElassus
Posts: 94
Joined: Wed Sep 07, 2011 3:14 pm

How to change the bibliography language?

Post by ExecutorElassus »

My document is German, but bibtex keeps generating an English-language bibliography. Language packages for German seem fine for Lyx itself (since spellcheck works) but aren't being recognized when producing the literature list. How can I fix this?

Thanks,

EE
PS- I can't actually search for posts relating to this topic because "bibliography" and "bibtex" get automatically ignored by the forum search. How can I force their inclusion to avoid potential dupes?

Recommended reading 2024:

LaTeXguide.org • LaTeX-Cookbook.net • TikZ.org

NEW: TikZ book now 40% off at Amazon.com for a short time.

And: Currently, Packt sells ebooks for $4.99 each if you buy 5 of their over 1000 ebooks. If you choose only a single one, $9.99. How about combining 3 LaTeX books with Python, gnuplot, mathplotlib, Matlab, ChatGPT or other AI books? Epub and PDF. Bundle (3 books, add more for higher discount): https://packt.link/MDH5p

Stefan Kottwitz
Site Admin
Posts: 10335
Joined: Mon Mar 10, 2008 9:44 pm

Re: How to change the bibliography language?

Post by Stefan Kottwitz »

Hi,

the forum search feature ignores too common words, such as "and", "this", "that", your tested keywords occured too often. So I reindexed the forum with relaxed conditions. Now "bibtex" and "bibliography" work as keywords.

Stefan
LaTeX.org admin
ExecutorElassus
Posts: 94
Joined: Wed Sep 07, 2011 3:14 pm

How to change the bibliography language?

Post by ExecutorElassus »

Cheers mate.

Now, is "try biblatex" still a valid solution to this problem? If so, using biblatex gives me the following errors when I try to render a document:

Code: Select all

 \newlength{\bibhang}
                          
Your command was ignored.
Type  I <command> <return>  to replace it with another command,
or  <return>  to continue without it.
...
 \bibliographystyle{plain}
                               
Use the package option 'style' instead.
I'm ignoring this command.
and similar.

am I missing something?

Thanks,

EE
User avatar
Stefan Kottwitz
Site Admin
Posts: 10335
Joined: Mon Mar 10, 2008 9:44 pm

How to change the bibliography language?

Post by Stefan Kottwitz »

\bibliographystyle is not used with biblatex. The error message tells that. Use a style option in this way:

Code: Select all

\usepackage[style=numeric]{biblatex}
Stefan
LaTeX.org admin
ExecutorElassus
Posts: 94
Joined: Wed Sep 07, 2011 3:14 pm

How to change the bibliography language?

Post by ExecutorElassus »

Actually, I get a whole bunch of errors.

Code: Select all

! LaTeX Error: Command \bibhang already defined.
               Or name \end... illegal, see p.192 of the manual.

See the LaTeX manual or LaTeX Companion for explanation.
Type  H <return>  for immediate help.
 ...                                              
                                                  
l.398 \newlength{\bibhang}
                          
Your command was ignored.
Type  I <command> <return>  to replace it with another command,
or  <return>  to continue without it.

...

! LaTeX Error: Command \citename already defined.
               Or name \end... illegal, see p.192 of the manual.

See the LaTeX manual or LaTeX Companion for explanation.
Type  H <return>  for immediate help.
 ...                                              
                                                  
l.7933 ...d*{\citename}{\blx@citexpunct{citename}}
                                                  
Your command was ignored.
Type  I <command> <return>  to replace it with another command,
or  <return>  to continue without it.
and so forth. I should point out a few things: The document is primarily German, but has passages in multiple languages. Lyx doesn't seem to like that.

This is my current preamble.

Code: Select all

\setkomafont{sectioning}{\rmfamily \bfseries}
\KOMAoptions{headings=small}
\usepackage{fontspec}
\usepackage{xunicode}
\usepackage{xltxtra}
\usepackage{polyglossia}
\usepackage{bidi}
\usepackage[style=numeric]{biblatex}
\usepackage[doublespacing]{setspace}
\deffootnote[0.75em]{0.5em}{1.25em}{\textsuperscript{\thefootnotemark}}
\setmainfont[Ligatures={Historic,Rare,Discretionary,TeX},Contextuals=Swash]{Linux Libertine}
\newfontfamily{\latinfont}[Script=Latin,Ligatures={Historic,Rare,Discretionary,TeX},Contextuals=Swash,Alternate=0,Style=Historic]{Linux Libertine}
\newfontfamily{\hebrewfont}[Script=Hebrew]{SBLHebrew}
\newfontfamily{\arabicfont}[Script=Arabic]{Lateef}
\errorcontextlines=10
Any advice?


Cheers,
EE
ExecutorElassus
Posts: 94
Joined: Wed Sep 07, 2011 3:14 pm

Re: How to change the bibliography language?

Post by ExecutorElassus »

So, I've been looking through the document. I don't have any other references to a bibliography, except the lines in the preamble, and the embedded bibliography in Lyx itself. So why is Xelatex finding the \bibliographystyle command? Is Lyx putting those lines in itself when it embeds a bibliography? Is there a way to prevent it from doing so?

Cheers,

EE
User avatar
Stefan Kottwitz
Site Admin
Posts: 10335
Joined: Mon Mar 10, 2008 9:44 pm

How to change the bibliography language?

Post by Stefan Kottwitz »

Perhaps attach a small LyX document as a Infominimal working example for testing and verifying the problem. It can be a much reduced copy of your original document which still shows the problem. Otherwise it's a quite theoretical issue. As you say, there's something which isn't visible yet.

Stefan
LaTeX.org admin
ExecutorElassus
Posts: 94
Joined: Wed Sep 07, 2011 3:14 pm

Re: How to change the bibliography language?

Post by ExecutorElassus »

this document gives the same error messsages. Please let me know if you find anything.

Cheers,

EE
Attachments
exposee-testfile.lyx
test file
(5.84 KiB) Downloaded 711 times
ExecutorElassus
Posts: 94
Joined: Wed Sep 07, 2011 3:14 pm

Re: How to change the bibliography language?

Post by ExecutorElassus »

Have you had a chance to look at the file I attached? I still don't understand why Lyx is having problems with this. Let me know what you find.

Thanks,

EE
ExecutorElassus
Posts: 94
Joined: Wed Sep 07, 2011 3:14 pm

How to change the bibliography language?

Post by ExecutorElassus »

I solved it: in the annotation to the Biblatex-citation-styles module the link to the respective wiki lays out the (rather convoluted) process for actually getting biblatex to work with Lyx.

This is a very handy package to use, with some very powerful features (and thus an attractive module to add); the fact that the process for using it is nontrivial would suggest that the instructions for doing so should be made more explicit.

Anyway, I've solved this particular problem, and now I have a 200+-page guide to read to make my citations all fancy.

Cheers,

EE
Post Reply