slatex / sTeX

A semantic Extension of TeX/LaTeX
49 stars 9 forks source link

tikz problem: #379

Open kohlhase opened 1 year ago

kohlhase commented 1 year ago

In MiKoMH/AI/source/csp/slides/csnet-tightness.en.tex I get the result

Screenshot 2022-12-05 at 08 41 03

intead of

Screenshot 2022-12-05 at 08 42 57
Jazzpirate commented 1 year ago

I can't find a csnet-tightness.en.tex, but there is a csp-tightness.en.tex. Looking at that: https://stexmmt.mathhub.info/:sTeX/browser/fulldocument?archive=MiKoMH/AI&filepath=csp/slides/csp-tightness.en.xhtml it looks like the "red\blue"-nodes are there, but their positioning is off (you can still see the beginnings of the "r" and "b" at the right sides of the circles). This is a problem I have in general with tikz/pgf->svg that I haven't found a proper solution for yet. I think the main problem is that pgf and svg have different ideas of what "place node n at coordinates (x,y)" means (i.e. the center of n should be at (x,y)? the upper-left corner should be at (x,y)?) and it takes annoying fiddling to clean that up. The fiddling I currently have seems to work fine elsewhere, so I'm afraid if I fiddle such that it works here, it will break elsewhere.

The only solution I see is actually digging into the details of both pgf and svg to find a proper solution, which I don't see happening in the near future :(

kohlhase commented 1 year ago

I can't find a csnet-tightness.en.tex, but there is a csp-tightness.en.tex.

I renamed, maybe you need to upll?

kohlhase commented 1 year ago

When I made the issue, I was not aware that the content is old.

kohlhase commented 1 year ago

Maybe we wait for the migration.

Jazzpirate commented 1 year ago

update: I just noticed that the problem is related to paragraphs in svg - if I turn their CSS width/left-margin/right-margin off, it looks right. That might help me to come up with a temporary hack. But also, the values are absolute in px rather than relative in %... I will look into that