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

[NOVEL | TEXTBOOK] Language setting problems in Spanish #3

Open
angel-longueira opened this issue Jun 29, 2023 · 12 comments
Open

[NOVEL | TEXTBOOK] Language setting problems in Spanish #3

angel-longueira opened this issue Jun 29, 2023 · 12 comments

Comments

@angel-longueira
Copy link

When I try to change the language of the Novel and Textbook templates to Spanish, Overleaf shows problems related to the bibliography, and no PDF is rendered. I have tried other languages like German, or French, and it seems to work well. Nevertheless, Portuguese compiles with errors, but OVerleaf renders a PDF.

@NicklasVraa
Copy link
Owner

That is most likely an issue with the babel package that is responsible for all language-related stuff. Can you post the error message?

@angel-longueira
Copy link
Author

Most of the error are indeed related to the Babel package:

First Error

Argument of \i has an extra }.

<inserted text> 
                \par 
l.143   \SetString{\bibname}{Bibliograf\'{\i}a}
                                               %
I've run across a `}' that doesn't seem to match anything.
For example, `\def\a#1{...}' and `\a}' would produce
this error. If you simply proceed now, the `\par' that
I've just inserted will cause me to report a runaway
argument that might be the root of the problem. But if
your `}' was spurious, just type `2' and it will go away.

Runaway argument?
! Paragraph ended before \i was complete.
<to be read again> 
                   \par 
l.143   \SetString{\bibname}{Bibliograf\'{\i}a}
                                               %
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.

Second Error

Runaway argument?

{Bibliograf\'{
! Paragraph ended before \bbl@stringdef was complete.
<to be read again> 
                   \par 
l.143   \SetString{\bibname}{Bibliograf\'{\i}a}
                                               %
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.

! Extra }, or forgotten \endgroup.
\BabelString ->Bibliograf\'{\par }
                                  a
l.143   \SetString{\bibname}{Bibliograf\'{\i}a}
                                               %
I've deleted a group-closing symbol because it seems to be
spurious, as in `$x}$'. But perhaps the } is legitimate and
you forgot something else, as in `\hbox{$x}'. In such cases
the way to recover is to insert both the forgotten and the
deleted material, e.g., by typing `I$}'.

Third Error

LaTeX Error: Missing \begin{document}.
No \begin{document} command was found. Make sure you have included \begin{document} in your preamble, and that your main document is set correctly.
[Learn more](https://www.overleaf.com/learn/Errors%2FLaTeX%20Error%3A%20Missing%20%5Cbegin%20document)

See the LaTeX manual or LaTeX Companion for explanation.
Type  H <return>  for immediate help.
 ...                                              
                                                  
l.143   \SetString{\bibname}{Bibliograf\'{\i}a}
                                               %
You're in trouble here.  Try typing  <return>  to proceed.
If that doesn't work, type  X <return>  to quit.

! Extra }, or forgotten \endgroup.
<argument> ...dcsname \expandafter {\BabelString }
                                                  \relax \fi \fi 
l.143   \SetString{\bibname}{Bibliograf\'{\i}a}
                                               %
I've deleted a group-closing symbol because it seems to be
spurious, as in `$x}$'. But perhaps the } is legitimate and
you forgot something else, as in `\hbox{$x}'. In such cases
the way to recover is to insert both the forgotten and the
deleted material, e.g., by typing `I$}'.

Fourth Error

Argument of \i has an extra }.

<inserted text> 
                \par 
l.144   \SetString{\chaptername}{Cap\'{\i}tulo}
                                               %
I've run across a `}' that doesn't seem to match anything.
For example, `\def\a#1{...}' and `\a}' would produce
this error. If you simply proceed now, the `\par' that
I've just inserted will cause me to report a runaway
argument that might be the root of the problem. But if
your `}' was spurious, just type `2' and it will go away.

Runaway argument?
! Paragraph ended before \i was complete.
<to be read again> 
                   \par 
l.144   \SetString{\chaptername}{Cap\'{\i}tulo}
                                               %
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.

Fifth Error

Runaway argument?

{Cap\'{
! Paragraph ended before \bbl@stringdef was complete.
<to be read again> 
                   \par 
l.144   \SetString{\chaptername}{Cap\'{\i}tulo}
                                               %
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.

! Extra }, or forgotten \endgroup.
\BabelString ->Cap\'{\par }
                           tulo
l.144   \SetString{\chaptername}{Cap\'{\i}tulo}
                                               %
I've deleted a group-closing symbol because it seems to be
spurious, as in `$x}$'. But perhaps the } is legitimate and
you forgot something else, as in `\hbox{$x}'. In such cases
the way to recover is to insert both the forgotten and the
deleted material, e.g., by typing `I$}'.

And so on and so forth. All the error seem no repeat for each kid of title in the template ("chapter", "bibliography", ...) but with their equivalent in Spanish ("capítulo", bibliografía", ...).

This issue is really easy to replicate, because the onli thing that has to be done is changing \lang{english} with \lang{spanish}. But using other languages (as \lang{german}, \lang{french} ) does not trigger this error.

@angel-longueira
Copy link
Author

According to the Overleaf messages, most of this error are present in this file: /usr/local/texlive/2022/texmf-dist/tex/generic/babel-spanish/spanish.ldf

@NicklasVraa
Copy link
Owner

NicklasVraa commented Jul 11, 2023

Don't know, if you are aware of it, but the template defines \i as a command for italicizing text. That is probably the issue. Try removing that command definition in lix.sty

@NicklasVraa
Copy link
Owner

Please report back if this was the issue :)

@JustADataConstruct
Copy link

Not OP, but having the same problem! Removing the \i definition on lix.sty causes new errors, all on main.tex line 21:

Missing \endcsname inserted.


<to be read again> 
                   \protect 
l.21 \begin{document}
                     
The control sequence marked <to be read again> should
not appear between \csname and \endcsname.
Missing number, treated as zero.


<to be read again> 
                   \numspell@group@ 
l.21 \begin{document}
                     
A number should have been here; I inserted `0'.
(If you can't figure out why I needed to see a number,
look up `weird error' in the index to The TeXbook.)
Missing = inserted for \ifnum.

<to be read again> 
                   \numspell@group@ 
l.21 \begin{document}
                     
I was expecting to see `<', `=', or `>'. Didn't.

Extra \endcsname.

<argument> ... {numspell@counter@tempa}\endcsname 
                                                  >0\edef \numspell@group@ma...
l.21 \begin{document}
                     
I'm ignoring this, since I wasn't doing a \csname.
Missing number, treated as zero.

<to be read again> 
                   \numspell@group@ 
l.21 \begin{document}
                     
(That makes 100 errors; please try again.) 
Here is how much of TeX's memory you used:
 29359 strings out of 477678
 564850 string characters out of 5829488
 929676 words of memory out of 5000000
 47620 multiletter control sequences out of 15000+600000
 482481 words of font info for 83 fonts, out of 8000000 for 9000
 1142 hyphenation exceptions out of 8191
 124i,12n,120p,1193b,963s stack positions out of 10000i,1000n,20000p,200000b,200000s

@Sergio401
Copy link

I have the same problem

@aaalongueira
Copy link

Don't know, if you are aware of it, but the template defines \i as a command for italicizing text. That is probably the issue. Try removing that command definition in lix.sty

Sorry, I was out on vacation.

I tried removing the new defined command for italicizing text, but it did not work. It seems like this is not the issue.

@eferro70
Copy link

I have this error when a use \lang{brazilian} or any language different of english.

\par
l.30 \h{Meu título}

I've run across a }' that doesn't seem to match anything. For example, \def\a#1{...}' and \a}' would produce this error. If you simply proceed now, the \par' that
I've just inserted will cause me to report a runaway
argument that might be the root of the problem. But if
your }' was spurious, just type 2' and it will go away.

@NicklasVraa
Copy link
Owner

I suspect that some of the short custom command-names are at fault.

I am very open to improving the language compatibility, but I would need someone to compile a list of problematic languages and their custom commands for typing in special characters (I don't have time to do so at the moment), so I can change the custom command-names to ensure no overlap.

@angel-longueira
Copy link
Author

Hello, @NicklasVraa! I can compile them, but it's true that I'm working directly on Overleaf. I don't have a local instance of LaTeX. If that's OK for you, I can compile them online using Overleaf. If not, let me know, and I'll find a solution to compile locally.

@cocous
Copy link

cocous commented Jul 27, 2024

Hi! This error (for spanish) could be solved if you change \i for \it (in lix.sty), and install locally some fonts maybe.

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

7 participants