Today I had this error message on compiling a document:
! Package babel Error: The character '"' is not a shorthand character in french
After commenting a lot of things I finally identified the culprit: Using the pdf
option with pstricks
. Here is a minimal example:
\documentclass[11pt, a4paper]{article}
\usepackage[utf8]{inputenc}
\usepackage[T1]{fontenc}
\usepackage{lmodern}
% \usepackage{auto-pst-pdf, pstricks}
\usepackage[pdf]{pstricks}
\usepackage{pstricks-add}
\usepackage[french]{babel}
\begin{document}
\psset{xunit = 0.5cm, plotstyle = curve}
\begin{pspicture}(-10,-1)(10,2)
\psaxes[labels=none]{->}(0,0)(-10,-1)(10,2)%
\psplot[linecolor=blue,linewidth=1.5pt, algebraic]{-10}{10}{1/(1 + x^2)}%
\end{pspicture}
\end{document}
Replacing [french]
with, say, german
results in no error message.
Same thing if I comment usepackage[pdf]{pstricks}
and uncomment \usepackage{autopst-pdf,pstricks}
.
Is there something to be done?
Another question about the pdf
option of pstricks
: Packages like pst-plot
or pstricks-add
load pstricks
; why don't they pass the pdf
option on to pstricks
? For most of my work, I only have to load pstricks-add
. If I want to use this option I also have to explicitly write \usepackage[pdf]{pstricks}
first.
x^2
from your code appears on this site as a unicode upperscript2
, and testing the code necessitates rewriting it asx^2
.