! Package babel Error: I cannot switch `"' on or off--not a shorthand.

1,063 views
Skip to first unread message

Paolo Cavallini

unread,
Sep 3, 2014, 10:26:02 AM9/3/14
to sphinx...@googlegroups.com
I consistently get this error when make latexpdf, sphinx 1.2.2 and 1.2.3
Any hint?
All the best.

Paolo Cavallini

unread,
Sep 5, 2014, 3:09:19 AM9/5/14
to sphinx...@googlegroups.com
I have:
python-docutils 0.12+dfsg-1
texlive-latex-base 2014.20140821-1
I found that for Italian there is in fact a problem with quotes and shorthand[0], but it is not clear to me how to fix it from the Sphinx side.

[0] http://www.guitex.org/home/en/forum/5-tex-e-latex/94145-problema-con-shorthandoffq

Takayuki Shimizukawa

unread,
Sep 5, 2014, 5:36:05 AM9/5/14
to sphinx...@googlegroups.com
Hi Paolo,

Thanks for a reporting.

Can you create a small sample to reproduce it? I read the linked page
you mentioned, but it is difficult to understand the case even if I
used google translator :(
And if possible, can you report it to the sphinx issue tracker and
attach the small sample?

Thanks,
--
Takayuki SHIMIZUKAWA
http://about.me/shimizukawa
> --
> You received this message because you are subscribed to the Google Groups
> "sphinx-users" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to sphinx-users...@googlegroups.com.
> To post to this group, send email to sphinx...@googlegroups.com.
> Visit this group at http://groups.google.com/group/sphinx-users.
> For more options, visit https://groups.google.com/d/optout.

Paolo Cavallini

unread,
Sep 5, 2014, 6:09:19 AM9/5/14
to sphinx...@googlegroups.com
I found that this is related to my custom Makefile, to do translations:

latexpdf:
    @for lang in $(LANGUAGES);\
    do \
        mkdir -p $(BUILDDIR)/latex/$(SOURCE)/$$lang $(BUILDDIR)/doctrees/$(SOURCE)/$$lang;\
        echo "$(SPHINXBUILD) -b latex $(ALLSPHINXOPTS) $(SOURCE) $(BUILDDIR)/latex/$(SOURCE)/$$lang";\
        $(SPHINXBUILD) -b latex $(ALLSPHINXOPTS) $(SOURCE) $(BUILDDIR)/latex/$(SOURCE)/$$lang;\
        echo "Running LaTeX files through pdflatex...";\
        $(MAKE) -C $(BUILDDIR)/latex/$(SOURCE)/$$lang all-pdf;\
    done
    @echo
    @echo "pdflatex finished; the PDF files are in $(BUILDDIR)/latex/<language>.";\

I'll try with the mainstream approach (sphinx-intl). Or better try with Sphinx 1.3, which ASAIK has a better supoport for internationalization?

Thanks.


You received this message because you are subscribed to a topic in the Google Groups "sphinx-users" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/sphinx-users/z5cn4p-YFZQ/unsubscribe.
To unsubscribe from this group and all its topics, send an email to sphinx-users...@googlegroups.com.

To post to this group, send email to sphinx...@googlegroups.com.
Visit this group at http://groups.google.com/group/sphinx-users.
For more options, visit https://groups.google.com/d/optout.



--
Paolo Cavallini http://www.faunalia.it/pc

Paolo Cavallini

unread,
Sep 5, 2014, 6:09:20 AM9/5/14
to sphinx...@googlegroups.com
If I can get some advice, I'll be happy of testing Sphinx development version, if this is useful.

Paolo Cavallini

unread,
Sep 5, 2014, 7:27:17 AM9/5/14
to sphinx...@googlegroups.com
Hi all.
Restarted from scratch, followinf sphinx-intl suggestions.
Now I get (for italian and english as well):

! Package babel Error: Unknown language `italian'. Either you have
(babel)                misspelled its name, it has not been installed,
(babel)                or you requested it in a previous run. Fix its name,
(babel)                install it or just rerun the file, respectively.

Paolo Cavallini

unread,
Sep 5, 2014, 8:06:19 AM9/5/14
to sphinx...@googlegroups.com
Small test project attached.
The command:

make -e SPHINXOPTS="-D language='it'" latexpd

triggers the error above. However, the pdf is produced.
Thanks.

> To post to this group, send email to sphinx...@googlegroups.com.
> Visit this group at http://groups.google.com/group/sphinx-users.
> For more options, visit https://groups.google.com/d/optout.

--
You received this message because you are subscribed to a topic in the Google Groups "sphinx-users" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/sphinx-users/z5cn4p-YFZQ/unsubscribe.
To unsubscribe from this group and all its topics, send an email to sphinx-users+unsubscribe@googlegroups.com.

To post to this group, send email to sphinx...@googlegroups.com.
Visit this group at http://groups.google.com/group/sphinx-users.
For more options, visit https://groups.google.com/d/optout.
--
Paolo Cavallini http://www.faunalia.it/pc
test.tar.gz

Takayuki Shimizukawa

unread,
Sep 15, 2014, 3:20:27 AM9/15/14
to sphinx...@googlegroups.com
Hi Paolo,

I tried to build your small project "test.tar.gz".

> ! Package babel Error: Unknown language `italian'. Either you have
> (babel) misspelled its name, it has not been installed,
> (babel) or you requested it in a previous run. Fix its name,
> (babel) install it or just rerun the file, respectively.

I didn't get this message but I got a another warning as:

Package babel Warning: No hyphenation patterns were loaded for
(babel) the language `Italian'
(babel) I will use the patterns loaded for \language=0 instead.

My full console log is here:
https://gist.github.com/shimizukawa/690ce8e7e1bb6de3b05e

Unfortunately, I'm not familiar to LaTeX and babel the I don't say
anything why that happen. My testing environment is:

* Ubuntu-12.04 LTS
* TeXLive 2012
* Sphinx-1.2.3
* make latexpdf SPHINXOPTS="-D language=it"

Regards,
--
Takayuki SHIMIZUKAWA
http://about.me/shimizukawa


>>>> > email to sphinx-users...@googlegroups.com.
>>>> > To post to this group, send email to sphinx...@googlegroups.com.
>>>> > Visit this group at http://groups.google.com/group/sphinx-users.
>>>> > For more options, visit https://groups.google.com/d/optout.
>>>>
>>>> --
>>>> You received this message because you are subscribed to a topic in the
>>>> Google Groups "sphinx-users" group.
>>>> To unsubscribe from this topic, visit
>>>> https://groups.google.com/d/topic/sphinx-users/z5cn4p-YFZQ/unsubscribe.
>>>> To unsubscribe from this group and all its topics, send an email to
>>>> sphinx-users...@googlegroups.com.
>>>> To post to this group, send email to sphinx...@googlegroups.com.
>>>> Visit this group at http://groups.google.com/group/sphinx-users.
>>>> For more options, visit https://groups.google.com/d/optout.
>>>
>>>
>>>
>>>
>>> --
>>> Paolo Cavallini http://www.faunalia.it/pc
>>
>>
>>
>>
>> --
>> Paolo Cavallini http://www.faunalia.it/pc
>
> --
> You received this message because you are subscribed to the Google Groups
> "sphinx-users" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to sphinx-users...@googlegroups.com.

Paolo Cavallini

unread,
Sep 16, 2014, 2:34:27 AM9/16/14
to sphinx...@googlegroups.com
Now, after an upgrade (debian sid) the error has disappeared, so I assume it was a latex bug.
Sorry for the noise.

Takayuki Shimizukawa

unread,
Sep 16, 2014, 2:36:49 AM9/16/14
to sphinx...@googlegroups.com
2014-09-16 15:30 GMT+09:00 Paolo Cavallini <paolo.c...@gmail.com>:
> Now, after an upgrade (debian sid) the error has disappeared, so I assume it
> was a latex bug.
> Sorry for the noise.

No problem, it's a good news ;)
Let's use newer version!

Ivan Cerato

unread,
Mar 16, 2016, 9:31:56 AM3/16/16
to sphinx-users
Hi,
I have the same problem with Xubuntu 15.10 (Latex default installation and Sphinx last version) and I find a solution about this:

You add this lines in files: conf.py

latex_elements = {
         'babel':'\\usepackage[shorthands=off]{babel}'
}

And now italian language setting is ok.

Bye

Ivan Cerato
Reply all
Reply to author
Forward
0 new messages