General ⇒ PicTex y babel
-
- Posts: 10
- Joined: Wed Mar 19, 2008 11:04 pm
PicTex y babel
I've had problems using PicTex and Babel packages together... PicTex runs ok without babel, but with it, the error messages comes and the picture doesn't show... what's happening???
Thanks!
NEW: TikZ book now 40% off at Amazon.com for a short time.
And: Currently, Packt sells ebooks for $4.99 each if you buy 5 of their over 1000 ebooks. If you choose only a single one, $9.99. How about combining 3 LaTeX books with Python, gnuplot, mathplotlib, Matlab, ChatGPT or other AI books? Epub and PDF. Bundle (3 books, add more for higher discount): https://packt.link/MDH5p
- Stefan Kottwitz
- Site Admin
- Posts: 10324
- Joined: Mon Mar 10, 2008 9:44 pm
Re: PicTex y babel
welcome to the board!
Which error messages do you get? Without knowing any of the error messages it's hard to help.
Stefan
-
- Posts: 10
- Joined: Wed Mar 19, 2008 11:04 pm
PicTex y babel
But my list of errors is the following:
! Use of \!getlengths doesn't match its definition.
l.13 \setcoordinatesystem units <
1cm,1cm>
If you say, e.g., `\def\a1{...}', then you must always
put `1' after `\a', since control sequence names are
made up of letters only. The macro here has not been
followed by the required stuff, so I'm ignoring it.
! Use of \arrow doesn't match its definition.
\flecha ->\arrow <
6pt> [0.2, 0.6]
l.16 \flecha
from 0 -0.6 to 0 -1.2
If you say, e.g., `\def\a1{...}', then you must always
put `1' after `\a', since control sequence names are
made up of letters only. The macro here has not been
followed by the required stuff, so I'm ignoring it.
If I don't use Babel package, always works perfect.
- Stefan Kottwitz
- Site Admin
- Posts: 10324
- Joined: Mon Mar 10, 2008 9:44 pm
Re: PicTex y babel
could you please post example code that produces this error? I would test it on my system.
Stefan
-
- Posts: 10
- Joined: Wed Mar 19, 2008 11:04 pm
PicTex y babel
The code without babel that works perfect:
\documentclass{article}
\DeclareFixedFont{\fiverm}{OT1}{cmr}{m}{n}{5pt}
\input{prepictex}
\input{pictex}
\input{postpictex}
\begin{document}
\newcommand{\flecha}{\arrow <6pt> [0.2, 0.6]}
Solucion:
\[\beginpicture
\setcoordinatesystem units <1cm,1cm>
\setplotarea x from 0 to 5, y from 0 to 0.1
\axis bottom ticks withvalues 0 1 2 3 $\cdots$ 18 / quantity 6 /
\flecha from 0 -0.6 to 0 -1.2
\putrectangle corners at 0 -0.6 and 4 -1.2
\put {\stack {$A=?$}} at 2 -0.9
\endpicture\]
\end{document}
And the code with babel package that shows a lot of errors:
\documentclass{article}
\usepackage[spanish]{babel}
\DeclareFixedFont{\fiverm}{OT1}{cmr}{m}{n}{5pt}
\input{prepictex}
\input{pictex}
\input{postpictex}
\begin{document}
\newcommand{\flecha}{\arrow <6pt> [0.2, 0.6]}
Solución:
\[\beginpicture
\setcoordinatesystem units <1cm,1cm>
\setplotarea x from 0 to 5, y from 0 to 0.1
\axis bottom ticks withvalues 0 1 2 3 $\cdots$ 18 / quantity 6 /
\flecha from 0 -0.6 to 0 -1.2
\putrectangle corners at 0 -0.6 and 4 -1.2
\put {\stack {$A=?$}} at 2 -0.9
\endpicture\]
\end{document}
- Stefan Kottwitz
- Site Admin
- Posts: 10324
- Joined: Mon Mar 10, 2008 9:44 pm
PicTex y babel
the last code shows that the spanish style of babel is used, its extra definitions are causing the problem. If you don't need the shorthands for quoting the problem would be solved by
Code: Select all
\deactivatequoting
Stefan
-
- Posts: 10
- Joined: Wed Mar 19, 2008 11:04 pm
Re: PicTex y babel
I contacted a person via e-mail and he told that babel changes some characters.
The problem became solved using \shorthandoff{<>} and \shorthandon{<>} before and after each PicTex graphic.
Thank you so much
- Stefan Kottwitz
- Site Admin
- Posts: 10324
- Joined: Mon Mar 10, 2008 9:44 pm
PicTex y babel
Yes, that would solve it too. \deactivatequoting calls \shorthandoff{<>}. Here's some code from spanish.ldf for explanation:mateovasco wrote: The problem became solved using \shorthandoff{<>} and \shorthandon{<>} before and after each PicTex graphic.
Code: Select all
\def\deactivatequoting{%
\shorthandoff{<>}%
\let\es@quoting\deactivatequoting}
\def\activatequoting{%
\shorthandon{<>}%
\let\es@quoting\activatequoting}%
Stefan
PicTex y babel
Code: Select all
\usepackage[spanish,es-noquoting]{babel}
-
- Posts: 1
- Joined: Sun Oct 15, 2023 6:34 pm
PicTex y babel
Thanks very much. These simples commands solutionated my problem with PicTeX and babel. In another opportunity i will use other solutions posted.mateovasco wrote: The problem became solved using \shorthandoff{<>} and \shorthandon{<>} before and after each PicTex graphic.
