Comments (4)
This following naive patch seems to work, but I did not think much about it:
diff --git a/babel.dtx b/babel.dtx
index ebfea61..859ddb9 100644
--- a/babel.dtx
+++ b/babel.dtx
@@ -23296,6 +23296,18 @@ local ranges = Babel.ranges
local DIR = node.id('dir')
local GLYPH = node.id('glyph')
+local tenln = font.id('tenln')
+local tenlnw = font.id('tenlnw')
+local tencirc = font.id('tencirc')
+local tencircw = font.id('tencircw')
+
+local function glyph_not_picture_font(node)
+ local id = node.id
+ if id ~= GLYPH then
+ return false
+ else
+ local font = node.font
+ return font ~= tenln and font ~= tenlnw
+ and font ~= tencirc and font ~= tencircw
+ end
+end
local function insert_implicit(head, state, outer)
local new_state = state
@@ -23384,7 +23396,7 @@ function Babel.bidi(head, ispar, hdir)
-- current one is not added until we start processing the neutrals.
-- three cases: glyph, dir, otherwise
- if item.id == GLYPH
+ if glyph_not_picture_font(item)
or (item.id == 7 and item.subtype == 2) then
local d_font = nil
@@ -23513,7 +23525,7 @@ function Babel.bidi(head, ispar, hdir)
temp = 'on' -- W6
end
for e = first_et, #nodes do
- if nodes[e][1].id == GLYPH then nodes[e][2] = temp end
+ if glyph_not_picture_font(nodes[e][1]) then nodes[e][2] = temp end
end
first_et = nil
has_en = false
@@ -23553,7 +23565,7 @@ function Babel.bidi(head, ispar, hdir)
temp = 'on' -- W6
end
for e = first_et, #nodes do
- if nodes[e][1].id == GLYPH then nodes[e][2] = temp end
+ if glyph_not_picture_font(nodes[e][1]) then nodes[e][2] = temp end
end
end
@@ -23589,7 +23601,7 @@ function Babel.bidi(head, ispar, hdir)
for r = first_on, q - 1 do
nodes[r][2] = temp
item = nodes[r][1] -- MIRRORING
- if Babel.mirroring_enabled and item.id == GLYPH
+ if Babel.mirroring_enabled and glyph_not_picture_font(item)
and temp == 'r' and characters[item.char] then
local font_mode = ''
if item.font > 0 and font.fonts[item.font].properties then
from babel.
@Udi-Fogiel Thanks. I'll try to take a look when I have a little time.
from babel.
@Udi-Fogiel After investigating, I realized \cancel
doesn’t use the picture
environment and builds the lines and vectors directly. Anyway, clearly mirroring must be disabled with ‘symbol’ fonts, and I’m even wondering if OML
and OMS
fonts should be included, too (or even U
and OMX
). For the moment, I’ll deal, following your suggestion, with the picture
fonts.
from babel.
and I’m even wondering if
OML
andOMS
fonts should be included, too (or evenU
andOMX
). For the moment, I’ll deal, following your suggestion, with thepicture
fonts.
Maybe it will be useful to check for fonts with script=math
as well? might help with the interaction between \hbox
and equations.
from babel.
Related Issues (20)
- \selectfont in math mode raises an error with onchar
- Shorthands create issues when creating new environments HOT 5
- 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
- Problems with \Ref and babel (The Latex Companion 3rd edition p.78) HOT 2
- Rollback option for .ldf files HOT 5
- Estonia babel won't compile due to missing headtoname HOT 2
- Spurious space in welsh.ldf HOT 3
- \babelfont fails with some fonts as of recent update HOT 2
- Change first item in abjad alph counter for Algeria, Morocco and Tunisia. HOT 2
- Incompatibility with igo gameborard typesetting package HOT 2
- eqref is misaligned when placed above equal sign in align and gather environments
- LuaLaTeX + babel + hyperref: extraneous = HOT 5
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.