Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

English titles/captions in german document #103

Closed
Allamuth opened this issue Jan 11, 2019 · 6 comments
Closed

English titles/captions in german document #103

Allamuth opened this issue Jan 11, 2019 · 6 comments

Comments

@Allamuth
Copy link

Allamuth commented Jan 11, 2019

When you compile any of the documents, even the example documents, all titles of the autogenerated chapters, like Bibliography and List of Contents, will be in english. Although at the beginning of the Document \let\ifdeutsch\iftrue \let\ifenglisch\iffalse is set.
When trying to compensate for this by changing the language via \begin{otherlanguage}...\end{otherlanguage} an error occures. Nothing is happening if you are redefining the command to set it to german. Still the complete bibliography is printed with english abbreviations and terms like "(visited on 12/13/2018)".

These errors are occuring with a version of this template, downloaded yesterday. I really don't know if this is just silly me or a real error.

Edit: I'm running this in Visiual Studio Code on Arch Linux updated today.

@koppor
Copy link
Member

koppor commented Jan 11, 2019

Which document do you compile?

Could you please try to compile main-german.tex and main-english.tex? What is the respective output? Do all documents show the English text? I read in your comment, that you checked all FIVE (!) example documents, but I would like to double check that!

Reason: When compiling the template on CircleCI (via https://github.com/latextemplates/scientific-thesis-template/blob/master/.circleci/config.yml), all documents have the correct output.

See https://290-4961872-gh.circle-artifacts.com/0/root/project/build/main-english.pdf and https://290-4961872-gh.circle-artifacts.com/0/root/project/build/main-german.pdf.

I would advise to check your Visual Studio Code setup. Visual Studio Code sometimes has set a main document and does NOT change it if you open another LaTeX file.

For an intermediate check, I would advise to open the command line and enter following command:

pdflatex main-german.tex

Then, open main-german.pdf.

@Allamuth
Copy link
Author

At the moment I'm working in the main-german.tex file, because I had to quickly change from another template to this one.
Yesterday I tested this with the following files (yes these are not ALL of the examples, but the relevant ones) compiling via latexmk on command line:

  • main-german.tex,
  • main-english.tex,
  • main-paderborn-german.tex and
  • main-paderbron-english.tex.

All of them are showing the same behavior, showing english captions and even the bibliography is completely in english (dates are the problem here).

So today I double checked as advised with latexmake and pdflatex, it's working for main-english.tex, main-paderborn-german.tex and main-paderbron-english.tex. But all of them are still showing the same behavior like yesterday (english captions and bibliography).
main-german.tex, the file I edited, isn't compiling because of the following errors:

pdflatex main-german.tex
[...]
! Package inputenc Error: Keyboard character used is undefined
(inputenc)                in inputencoding `latin1'.

See the inputenc package documentation for explanation.
Type  H <return>  for immediate help.
 ...
l.807 \end{lstlisting}

and

latexmk main-germain.tex
[...]
{\contentsline {subsection}{\numberline {3.3.8}Avahi}{41}{subsection.\ETC.
./main-german.tex:42: File ended while scanning use of \@writefile.
<inserted text>
\par
l.42 \begin{document}

When using 'make' the file is compiling and there are no errors.

@koppor
Copy link
Member

koppor commented Jan 11, 2019

Your document does NOT compile. make skips over errors. Therefore, the PDF is not updated fully. Please fix your latex first. As long as pdflatex does not run through, you won't get updated captions. Further, delete *.aux (or execute latexmk -c main-german) to remove intermediate files.

You have a listing in main-german.tex which has strange characters. You also seem to have changed the input encoding.

To track down the issue, sometimes, it helps to create a minimal example. You can read about it at https://tex.meta.stackexchange.com/questions/228/ive-just-been-asked-to-write-a-minimal-example-what-is-that.

@Allamuth
Copy link
Author

So, here is my MWE. Problem persists. mwe.tex is a renamed main-german.tex.

mwe.txt Yes, this is a .txt because github doesn't allow uploading .tex-files.
mwe.pdf

Running pdflatex mwe.tex is working and doesn't result in any errors, but the following warning occurs while compiling:

Package babel Warning: Last declared language option is `ngerman',             
(babel)                but the last processed one was `american'.          
(babel)                The main language cannot be set as both a global        
(babel)                and a package option. Use `main=ngerman' as             
(babel)                option. Reported on input line 484.

Futhermore in mwe.log following infos are presented:

Package tocbasic Info: omitting babel extension for `toc'
(tocbasic)             because of feature `nobabel' available
(tocbasic)             for `toc' on input line 136.

mwe.log

In my edited main-german.tex I removed the listing, pdflatex is compiling without errors, but the english captions persist.

I also verified the errors in a freshly downloaded version of the template -> same errors and log messages.

@koppor
Copy link
Member

koppor commented Jan 17, 2019

Quick fix: Please use an older latex environment. For example, the one provided by the docker image.

Long fix: Try \usepackage[ngerman,main=english]{babel} as suggested in the error message!

@koppor koppor closed this as completed Jan 17, 2019
@koppor koppor reopened this Jan 17, 2019
koppor added a commit to latextemplates/LNCS that referenced this issue Jan 17, 2019
@koppor
Copy link
Member

koppor commented Feb 2, 2019

@Allamuth: It would have been nice if you checked the pull requests. At #100, @Backfighter already fixed the issue. We just did not include the fix in the template. This was done now.

@koppor koppor closed this as completed Feb 2, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants