Comments (5)
Looks like \automatichyphenmode=2
(defaults 0) works, but I don't know why.
The LuaTeX dvi outputs with \automatichyphenmode
set to 0, 1, and 2 are already different, so the culprit might not be dvisvgm
.
\documentclass{article}
\pagestyle{empty}
\def\testhyphens{%
A-B\par
-\par
A-\hspace{0pt}B\par
A-\par
-B\par\bigskip}
\begin{document}
\automatichyphenmode=0
\testhyphens
\automatichyphenmode=1
\testhyphens
\automatichyphenmode=2
\testhyphens
\end{document}
Running
lualatex --output-format=dvi dvisvgm-gh255
dviasm dviasm dvisvgm-gh255.dvi > dvisvgm-gh255.dump
then in dvisvgm-gh255.dump
\automatichyphenmode=0 |
\automatichyphenmode=1 |
\automatichyphenmode=2 |
---|---|---|
push: right: 77pt down: 63pt fnt: [...] at 10pt set: '\x1b"' pop: push: right: 77pt down: 75pt set: '@' pop: push: right: 77pt down: 87pt set: '\x1b@"' pop: push: right: 77pt down: 99pt set: '\x1b@' pop: push: right: 77pt down: 111pt set: '"' pop: |
push: right: 77pt down: 135pt set: '\x1b"' pop: push: right: 77pt down: 147pt set: '@' pop: push: right: 77pt down: 159pt set: '\x1b@"' pop: push: right: 77pt down: 171pt set: '\x1b@' pop: push: right: 77pt down: 183pt set: '@"' pop: |
push: right: 77pt down: 207pt set: '\x1b@"' pop: push: right: 77pt down: 219pt set: '@' pop: push: right: 77pt down: 231pt set: '\x1b@"' pop: push: right: 77pt down: 243pt set: '\x1b@' pop: push: right: 77pt down: 255pt set: '@"' pop: |
You can see the first and last line of each test group with \automatichyphenmode=2
are different from when \automatichyphenmode
is set to other values.
from dvisvgm.
@muzimuzhi Awesome, thank you for the detailed analysis!
dvisvgm indeed converts the DVI files correctly. The initial one created by LuaTeX doesn't contain the missing hyphens so that dvisvgm can't process them.
from dvisvgm.
With lualuatex --output-format=dvi
and \automatichyphenmode=(0|1)
, one also got
Missing character: There is no @ (U+0040) in font nullfont!
Missing character: There is no @ (U+0040) in font nullfont!
(\tracinglostchars=3
can be used to convert them into errors.)
from dvisvgm.
Turns out it's a luaotfload
problem, see latex3/luaotfload#270. luaotfload
maintainer Marcel Krüger has already kindly pushed a fix to dev
branch, which you can test with locally by executing
git clone --branch=dev --depth=1 [email protected]:latex3/luaotfload.git
cd luaotfload
# needs l3build package
l3build install
cd /path/to/tex/files
# needs latex-base-dev and latex-bin-dev packages perhaps
# should be equivalent to "lualatex-dev --output-format=dvi"
dvilualatex-dev dvisvgm-gh255
dvisvgm --font-format=woff2 dvisvgm-gh255
from dvisvgm.
Great, thanks for the detailed explanation and for hunting down that luaotfload
issue. I just confirmed that the dev
branch for luaotfload
does resolve this issue (and the problem I originally had that evolved into the MWE) as you said. I'll close this as the issue is in luaotfload
and already fixed pending release. Thanks again.
from dvisvgm.
Related Issues (20)
- Assertion violation + core dump HOT 3
- Raster instead of vector HOT 1
- Missing text from PDF >> SVG HOT 6
- Baseline incorrect with Chinese characters HOT 15
- Ghostscript 10.01.0+ support HOT 6
- PDF -> SVG: Pixels cut-off on right border HOT 4
- pstricks: PostScript error: undefined in NodeScale HOT 7
- Request for reduced information verbosity level/flag HOT 6
- TL build patch: potrace HOT 2
- TL build patch: main src/Makefile.am HOT 1
- InvalidDVIFileException in upTeX DVI only on Solaris HOT 2
- Deferred initialization of PS doesn't work HOT 4
- color gradient missing in svg file HOT 4
- Breakage with libgs-10.02 creating svg file from asy. HOT 15
- 3D plots in PDFs generated with `interp` shading disappear from SVG HOT 1
- Unable to convert Japanese characters to SVG from DVI HOT 13
- Ghostscript sill not found (macOS) HOT 4
- Wrong clipping and viewport with multiple pages converted at once HOT 2
- element id overlap HOT 1
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 dvisvgm.