0

https://tex.stackexchange.com/a/45858/263287

I am working on my own Norwegian and Latin interlinear. I copied Alan Munn's template and edited the main and secondary language to

\documentclass[11pt]{book}
\usepackage[margin=1in]{geometry}
\usepackage{titlesec}
\usepackage{polyglossia}
\defaultfontfeatures{Ligatures=TeX}
\setmainlanguage[variant=bokmal]{norwegian}
\setotherlanguage{latin}
\setmainfont{Linux Libertine O}
\usepackage{datatool}
\usepackage{expex}

however, I get an error: ! Package polyglossia Error: language portuguese is not loaded. Please load it before using it..

See the polyglossia package documentation for explanation. Type H for immediate help. ...

l.2 ...tlanguage *[variant=brazilian,]{portuguese}

Please help.

  • 1
    compile again or delete the aux-file. – Ulrike Fischer Jul 13 '22 at 13:39
  • thank you for the prompt reply. – monstermash Jul 13 '22 at 13:42
  • hi Alan. I ran your code again and this time, it gave me this error

    ! Package datatool Error: Can't assign \GreekText : there is no key Greek' in data basetext'.

    See the datatool package documentation for explanation. Type H for immediate help. ...

    l.82 }}}

    – monstermash Jul 13 '22 at 14:21
  • @monstermash I can replicate this error if I use \DTLsettabseparator instead of explicitly using \DTLsetseparator{...} with an actual tab in the source as the argument. Perhaps you've changed that line in some way? – Alan Munn Jul 13 '22 at 14:49
  • no sir. I did not change the line in any way. – monstermash Jul 13 '22 at 15:03
  • 1
    Then I don't know. The code still runs without errors for me otherwise. Is it possible that the tab got changed to spaces by your editor when you pasted the code? – Alan Munn Jul 13 '22 at 15:05
  • no. I simply copy and pasted. Your method with datatool is convenient and I have no experience in LaTeX. – monstermash Jul 13 '22 at 15:20
  • @monstermash What you did is not the issue; the question is whether your editor changed the pasted code by itself. If you put your cursor immediately to the right of the opening { in \DTLsetseparator{...} and then hit the right arrow, does it jump immediately to the immediate left of the closing }? It should if it has been pasted correctly. Also you need to make sure the .csv file has not been messed up by e.g. Excel if you've opened it and saved it using that. The problem you're getting is a problem with reading the .csv file. – Alan Munn Jul 13 '22 at 15:25
  • oh yes. thank you Alan, I did in fact mess up with the CSV file. One more thing, how do I change the Capitulo 2 into something of my choice? – monstermash Jul 13 '22 at 15:36
  • That's too vague a question. The chapter title formatting is set by titlesec which gives you lots of possibilities. The text itself should adapt automatically to your main language. It's contained in the \chaptertitlename macro. There are plenty of questions about formatting chapters and sections on the site. But this example isn't the best place to start if you're really unfamiliar with LaTeX. See What are good learning resources for a LaTeX beginner? for some good resources to learn from. – Alan Munn Jul 13 '22 at 15:42
  • Thank you so much. I will just stick to the default for now. – monstermash Jul 13 '22 at 15:45
  • hi Alan, where do I change the chapter counter? It is stuck at 2. Do I change it here? \setcounter{chapter}{1} – monstermash Jul 29 '22 at 11:24

0 Answers0