Comments (5)
I’ve answered this question in stackexchange, with a guess. I’m not sure how tikz
deals with active characters and there isn’t a full MWE. I’m closing this issue, but we can continue in stackexchange.
from babel.
@jbezos And example would be this. It errors because the active chars in {(t>100)?0.2:0.5}
are expanded when pgfplots parses the math. And with (crude) protected definitions it doesn't error:
\documentclass{article}
\usepackage{pgfplots,xparse}
\pgfplotsset{compat=1.18}
\NewDocumentEnvironment{MyEnv}{O{}mm+b}{
\begin{tikzpicture}
\begin{semilogxaxis}[xmin={#2},xmax={#3},ymin=0,ymax=1]
#4
\end{semilogxaxis}
\end{tikzpicture}
}{}
\usepackage[french]{babel}
\begin{document}
\let\oriq?
\let\oricolon:
\protected\def?{\ifincsname\string?\else\oriq\fi} %comment to see error
\protected\def:{\ifincsname\string:\else\oricolon\fi} %comment to see error
\section{Sec: Sec?}\label{sec:blub}
%\csname @safe@activestrue\endcsname
text: text?
\begin{MyEnv}[]{1e-1}{1e4}
\node at (1,0.5) {text?};
\draw[thick,blue,dashed] (axis cs:1,0) -- (axis cs:100,1);
\addplot[variable=t,domain=1e-1:1e4] {(t>100)?0.2:0.5};
\end{MyEnv}
\end{document}
from babel.
Related: #196.
from babel.
@u-fischer the protection you outlined above seems to be incompatible with the babel
tikz
library. Adding \usetikzlibrary{babel}
to your MWE above gives me
! File ended while scanning use of \path.
I can confirm that the "collect all shorthands in a macro and disable them" approach, suggested by @jbezos on StackExchange, works fine with or without the babel
library.
I do not know enough about TeX
to understand why, but I figured letting you know would help!
from babel.
Glad it helped. As I said in stackexchange, a more user friendly way to switch all shorthands on or off can be useful. (Added to my todo list.)
from babel.
Related Issues (20)
- documentation error: Greek uses `~` shorthand only in polytonic and ancient language variants.
- 8-bit font encodings in *.ini files HOT 7
- I made some modification to `babel-fa.ini` file for Persian language HOT 4
- KOMA script's \Ifthispageodd gives and error when babel's layout = counters is used HOT 4
- `\ShowLocaleProporties` not available with `babel` 2023/12/06 v3.98? HOT 3
- babel, fontsetup, and NewComputerModern (and other fonts) HOT 7
- `\@tempa` in `\@citex` can be overwritten.
- vietnamese.ldf's \ProvidesLanguage
- The cancel package doesn't work sometimes in Hebrew HOT 4
- \selectfont in math mode raises an error with onchar
- Provide install instructions HOT 7
- Interaction between babel and ltxtable HOT 15
- hbox inside equation is problematic HOT 5
- An outdated link in doc
- Too much space before a comma in maths if [italian] is used HOT 9
- \endotherlanguage leaves @ignore globally true HOT 17
- TL2024 + latex or pdflatex + norsk = “! Missing number, treated as zero.” HOT 15
- [british]babel should spit out a warning of a noticeable kind if hyphen-english is missing HOT 9
- Tibetan line breaks HOT 3
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from babel.