slatex / sTeX-React

GNU Affero General Public License v3.0
3 stars 3 forks source link

Overflow of text in slide #32

Closed abchugh closed 1 year ago

abchugh commented 1 year ago

A content SUGGESTION was logged by a user at the following url:

https://courses.voll-ki.fau.de/browser/%3AsTeX%2Fdocument%3Farchive%3DMiKoMH%2FAI%26filepath%3Dcourse%2Fnotes%2Fnotes.xhtml?inDocPath=hckrrx

The issue as described by the user:

It would be better if the size of slide matches with other contents.

The text highlighted while reporting this issue:

Definition

The selected text was in the following section hierarchy:

INNERMOST SECTION FIRST

  1. GitLab: https://gl.mathhub.info/MiKoMH/AI/-/blob/main/source/intro/slides/whatisai.en.tex
    FetchURL: /:sTeX/fulldocument?archive=MiKoMH/AI&filepath=intro/slides/whatisai.en.xhtml

  2. GitLab: https://gl.mathhub.info/MiKoMH/AI/-/blob/main/source/intro/sec/whatisai.en.tex
    FetchURL: /:sTeX/fulldocument?archive=MiKoMH/AI&filepath=intro/sec/whatisai.en.xhtml

  3. GitLab: https://gl.mathhub.info/MiKoMH/AI/-/blob/main/source/course/sec/overview.en.tex
    FetchURL: /:sTeX/fulldocument?archive=MiKoMH/AI&filepath=course/sec/overview.en.xhtml

  4. GitLab: https://gl.mathhub.info/MiKoMH/AI/-/blob/main/source/course/notes/notes.tex
    FetchURL: :sTeX/fulldocument?archive=MiKoMH/AI&filepath=course/notes/notes.xhtml

kohlhase commented 1 year ago

@Jazzpirate this is probably a RusTeX dimensions problem, the source uses \begin/\end{columns} from beamer And beamer has its own share of problems with dimensions.

Jazzpirate commented 1 year ago

I would have thought the same, but the associated paragraphs do not have any width-attributes... rustex always adds a width to a tex-paragraph. @abchugh is there some frontend hack that eliminates CSS attributes?

Jazzpirate commented 1 year ago

Indeed, the hack isn't active in the mmt-viewer, see https://stexmmt.mathhub.info/:sTeX/browser/fulldocument?archive=MiKoMH/AI&filepath=intro/slides/whatisai.en.xhtml - which looks better, but still weird - as far as I can tell, all the widths are relative and <100%, but it's still too wide. There also seems to be a CSS class "inner-frame" missing somehow...

Jazzpirate commented 1 year ago

will look into what's going on there

abchugh commented 1 year ago

Looking at mmt-viewer (no hacks), here are a couple of hints about what is possibly messing up things:

Jazzpirate commented 1 year ago

Hmm, the width: max-content doesn't explain the actual widths though... removing it makes it shrink, true - but where does all the empty space to the right come from? what "content" is it that blows up the widths there?

Jazzpirate commented 1 year ago

either way, clearly, the columns-stuff does not work with rustex. I'd need to figure out how that even works (my fear is that it works with shipout routines and \vsize, in which case there's very little I can do, since both notions don't really "make sense" in HTML)

Jazzpirate commented 1 year ago

manually set widths width: 90.4674% and width: 47.9477% on some paragraphs make the view a bit odd even when width: max-content is removed.

that is actually perfectly fine, if you keep in mind that at that point the paragraphs are supposed to have roughly half the width of the frame, so that doesn't look odd to me. It only looks odd because the image below the text is supposed to be to the right of the text, because columns don't work :)

abchugh commented 1 year ago

Hmm, the width: max-content doesn't explain the actual widths though... removing it makes it shrink, true - but where does all the empty space to the right come from? what "content" is it that blows up the widths there?

I really don't know the answer to that question. You may be severely overestimating my knowledge of this HTML-CSS stuff 😀 . I simply keep trimming the HTML by trial-and-error to find what's causing the problem (by pressing delete key in the browser's debugger). Here is the cut down version that i used for finding the problematic CSS properties.

small_example.zip

Jazzpirate commented 1 year ago

I will set .hbox .vbox { width:fit-content} instead; let's see what that does ^^

Jazzpirate commented 1 year ago

closing this for now; will be fixed (or at least improved) with the next rustex/MMT/frontend versions