Quantcast
Channel: Question and Answer » babel
Viewing all 75 articles
Browse latest View live

Language conflict between bohr and babel [closed]

$
0
0

This weekend I updated my MikTEX 2.9 installation and installed packages. To my suprise I promptly received an error message when recompiling a tex file (that previously compiled without a problem). The message read:

file ‘elements_elements_english.def’ not found

After a little search it turned out the Bohr package was updated with a new feature called Elements. As such a great package (and I use Bohr in my chemistry classes along other packages by Clemens Niederberger – Thank you for those!). But the Bohr package alone did not cause the problem. It was caused by the language selection in Babel. As I changed the selection from Dutch to English the error was resolved:

documentclass{article}
usepackage[dutch,english]{babel}
usepackage{bohr}
begin{document}
bohr{19}{K}
end{document}

Remove the option English in Babel and the error will return.
Is there another way to resolve this issue?
Thanks

Other info: OS Windows 7 Pro / Textstudio 2.94 / MikTEX 2.9 (all updated)


Get error on calling chapter (…) input{chapters/intro}

$
0
0

So, I’m writting a dissertation in portuguese and I’m using the class REPORT, and I’ve put the chapters of my disseration in a separated folder containing these chapters, so that I call them

chapter{Introdução}
input{chapters/intro}

I’ve being following a very simple example provided in this link:

https://www.sharelatex.com/blog/2013/08/02/thesis-series-pt1.html

My intro.tex is just plain text, but it halts on the first non english character appearing in the word “questões”. The error shown is:

Errors:
chapters/intro.tex:1: Missing $ inserted. [Uma das questõ]

My preamble is using latin and brazilian:

documentclass[12pt,a4paper,fleqn,leqno,openright,twoside]{report}

usepackage[brazilian]{babel}
usepackage[utf8,latin1]{inputenc}
usepackage[T1]{fontenc}
usepackage{lmodern}
usepackage{microtype}
usepackage{amsmath}
usepackage{amssymb}
usepackage{amsfonts} 
usepackage{amsthm}
usepackage{geometry}
usepackage{graphicx}
graphicspath{ {images/} } 
usepackage{xcolor}
usepackage{cite}
usepackage{cancel}
usepackage{fancyhdr}
pagestyle{fancy}
usepackage[onehalfspacing]{setspace}
usepackage{bm}
usepackage{hyperref}

title{
    {Thesis Title}\
    {large Institution Name}\
    {includegraphics{xxxx.pdf}}
}
author{Author Name}
date{Day Month Year}

begin{document}

maketitle

chapter*{Abstract}
xxxxxxxxxxxxxxx
tableofcontents

chapter{Introdução}
input{chapters/intro}

What is the problem? If I paste the same text inside this main tex file it does not yield the same error.

Biblatex-apa not replacing ampersand for citations and references with Spanish options

$
0
0

I have read that the spanish-apa.lbx file contains the command setcounter{smartand}{0} to prevent the ampersand from showing up and uses y instead. However, I can’t seem to manage to get this right when using parencite, or actually any other citation for more than one author while using the Spanish biblatex-apa style.

MWE:

documentclass{article}
usepackage[english,spanish]{babel}
usepackage[T1]{fontenc}
usepackage[utf8]{inputenc}
usepackage[style=apa,backend=biber]{biblatex}
DeclareLanguageMapping{spanish}{spanish-apa}
usepackage{csquotes}

begin{filecontents}{refs.bib}
@book{Guy2010,
Author = {Some Guy and Another Dude},
Publisher = {A Publisher},
Title = {A reference book to everything},
Year = {2010}
}
end{filecontents}

addbibresource{refs.bib}

begin{document}
Localisation is a headache. parencite{Guy2010}
printbibliography
end{document}

The Spanish lbx file is up to date, and everything in general works as expected.

edit:

I followed the instructions given below (refer to Alan Munn’s answer) but it turns out I was doing in the wrong place. After I created the proper local texmf structure to host the renewed file where it should be, everything is working as expected. Thank you very much for the expertise!

babel/plain.def : ! Illegal parameter number in definition of @yargdef

$
0
0

I tried to generate plain TeX cyrillic format files using makefmts.sh script from cyrplain package, here is the content of this script:

#!/bin/sh
tex -ini -fmt=cyrtex -progname=tex cyrtex.ini
tex -ini -fmt=cyramstex -progname=amstex cyramstx.ini
tex -ini -fmt=cyrtexinfo -progname=texinfo cyrtxinf.ini
tex -ini -fmt=cyrblue -progname=tex cyrblue.ini

pdftex -ini -fmt=cyrpdftex -progname=pdftex cyrtex.ini
pdftex -ini -fmt=cyrpdftexinfo -progname=pdftexinfo cyrtxinf.ini

Running the script, i’ve received these error messages (among others):

(/usr/local/texlive/2015basic/texmf-dist/tex/generic/babel/plain.def
! Illegal parameter number in definition of @yargdef.
<to be read again>
                   relax
l.144   let@hash@relax

?
! Illegal parameter number in definition of @yargdef.
<to be read again>
                   the
l.149     edefreserved@a{reserved@a@hash@the
                                                 @tempcntb}%
?
! Illegal parameter number in definition of @yargdef.
<to be read again>
                   l@ngrel@x
l.152   l@ngrel@x
                  expandafterdefexpandafter#1reserved@a}
?

Here are lines 141-152 from plain.def:

longdef@yargdef#1#2#3{%
  @tempcnta#3relax
  advance @tempcnta @ne
  let@hash@relax
  edefreserved@a{ifx#2tw@ [@hash@1]fi}%
  @tempcntb #2%
  @whilenum@tempcntb <@tempcnta
  do{%
    edefreserved@a{reserved@a@hash@the@tempcntb}%
    advance@tempcntb @ne}%
  let@hash@##%
  l@ngrel@xexpandafterdefexpandafter#1reserved@a}

Can anyone tell me, please, what went wrong?


Here is the content of cyrtex.log up to the first error:

This is pdfTeX, Version 3.14159265-2.6-1.40.16 (TeX Live 2015) (INITEX)  7 JUL 2015 12:56
 restricted write18 enabled.
 %&-line parsing enabled.
**cyrtex.ini
(/usr/local/texlive/2015basic/texmf-dist/tex/plain/cyrplain/cyrtex.ini
(/usr/local/texlive/2015basic/texmf-dist/tex/plain/cyrplain/cyrtex.tex
(/usr/local/texlive/2015basic/texmf-dist/tex/plain/cyrplain/cyrtex.cfg
(/usr/local/texlive/2015basic/texmf-dist/tex/latex/cyrillic/lcydefs.tex))
(/usr/local/texlive/2015basic/texmf-dist/tex/plain/base/plain.tex
Preloading the plain format: codes, registers,
maxdimen=dimen10
hideskip=skip10
centering=skip11
p@=dimen11
z@=dimen12
z@skip=skip12
voidb@x=box10
 parameters,
smallskipamount=skip13
medskipamount=skip14
bigskipamount=skip15
normalbaselineskip=skip16
normallineskip=skip17
normallineskiplimit=dimen13
jot=dimen14
interdisplaylinepenalty=count23
interfootnotelinepenalty=count24
 fonts,
(/usr/local/texlive/2015basic/texmf-dist/tex/plain/cyrplain/cyrcmfnt.tex
fonts, more fonts,)
itfam=fam4
slfam=fam5
bffam=fam6
ttfam=fam7
 macros,
strutbox=box11
mscount=count25
tabs=box12
tabsyet=box13
tabsdone=box14
 math definitions,
rootbox=box15
p@renwd=dimen15
 output routines,
headline=toks10
footline=toks11
footins=insert254
topins=insert253
 hyphenation
(/usr/local/texlive/2015basic/texmf-dist/tex/generic/babel/hyphen.cfg
File: hyphen.cfg Babel hyphens 3.9l <2014/09/25>

(/usr/local/texlive/2015basic/texmf-dist/tex/generic/babel/switch.def
File: switch.def Babel switching mechanism 3.9l <2014/09/25>

(/usr/local/texlive/2015basic/texmf-dist/tex/generic/babel/plain.def
@tempcnta=count26
@tempcntb=count27
))
l@english=language0

(/usr/local/texlive/2015basic/texmf-dist/tex/generic/hyphen/hyphen.tex)
l@usenglish=language0
l@USenglish=language0
l@american=language0
l@dumylang=language1

(/usr/local/texlive/2015basic/texmf-dist/tex/generic/hyphen/dumyhyph.tex)
l@nohyphenation=language2

(/usr/local/texlive/2015basic/texmf-dist/tex/generic/hyphen/zerohyph.tex)
l@basque=language3

(/usr/local/texlive/2015basic/texmf-dist/tex/generic/hyph-utf8/loadhyph/loadhyp
h-eu.tex EC Basque hyphenation patterns
(/usr/local/texlive/2015basic/texmf-dist/tex/generic/hyph-utf8/conversions/conv
-utf8-ec.tex)
(/usr/local/texlive/2015basic/texmf-dist/tex/generic/hyph-utf8/patterns/tex/hyp
h-eu.tex))
l@bulgarian=language4

(/usr/local/texlive/2015basic/texmf-dist/tex/generic/hyph-utf8/loadhyph/loadhyp
h-bg.tex T2A Bulgarian hyphenation patterns
(/usr/local/texlive/2015basic/texmf-dist/tex/generic/hyph-utf8/conversions/conv
-utf8-t2a.tex)
(/usr/local/texlive/2015basic/texmf-dist/tex/generic/hyph-utf8/patterns/tex/hyp
h-bg.tex))
l@czech=language5

(/usr/local/texlive/2015basic/texmf-dist/tex/generic/hyph-utf8/loadhyph/loadhyp
h-cs.tex EC Czech hyphenation patterns (Pavel Sevecek, v3, 1995)
(/usr/local/texlive/2015basic/texmf-dist/tex/generic/hyph-utf8/conversions/conv
-utf8-ec.tex)
(/usr/local/texlive/2015basic/texmf-dist/tex/generic/hyph-utf8/patterns/tex/hyp
h-cs.tex))
l@danish=language6

(/usr/local/texlive/2015basic/texmf-dist/tex/generic/hyph-utf8/loadhyph/loadhyp
h-da.tex EC Danish hyphenation patterns
(/usr/local/texlive/2015basic/texmf-dist/tex/generic/hyph-utf8/conversions/conv
-utf8-ec.tex)
(/usr/local/texlive/2015basic/texmf-dist/tex/generic/hyph-utf8/patterns/tex/hyp
h-da.tex))
l@dutch=language7

(/usr/local/texlive/2015basic/texmf-dist/tex/generic/hyph-utf8/loadhyph/loadhyp
h-nl.tex EC Dutch hyphenation patterns
(/usr/local/texlive/2015basic/texmf-dist/tex/generic/hyph-utf8/conversions/conv
-utf8-ec.tex)
(/usr/local/texlive/2015basic/texmf-dist/tex/generic/hyph-utf8/patterns/tex/hyp
h-nl.tex))
l@ukenglish=language8

(/usr/local/texlive/2015basic/texmf-dist/tex/generic/hyph-utf8/loadhyph/loadhyp
h-en-gb.tex ASCII Hyphenation patterns for British English
(/usr/local/texlive/2015basic/texmf-dist/tex/generic/hyph-utf8/patterns/tex/hyp
h-en-gb.tex))
l@british=language8
l@UKenglish=language8
l@usenglishmax=language9

(/usr/local/texlive/2015basic/texmf-dist/tex/generic/hyph-utf8/loadhyph/loadhyp
h-en-us.tex ASCII Hyphenation patterns for American English
(/usr/local/texlive/2015basic/texmf-dist/tex/generic/hyph-utf8/patterns/tex/hyp
h-en-us.tex))
l@finnish=language10

(/usr/local/texlive/2015basic/texmf-dist/tex/generic/hyph-utf8/loadhyph/loadhyp
h-fi.tex EC Finnish hyphenation patterns
(/usr/local/texlive/2015basic/texmf-dist/tex/generic/hyph-utf8/conversions/conv
-utf8-ec.tex)
(/usr/local/texlive/2015basic/texmf-dist/tex/generic/hyph-utf8/patterns/tex/hyp
h-fi.tex))
l@french=language11

(/usr/local/texlive/2015basic/texmf-dist/tex/generic/hyph-utf8/loadhyph/loadhyp
h-fr.tex EC French hyphenation patterns (V2.12, 2002/12/11)
(/usr/local/texlive/2015basic/texmf-dist/tex/generic/hyph-utf8/conversions/conv
-utf8-ec.tex)
(/usr/local/texlive/2015basic/texmf-dist/tex/generic/hyph-utf8/patterns/tex/hyp
h-fr.tex))
l@patois=language11
l@francais=language11
l@german=language12

(/usr/local/texlive/2015basic/texmf-dist/tex/generic/hyph-utf8/loadhyph/loadhyp
h-de-1901.tex EC German hyphenation patterns (traditional orthography)
(/usr/local/texlive/2015basic/texmf-dist/tex/generic/hyphen/dehypht.tex
German Traditional Hyphenation Patterns `dehypht' Version 3.2a <1999/03/03>
(Formerly known under the name `ghyph31' and `ghyphen'.)))
l@ngerman=language13

(/usr/local/texlive/2015basic/texmf-dist/tex/generic/hyph-utf8/loadhyph/loadhyp
h-de-1996.tex EC German hyphenation patterns (reformed orthography)
(/usr/local/texlive/2015basic/texmf-dist/tex/generic/hyphen/dehyphn.tex
New German Hyphenation Patterns `dehyphn' Rev.31 <2001-05-07> (WaS)))
l@swissgerman=language14

(/usr/local/texlive/2015basic/texmf-dist/tex/generic/hyph-utf8/loadhyph/loadhyp
h-de-ch-1901.tex
EC Swiss-German hyphenation patterns (traditional orthography)
(/usr/local/texlive/2015basic/texmf-dist/tex/generic/hyph-utf8/conversions/conv
-utf8-ec.tex)
(/usr/local/texlive/2015basic/texmf-dist/tex/generic/hyph-utf8/patterns/tex/hyp
h-de-ch-1901.tex
Swiss-German Hyphenation Patterns (Traditional Orthography) `dehyphts-x' 2014-0
5-21 (WL)))
l@hungarian=language15

(/usr/local/texlive/2015basic/texmf-dist/tex/generic/hyph-utf8/loadhyph/loadhyp
h-hu.tex EC Hungarian hyphenation patterns (v20110815)
(/usr/local/texlive/2015basic/texmf-dist/tex/generic/hyph-utf8/conversions/conv
-utf8-ec.tex)
(/usr/local/texlive/2015basic/texmf-dist/tex/generic/hyph-utf8/patterns/tex/hyp
h-hu.tex Huhyphn - hungarian hyphenation patterns v20110815))
l@italian=language16

(/usr/local/texlive/2015basic/texmf-dist/tex/generic/hyph-utf8/loadhyph/loadhyp
h-it.tex ASCII Italian hyphenation patterns
(/usr/local/texlive/2015basic/texmf-dist/tex/generic/hyph-utf8/patterns/tex/hyp
h-it.tex))
l@mongolian=language17

(/usr/local/texlive/2015basic/texmf-dist/tex/generic/hyph-utf8/loadhyph/loadhyp
h-mn-cyrl.tex T2A (New) Mongolian hyphenation patterns
(/usr/local/texlive/2015basic/texmf-dist/tex/generic/hyph-utf8/conversions/conv
-utf8-t2a.tex)
(/usr/local/texlive/2015basic/texmf-dist/tex/generic/hyph-utf8/patterns/tex/hyp
h-mn-cyrl.tex))
l@mongolianlmc=language18

(/usr/local/texlive/2015basic/texmf-dist/tex/generic/hyph-utf8/loadhyph/loadhyp
h-mn-cyrl-x-lmc.tex LMC Mongolian hyphenation patterns
(/usr/local/texlive/2015basic/texmf-dist/tex/generic/hyph-utf8/conversions/conv
-utf8-lmc.tex)
(/usr/local/texlive/2015basic/texmf-dist/tex/generic/hyph-utf8/patterns/tex/hyp
h-mn-cyrl-x-lmc.tex))
l@bokmal=language19

(/usr/local/texlive/2015basic/texmf-dist/tex/generic/hyph-utf8/loadhyph/loadhyp
h-nb.tex EC Norwegian Bokmal hyphenation patterns
(/usr/local/texlive/2015basic/texmf-dist/tex/generic/hyph-utf8/conversions/conv
-utf8-ec.tex)
(/usr/local/texlive/2015basic/texmf-dist/tex/generic/hyph-utf8/patterns/tex/hyp
h-nb.tex
(/usr/local/texlive/2015basic/texmf-dist/tex/generic/hyph-utf8/patterns/tex/hyp
h-no.tex)))
l@norwegian=language19
l@norsk=language19
l@nynorsk=language20

(/usr/local/texlive/2015basic/texmf-dist/tex/generic/hyph-utf8/loadhyph/loadhyp
h-nn.tex EC Norwegian Nynorsk hyphenation patterns
(/usr/local/texlive/2015basic/texmf-dist/tex/generic/hyph-utf8/conversions/conv
-utf8-ec.tex)
(/usr/local/texlive/2015basic/texmf-dist/tex/generic/hyph-utf8/patterns/tex/hyp
h-nn.tex
(/usr/local/texlive/2015basic/texmf-dist/tex/generic/hyph-utf8/patterns/tex/hyp
h-no.tex)))
l@polish=language21

(/usr/local/texlive/2015basic/texmf-dist/tex/generic/hyph-utf8/loadhyph/loadhyp
h-pl.tex QX Polish hyphenation patterns
(/usr/local/texlive/2015basic/texmf-dist/tex/generic/hyph-utf8/conversions/conv
-utf8-qx.tex)
(/usr/local/texlive/2015basic/texmf-dist/tex/generic/hyph-utf8/patterns/tex/hyp
h-pl.tex))
l@portuguese=language22

(/usr/local/texlive/2015basic/texmf-dist/tex/generic/hyph-utf8/loadhyph/loadhyp
h-pt.tex EC Portuguese hyphenation patterns
(/usr/local/texlive/2015basic/texmf-dist/tex/generic/hyph-utf8/conversions/conv
-utf8-ec.tex)
(/usr/local/texlive/2015basic/texmf-dist/tex/generic/hyph-utf8/patterns/tex/hyp
h-pt.tex))
l@portuges=language22
l@brazil=language22
l@brazilian=language22
l@russian=language23

(/usr/local/texlive/2015basic/texmf-dist/tex/generic/hyph-utf8/loadhyph/loadhyp
h-ru.tex T2A Russian hyphenation patterns
(/usr/local/texlive/2015basic/texmf-dist/tex/generic/ruhyphen/ruhyphen.tex
(/usr/local/texlive/2015basic/texmf-dist/tex/generic/ruhyphen/catkoi.tex)
(/usr/local/texlive/2015basic/texmf-dist/tex/generic/ruhyphen/koi2lcy.tex)
(/usr/local/texlive/2015basic/texmf-dist/tex/generic/ruhyphen/ruhyphal.tex)
(/usr/local/texlive/2015basic/texmf-dist/tex/generic/ruhyphen/cyryoal.tex)))
l@serbian=language24

(/usr/local/texlive/2015basic/texmf-dist/tex/generic/hyph-utf8/loadhyph/loadhyp
h-sr-latn.tex EC Serbian hyphenation patterns in Latin script
(/usr/local/texlive/2015basic/texmf-dist/tex/generic/hyph-utf8/conversions/conv
-utf8-ec.tex)
(/usr/local/texlive/2015basic/texmf-dist/tex/generic/hyph-utf8/patterns/tex/hyp
h-sh-latn.tex))
l@serbianc=language25

(/usr/local/texlive/2015basic/texmf-dist/tex/generic/hyph-utf8/loadhyph/loadhyp
h-sr-cyrl.tex T2A Serbian hyphenation patterns in Cyrillic script
(/usr/local/texlive/2015basic/texmf-dist/tex/generic/hyph-utf8/conversions/conv
-utf8-t2a.tex)
(/usr/local/texlive/2015basic/texmf-dist/tex/generic/hyph-utf8/patterns/tex/hyp
h-sh-cyrl.tex))
l@spanish=language26

(/usr/local/texlive/2015basic/texmf-dist/tex/generic/hyph-utf8/loadhyph/loadhyp
h-es.tex EC Spanish hyphenation patterns
(/usr/local/texlive/2015basic/texmf-dist/tex/generic/hyph-utf8/conversions/conv
-utf8-ec.tex)
(/usr/local/texlive/2015basic/texmf-dist/tex/generic/hyph-utf8/patterns/tex/hyp
h-es.tex))
l@espanol=language26
l@swedish=language27

(/usr/local/texlive/2015basic/texmf-dist/tex/generic/hyph-utf8/loadhyph/loadhyp
h-sv.tex EC Swedish hyphenation patterns (Jan Michael Rynning, 1994-03-03)
(/usr/local/texlive/2015basic/texmf-dist/tex/generic/hyph-utf8/conversions/conv
-utf8-ec.tex)
(/usr/local/texlive/2015basic/texmf-dist/tex/generic/hyph-utf8/patterns/tex/hyp
h-sv.tex))
l@ukrainian=language28

(/usr/local/texlive/2015basic/texmf-dist/tex/generic/hyph-utf8/loadhyph/loadhyp
h-uk.tex T2A Ukrainian hyphenation patterns
(/usr/local/texlive/2015basic/texmf-dist/tex/generic/ukrhyph/ukrhyph.tex
Ukrainian hyphenation patterns in lcy encoding
(/usr/local/texlive/2015basic/texmf-dist/tex/generic/ukrhyph/catlcy.tex)
(/usr/local/texlive/2015basic/texmf-dist/tex/generic/ukrhyph/lcy2lcy.tex)
(/usr/local/texlive/2015basic/texmf-dist/tex/generic/ukrhyph/ukrhypmp.tex)))))
(/usr/local/texlive/2015basic/texmf-dist/tex/plain/cyrplain/txxextra.tex)
(/usr/local/texlive/2015basic/texmf-dist/tex/plain/cyrplain/plainenc.tex
(/usr/local/texlive/2015basic/texmf-dist/tex/generic/babel/plain.def
! Illegal parameter number in definition of @yargdef.
<to be read again>
                   relax
l.144   let@hash@relax

? q
OK, entering batchmode...

alphalabel in multilanguage bibliography in biblatex with biber and babel

$
0
0

I search and found no similar question.
I know XeLatex is a one of the solution, but it seems is doable in Babel also

My setup: Miktex 2.9 with Babel 2015/08/03 3.9m and Biber 2.1
This is MWE

documentclass[a4paper]{article}
usepackage[utf8]{inputenc}
usepackage[russian,greek,english]{babel}
usepackage[natbib=true,
style=alphabetic,
isbn=true,
url=true,
citestyle=alphabetic,
defernumbers=false,
sorting=nyt, 
bibencoding=utf8,
backend=biber,
language=auto,  
autolang=other,]{biblatex}

addbibresource{test.bib}
begin{document}
Example one in Greek textgreek{cite{AlKarapan}},
 example two in Russian
  { otherlanguage{russian}текст на русском cite{CypinIstorijaRPC}     текст     на русском}   and example  in English again.
printbibliography
end{document}

and test.bib is following:

@Book{AlKarapan,
author = {Καραπαναγοπούλου, Αλέξανδρος Κ.},
title = {Η Μεγάλη Σύνοδος της Ορθοδόξου Ανατολικής Εκκλησίας},
publisher = {auto-édition},
year = {hbox{1990--1998}},
volumes = {6},
address = {Αθήνα},
hyphenation={greek},
langid={greek},
}
@Inbook{CypinIstorijaRPC,
author = {Владислав Цыпин},
title = {История Русской Церкви 1917--1997},
chapter = {VIII},
publisher = {Издательство Спасо-Преображенского Валаамского монастыря},
address = {Москва},
date = {1997},
urldate = {2010-10-25},
url = {http://old.pravoslavie.by/podpod.asp?id=135&Session=10},
langid={russian},
hyphenation={russian},
}

Now if you run pdflatex–biber-pdflatex you see
no letters in bibliography

error is:

Command textKappa unavailable in encoding OT1. endentry

and so on…

If you make main language Russian, you will see letters in key for Russian bibentry but not in Greek bibentry.

Solution is following:
Open generated bbl file and find labelalpha field entry

  field{labelalpha}{Καρ98}

and

  field{labelalpha}{Цып97}

and add there appropriate otherlanguage command entries as

  field{labelalpha}{otherlanguage{greek}Καρ98}

and

  field{labelalpha}{otherlanguage{russian}Цып97}

save it and just run pdflatex..Errors are gone and everything is OK..

So question is How can i addd otherlanguage call to labelalpha entries without
editing bbl file? can biblatex do this? I thin it is natural since keys are generated by langid so otherlanguage or in general labelalpha‘s language
needs to be same as langid

p.s.
I encountered this problem with, English, Russian,Greek,Georgian setup. No matter which language is set as main language for document…adding ‘otherlanguage’ call solves the problem..Example was shortened for demo.

edited: just added image how bibliography looks after editing .bbl file adding ‘otherlanguage’ callsenter image description here

I think language=auto or similar option needs to applied for keys in bibliography list

Why is babel loaded automatically in my document?

$
0
0

I’m currently writing my thesis in LaTeX, using the scrreprt class and xetex for better language support. With xetex, I’m supposed to use polyglossia instead of babel. I did not load the babel package manually. However, the xelatex output states that babel is loaded.
Why would that be the case?

% mwe.tex
documentclass[
        draft=true,
        paper=portrait,
        pagesize=auto,
        fontsize=12pt,
        version=last,
]{scrreprt}
usepackage{polyglossia}
begin{document}
Hi.
end{document}

Upon xelatex mwe.tex, the logfile states (snippet):

This is XeTeX, Version 3.14159265-2.6-0.99991 (TeX Live 2014/Arch Linux) (preloaded format=xelatex 2015.7.6)  15 JUL 2015 11:31
entering extended mode
 restricted write18 enabled.
 %&-line parsing enabled.
**mwe.pdf
(./mwe.tex
LaTeX2e <2014/05/01>
Babel <3.9l> and hyphenation patterns for 79 languages loaded.
(/usr/share/texmf-dist/tex/latex/koma-script/scrreprt.cls
Document Class: scrreprt 2015/02/07 v3.16 KOMA-Script document class (report)

How to get proper German hyphenation?

$
0
0

Code:

documentclass[paper=3.5cm:5cm]{scrbook}
usepackage{german}
usepackage[german]{babel}
usepackage[utf8]{inputenc}
begin{document}
Andere übertragen das am besten den Geschwistern.
end{document}

Output:

Rendered document

Hyphenation for these standard German words is incorrect. I know that we can
specify hyphenation manually, e.g. übertra-gen, but that makes source code
less readable, and it would be tedious for an entire book.

How do I tell LaTeX to use proper hyphenation?

Desired hyphenation is for a German text authored between 1914 and 1918.

tikz declare function and babel french option

$
0
0

I would like to declare functions in tikz for multiple uses of the same function within the code.

Sadly, it seems that the tikz “declare function” is not compatible with the french option in babel.
Indeed, the following code (that I simplifed on purpose) runs fine :

documentclass[english]{article}
usepackage{babel}                      
usepackage{tikz}

begin{document}
begin{tikzpicture}
    tikzset{declare function={Carre(t)=t*t;}}
    draw plot [domain=-1:1] (x,{Carre(x)});
end{tikzpicture}
end{document}

But when I replace

documentclass[english]{article}

with

documentclass[english,french]{article}

compilation generates an error. This is what the log file says :

Missing character: There is no = in font nullfont!
Missing character: There is no @ in font nullfont!
Missing character: There is no @ in font nullfont!

Runaway argument?
-1:1] (x ,{Carre(x )}); end {tikzpicture} end {document}
! Paragraph ended before pgfmath@local@@functions was complete.

par
l.18

I suspect you’ve forgotten a `}’, causing me to apply this
control sequence to too much text. How can we recover?
My plan is to forget the whole thing and hope for the best.

Before posting this, I updated all packages without success.

Any help welcome!


Missing number, treated as zero. ldf@finishCurrentOption file English.ldf

$
0
0

i will need your precious help. I am doing my final report for my school and i am writing in LaTeX. I want to write it in greek and i am using babel package. But when i complile it, display the title above: “Missing number, treated as zero. ldf@finishCurrentOption”. File English.ldf. What is this and how can i fix it? I am newbie, so try to explain it as simple as u can.
Thank you for your time.

This is my code:

documentclass[11pt]{article}
usepackage[English, Greek]{babel}
usepackage[iso-8859-7]{inputenc}

title{An'aptuxh latintext site greektext gia diktuak'h dimiourg'ia LaTeX latintext Document Classes - Manual}
author{latintext Name}
date{today}

begin{document}
    maketitle

        section{Poioi e'imaste}
        section{per'i LaTeX}{
            subsection{Poioi to 'idrusan}
            subsection{Pws prof'eretai}}
        section{Fti'axe to dik'o sou LaTeX latintext Document}{
            subsection{Korm'oc LaTeX latintext Document Class}
            subsection{Basik'es Entol'es}
            subsection{'Orise tic dik'ec sou entol'es }}
        section{P'wc na fti'axeic to dik'o sou LaTeX latintext Document Class}{
            subsection{Poia h diafor'a metx'u }}
        section{xaxaxscxscs}
end{document}  

Chicago Template Bib(La)Tex [Biber] convert to XeLaTeX for Hebrew support

$
0
0

%runs in texmaker with Quickbuild =
pdflex->biblatex->pdflatex(x2)->view pdf
%that makes all the citekeys hook up to the .bib file and makes ibid
work and all that stuff

Adding little bit of hebrew breaks everything, simple fixes like changing usepackage[utf8]{inputenc} to utf8x doesn’t work, that one breaks biber

can you rewrite this to use polyglossia and xelatex instead of babel?

MWE:

%filename: main.tex
documentclass[a4paper,hebrew,english]{article}
usepackage[T1]{fontenc}
usepackage[utf8]{inputenc}
usepackage{lmodern}
%usepackage{cjhebrew}
usepackage[hebrew,english]{babel}
usepackage{csquotes}

usepackage[notes,backend=biber]{biblatex-chicago}
bibliography{sample}

begin{document}
title{The Chicago Citation Style with biblatex}
author{WriteLaTeX}
maketitle

section{Demonstration}

laboris nisi ut aliquip ex ea commodo consequat. autocite{Ful83}
dolor in repreheautocite{hello mom, Ful83}
serunt mollit anim id est laborum. autocite{GMP81}

%begin{hebrew}עבריתend{hebrew}
%sethebrewעבריתunsethebrew
adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. autocite{GMP81} 

printbibliography

end{document}

that file main.tex pulls from this one sample.bib to auto-complete the citekeys {Ful83} and {GMP81} and replace them with Author names and book titles. How can I type Hebrew into the main body or into the footnotes without breaking this nice Chicago template that actually works?

%filename = sample.bib
@conference{Ful83,
   author = "William Fulton",
    title = "Introduction to intersection theory in algebraic geometry",
booktitle = "Regional Conference Series in Mathematics",
   number = 54,
     year = 1983}

@inproceedings{GMP81,
   author = "Mark Goresky and Robert MacPherson",
    title = "On the topology of complex algebraic maps",
booktitle = "Algebraic Geometry Proceedings, La R'abida,
             Lecture Notes in Mathematics",
   number = 961,
     year = 1981}

Appendix in LaTeX

$
0
0

I have the following document:

documentclass[11pt,a4paper,twoside]{book}
 usepackage[spanish,activeacute]{babel}
 usepackage[titletoc]{appendix}

 begin{document}

  setcounter{tocdepth}{2} 
  setcounter{secnumdepth}{3} 
  tableofcontents

  chapter{First chapter}

  begin{appendices}
   addappheadtotoc
   appendixpage
   clearpage
   chapter{Some name}
   label{label1}
   blah blah
  end{appendices}

end{document}

this gives in the ToC:

Apéndice Appendices....................60
Apéndice A. Some name..................63

and in the body of the document:

Appendices
(page skip)
Apéndice A
Some name

blah blah
  1. The TOC shows "Apéndice Appendices" and I need it to show "Apéndices" (note the “s” at the end of that word; it’s not the same word that the first one currently in the TOC) Also in the body of the document it shows "Appendices" (in english) and I also need it to say "Apéndices" (in spanish), ie: the same word that should be displayed in the TOC. This looks like a babel issue to me.

  2. Is there a way not to have to give each appendix a name? This is done with the chapter{Some name} command, but I’d like the name of Apéndice A to be just that: Apéndice A. This way the ToC would look like (assuming the 1st point is fixed):

    Apéndices........................60
    Apéndice A.......................63
    

    and the body of the document:

    Apéndices
    (page skip)
    Apéndice A
    
    blah blah
    

    Is there any way to do this?


I think a hack to accomplish the 2nd point would be to combine @murray’s answer with not giving a name to the chapter. This is, this line chapter{Some name} would have to be replaced by:

chapter[]{}

It’s not pretty but I think it gets the job done.
If anybody knows of a more elegant way to do this, please let me know.

Hyphenation in danish LaTeX

$
0
0

I can’t really make a minimal working example who shows the problem, because the problem just are there sometimes. But here is the code used:

documentclass[twocolumn, a4, 12pt]{article}
usepackage[utf8]{inputenc}
usepackage[danish]{babel}

begin{document}
end{document}

Sometimes the hyphenation splits the word incorrectly in the danish version. Like “marmo-rgade” or “kal-ksten”. That is one problem. The other problem is that it sometimes don’t split the word at all, so the word sometimes reaches into another column (and lay over another word).

I thought danish babel should solve this problem? Am I the only one with this problem and do anyone know how to solve it? I’ve solved it earlier by chaging the sentence – but always to do that in a long document is too hard.

Thank you very much in advance. Kind regards!

Invalid Latex preamble (in lyx)?

$
0
0

I’m running into an error while trying to preview my document created in lyx:

latex babel error

after adding the language setting as described here. My preamble is as follows:

latex preamble

! Package babel error, unknown language 'english'… [closed]

$
0
0

I downloaded a programming assignment template from:
http://www.latextemplates.com/template/programming-coding-assignment

I first used pdflatex command to try and compile the tex file and received the error:

! Package babel error, unknown language 'english'... 

I then tried with TexMaker and TexStudio and received the following error. I have read tens of threads on here and the rest of the Internet. I’ve compiled with different compilers, uninstalled TexMaker/TexStudio and PDFlatex and installed all again.

I’ve rebooted, updated my system (Ubuntu 14.04 LTS), tried compiling on online editors (still getting the same problem).

I’ve changed ‘english’ to English, En, EN, en, ENGLISH, I have loaded babel in different ways and used:

PassOptionsToPackage{english}{babel}

Which does nothing. I’ve also removed the line altogether which does not fix the issue. I’ve checked my editors encoding was set to UTF-8.

I just want to get on with my university coursework but nothing I try is working at all and would appreciated help getting this fixed.

Some frenchb switches taken in account in iflanguage conditional, but not all

$
0
0

As shown by the following MWE, some frenchb switches (e.g. FBFrenchFootnotestrue) are taken in account in (babel‘s) iflanguage conditional, but not all of them (e.g. FBStandardItemLabelsfalse): the latter are taken in account only if directly inserted in the document body.

documentclass[french,english]{article}
usepackage[T1]{fontenc}
usepackage[utf8]{inputenc}
usepackage{babel}
begin{document}
%
newcommand{test}[1][english]{%
  selectlanguage{#1}
  iflanguage{french}{
    section{French}
    FBStandardItemLabelsfalse%
    FBFrenchFootnotestrue%
  }{
    section{English}
    FBStandardItemLabelstrue%
    FBFrenchFootnotesfalse%
  }%
  Foofootnote{Bar}.%
  begin{itemize}
  item Foo
  item Bar
  end{itemize}
}
%
test
test[french]
test
FBStandardItemLabelsfalse%
test[french]
end{document}

Do you know why and how to enforce all those switches to be taken in account in iflanguage conditional?


how to update language.dat.lua without tlmgr

$
0
0

I’m running W32TeX, and though it is also TL2015 based, it doesn’t seem to include tlmgr, which seems to be required to regenerate language.dat.lua. How can I regenerate it with, say, a lua script? edit: How does MikTeX do it?

Some frenchb switches taken in account in iflanguage conditional, but not all

$
0
0

As shown by the following MWE, some frenchb switches (e.g. FBFrenchFootnotestrue) are taken in account in (babel‘s) iflanguage conditional, but not all of them (e.g. FBStandardItemLabelsfalse): the latter are taken in account only if directly inserted in the document body.

documentclass[french,english]{article}
usepackage[T1]{fontenc}
usepackage[utf8]{inputenc}
usepackage{babel}
begin{document}
%
newcommand{test}[1][english]{%
  selectlanguage{#1}
  iflanguage{french}{
    section{French}
    FBStandardItemLabelsfalse%
    FBFrenchFootnotestrue%
  }{
    section{English}
    FBStandardItemLabelstrue%
    FBFrenchFootnotesfalse%
  }%
  Foofootnote{Bar}.%
  begin{itemize}
  item Foo
  item Bar
  end{itemize}
}
%
test
test[french]
test
FBStandardItemLabelsfalse%
test[french]
end{document}

Do you know why and how to enforce all those switches to be taken in account in iflanguage conditional?

Problems with mixing Icelandic and German with LuaLaTex

$
0
0

So what I am trying to do is to use the letter-classic class with LuaLaTeX (This is LuaTeX, Version beta-0.80.0 (MiKTeX 2.9) (rev 5238) (format=lualatex 2015.11.10) 25 NOV 2015 09:30) as included in MikTeX.

It bombs in icelandic.ldf with errors like these:

! String contains an invalid utf-8 sequence.
l.144 DeclareTextCommand{ooob}{T1}{sob {
                                         ó}{.85}{0}{.04}{0}}
A funny symbol that I can't read has just been (re)read.
Just continue, I'll change it to 0xFFFD.

! String contains an invalid utf-8 sequence.
l.145 DeclareTextCommand{OOob}{T1}{sob {
                                         Ó}{.7}{0}{0}{0}}
A funny symbol that I can't read has just been (re)read.
Just continue, I'll change it to 0xFFFD.

! String contains an invalid utf-8 sequence.
l.148 DeclareTextCommand{eeob}{T1}{sob {
                                         é}{1}{0}{.04}{0}}
A funny symbol that I can't read has just been (re)read.
Just continue, I'll change it to 0xFFFD.

! String contains an invalid utf-8 sequence.
l.149 DeclareTextCommand{EEob}{T1}{sob {
                                         É}{1}{0}{.04}{0}}
A funny symbol that I can't read has just been (re)read.
Just continue, I'll change it to 0xFFFD.

! String contains an invalid utf-8 sequence.
l.152 declare@shorthand{icelandic}{"
                                   ó}{ooob}
A funny symbol that I can't read has just been (re)read.
Just continue, I'll change it to 0xFFFD.

! String contains an invalid utf-8 sequence.
<argument> icelandic@sh@string "@string �
                                  ooob @
l.153 declare@shorthand
                      {icelandic}{"Ó}{OOob}
A funny symbol that I can't read has just been (re)read.
Just continue, I'll change it to 0xFFFD.

My minimal working example is this one:

documentclass[english,12pt,a4paper]{letter-classic}
usepackage[T1]{fontenc}
usepackage[icelandic,german,english]{babel}
selectlanguage{english}
newcommand{ISL}[1]{foreignlanguage{icelandic}{#1}}
newcommand{DEU}[1]{foreignlanguage{german}{#1}}
%%usepackage[utf8]{inputenc} % needed with pdfLaTeX, but not with LuaLaTeX (see comment below question)

begin{document}

begin{letter}{Troll family\ISL{Elliðaárdalur}\ISL{999 Reykjavík}\ICELAND}
fromname{DEU{Mäxchen Mustermann}}
fromstreet{DEU{Musterstraße 123}}
fromtown{12345 Musterstadt}
fromphone{+49 123 4567890}
fromtownshort{Musterstadt}
fromsignature{DEU{Mäxchen}}

subject{ISL{Jólasveinar}}
opening{Folks,}

do you know the current address of the ISL{Jólasveinar} and/or their parents ISL{Grýla} and ISL{Leppalúði}?

closing{ISL{Með kveðju,}}
end{letter}

end{document}

The actual document worked without problems until a few months ago, using pdfLaTeX (and still does, see below).

How it looks when rendered with pdfLaTeX.

Can anyone explain to me how to mix Icelandic and German using LuaLaTeX with the letter-classic class?


I looked into the KOMA letter class already, but I prefer a slightly more modern/custom look for the letter head, such that at this moment I really want to avoid that one.

Prefixed bibliography labels in different language with biblatex

$
0
0

I use moderncv to compile my cv, I know that the best solution is biblatex, so I followed this solution to make it properly work with moderncv.

My bibliography has entries in three different languages (english, french and greek), and I want to keep the entry’s language in the reference list. I have found this solution. I want to use different .bib files for my papers with prefix by category and reverse numbering (i.e. first paper with number 1, but put on the bottom).

I have succesfully put them all together, but missed only one thing: the main language of the document is greek, but I need the prefixes to be in latin characters, i.e. D instead of Δ. I tried with latintext and foreignlanguage{english}{...}, but apparently I cannot use anything starting with a as a value for prefixnumbers.

MWE:

 
documentclass[11pt,a4paper,sans]{moderncv}

usepackage[francais,english,greek]{babel}

usepackage[LGR,OT1]{fontenc}
usepackage[utf8]{inputenc}
usepackage{csquotes}

usepackage{filecontents}
begin{filecontents}{theses.bib}
@article{gp01,
    author  = {Georgiou, George and Poulios, John},
    title   = {A very interesting {P}aper},
    year    = {2001},
    journal = {Science},
    volume  = {12},
    number  = {9},
    pages   = {390--451},
    hyphenation = {english}
}
@book{pg13,
    author    = {Poulios, John and Georgiou, George},
    title     = {Une livre très importante},
    year      = {2013},
    publisher = {Springer},
    address   = {Paris},
    hyphenation = {francais}
}
end{filecontents}

begin{filecontents}{journals.bib}
@CONFERENCE{CP15,
    author      = {Makridis, Andreas and Poulios, John},
    title       = {Assembly 2015 (Poster)},
    booktitle   = {Astronomical Conference},
    address     = {Athens, Greece},
    date        = {28 June -- 7 July,},
    year        = {2015},
    pages       = {54},
    hyphenation = {english}
}
@ARTICLE{CAgr,
    author      = {Πούλιος, Ιωάννης and Μακρίδης, Ανδρέας},
    title       = {Ελληνικό συνέδριο},
    journal     = {Χρονικά},
    year        = {2014},
    volume      = {54},
    pages       = {043018},
    hyphenation = {greek}
}
end{filecontents}

usepackage[sorting=ydnt,%      Sort by year (descending), name, title
            style=numeric,%
            firstinits=true,%   Initials on first names
            defernumbers=true,% Required to use 'prefixnumbers' option in printbibliography
            maxnames=99,%       Show all authors            
            autolang=other%
           ]{biblatex}

% Reverse numbering
% SRC: http://tex.stackexchange.com/a/37850/51724
AtDataInput{%
  csnumgdef{entrycount:strfield{prefixnumber}}{%
    csuse{entrycount:strfield{prefixnumber}}+1}}
DeclareFieldFormat{labelnumber}{mkbibdesc{#1}}    
newrobustcmd*{mkbibdesc}[1]{%
  numbernumexprcsuse{entrycount:strfield{prefixnumber}}+1-#1relax}

% biblatex for moderncv
% SRC: http://tex.stackexchange.com/a/123809/51724
defbibenvironment{bibliography}
  {list
     {printtext[labelnumberwidth]{% label format from numeric.bbx
        printfield{prefixnumber}%
        printfield{labelnumber}}}
     {setlength{topsep}{0pt}% layout parameters from moderncvstyleclassic.sty
      setlength{labelwidth}{hintscolumnwidth}%
      setlength{labelsep}{separatorcolumnwidth}%
      leftmarginlabelwidth%
      advanceleftmarginlabelsep}%
      sloppyclubpenalty4000widowpenalty4000}
  {endlist}
  {item}

% Make one author bold
% SRC: http://tex.stackexchange.com/a/211821/51724
newcommand{makeauthorbold}[1]{%
DeclareNameFormat{author}{%
  ifnumequal{value{listcount}}{1}
    {ifnumequal{value{liststop}}{1}
      {expandafterifstrequal{##1}{#1}{textbf{##1addcommaaddspace ##4addcommaisdot}}{##1addcommaaddspace ##4addcommaisdot}}
      {expandafterifstrequal{##1}{#1}{textbf{##1addcommaaddspace ##4}}{##1addcommaaddspace ##4}}}
    {ifnumless{value{listcount}}{value{liststop}}
      {expandafterifstrequal{##1}{#1}{textbf{addcommaaddspace ##1addcommaaddspace ##4}}{addcommaaddspace ##1addcommaaddspace ##4}}
      {expandafterifstrequal{##1}{#1}{textbf{addcommaaddspace ##1addcommaaddspace ##4addcommaisdot}}{addcommaaddspace ##1addcommaaddspace ##4addcommaisdot}}%
    }%
}%
}

addbibresource[label=T]{theses.bib}
addbibresource[label=J]{journals.bib}

% moderncv themes
moderncvstyle{casual}
moderncvcolor{blue}
firstname{Εγώ}
familyname{Επώνυμο}
title{Βιογραφικό Σημείωμα}
address{Εδώ}
email{me@gmail.com}

usepackage{xpatch}
xapptocmdemailsymbol{latintext}{}{}  % email address written in latin characters
%----------------------------------------------------------------------------------
%            content
%----------------------------------------------------------------------------------
begin{document}
makecvtitle

makeauthorbold{Poulios}
begin{refsection}[J]
nocite{*}
printbibliography[heading=subbibliography, title={Δημοσιεύσεις},prefixnumbers={J}]
end{refsection}
begin{refsection}[T]
nocite{*}
printbibliography[heading=subbibliography, title={Διατριβές},prefixnumbers={D}]
end{refsection}

end{document}

 

How to determine which languages have been loaded by babel or polyglossia?

$
0
0

I am trying to find a way of determining, say at the end of the preamble, which languages have been loaded by babel and polyglossia, including the main language and all others. There are ways to detect if a particular language has been loaded but I need a way to enumerate all languages which have been loaded. Any ideas by people who know the internals to these packages?

Viewing all 75 articles
Browse latest View live