slatex / rustex Goto Github PK
View Code? Open in Web Editor NEWA (somewhat experimental) implementation of a TeX engine in rust, used to convert LaTeX documents to xhtml.
A (somewhat experimental) implementation of a TeX engine in rust, used to convert LaTeX documents to xhtml.
A content ERROR was logged by "Philipp Hofmann" at the following url:
https://courses.voll-ki.fau.de/course-notes/ai-1?inDocPath=hckrrx.j5vi07%7E6d09529a
Left and right bar are either scaled wrong or moved too high
Overview: KWARC Research and Projects
Applications:
eMath 3.0, Active Documents, Active Learning, Semantic Spreadsheets/CAD/CAM, Change Mangagement, Global Digital Math Library, Math Search Systems,
SMGloM
: Semantic Multilingual Math Glossary, Serious Games, ...
Foundations of Math:
▷
MathML
,
OpenMath
▷advanced Type Theories
▷Mmt: Meta Meta Theory
▷Logic Morphisms/Atlas
▷Theorem Prover/CAS Interoperability
▷Mathematical Models/Simulation
KM & Interaction:
▷Semantic Interpretation (aka. Framing)
▷math-literate interaction
▷
MathHub
: math archives & active docs
▷Active documents: embedded semantic services
▷Model-based Education
Semantization:
▷
LATEXML
:
LATEX
→
XML
▷
STEX
: Semantic
LATEX
▷invasive editors
▷Context-Aware IDEs
▷Mathematical Corpora
▷Linguistics of Math
▷ML for Math Semantics Extraction
Foundations: Computational Logic, Web Technologies,
OMDoc
/Mmt
STEX :
42023-10-16
INNERMOST SECTION FIRST
GitLab: https://gl.mathhub.info/MiKoMH/talks/-/blob/main/source/kwarc/slides/projectplan.en.tex
FetchURL: https://stexmmt.mathhub.info//:sTeX/fulldocument?archive=MiKoMH/talks&filepath=kwarc/slides/projectplan.en.xhtml&bindings=0_3_9I2DoQZhe0G
GitLab: https://gl.mathhub.info/MiKoMH/AI/-/blob/main/source/course/sec/kwarc-ai.en.tex
FetchURL: https://stexmmt.mathhub.info//:sTeX/fulldocument?archive=MiKoMH/AI&filepath=course/sec/kwarc-ai.en.xhtml&bindings=0_2_2hfxFQbea
GitLab: https://gl.mathhub.info/MiKoMH/AI/-/blob/main/source/course/sec/overview.en.tex
FetchURL: https://stexmmt.mathhub.info//:sTeX/fulldocument?archive=MiKoMH/AI&filepath=course/sec/overview.en.xhtml&bindings=0_0_7i
GitLab: https://gl.mathhub.info/MiKoMH/AI/-/blob/main/source/course/notes/notes1.tex
FetchURL: https://stexmmt.mathhub.info//:sTeX/fulldocument?archive=MiKoMH/AI&filepath=course/notes/notes1.xhtml
So I can reference it from the sTeX README
minimal example I could find, working on the current master f166e3a:
\documentclass{article}
\usepackage{listings}
\lstdefinelanguage{Bad}{otherkeywords={=>}}
\begin{document}
\begin{lstlisting}[language=Bad]
hello
\end{lstlisting}
\end{document}
produces
File ended unexpectedly
/path/to/repo/RusTeX/rustex/test.tex (10;0) 0: rustex::commands::conditionals::false_loop
1: core::ops::function::FnOnce::call_once
2: rustex::commands::PrimitiveTeXCommand::get_expansion
3: rustex::commands::TeXCommand::expand
4: rustex::interpreter::Interpreter::do_top
5: rustex::interpreter::Interpreter::do_vfile
6: rustex::interpreter::Interpreter::do_file
7: rustex::run
8: std::sys_common::backtrace::__rust_begin_short_backtrace
9: core::ops::function::FnOnce::call_once{{vtable.shim}}
10: <alloc::boxed::Box<F,A> as core::ops::function::FnOnce<Args>>::call_once
at /rustc/cc66ad468955717ab92600c770da8c1601a4ff33/library/alloc/src/boxed.rs:2007:9
<alloc::boxed::Box<F,A> as core::ops::function::FnOnce<Args>>::call_once
at /rustc/cc66ad468955717ab92600c770da8c1601a4ff33/library/alloc/src/boxed.rs:2007:9
std::sys::unix::thread::Thread::new::thread_start
at /rustc/cc66ad468955717ab92600c770da8c1601a4ff33/library/std/src/sys/unix/thread.rs:108:17
11: start_thread
12: __clone3
if you exchange the otherkeywords={=>}
with e.g. otherkeywords={->}
or even otherkeywords={<=}
it works as expected (with LaTeX, all three work). Perhaps something got expanded in an unexpected place, where the =
caused confusion? Unfortunately, i'm not sure how to figure out where / what RusTeX was doing before it failed, so I can't investigate this further.
(I discovered this since the listings
package's definition for Haskell includes this)
In https://stexmmt.mathhub.info//:sTeX/fulldocument?archive=MiKoMH/GenCS&filepath=pl0/slides/semantic-properties.en.xhtml&bindings=0_7_3X7DPhptU
we get
this probably needs a systematic patch
Example:
https://gl.mathhub.info/MiKoMH/talks/-/blob/main/source/kwarc/slides/projectplan.en.tex
\sref
links do not seem to linebreak, e.g. in https://courses-staging.kwarc.info/browser/%3AsTeX%2Fdocument%3Farchive%3DMiKoMH%2FAI%26filepath%3Dcourse%2Fnotes%2Fnotes.xhtml?inDocPath=-pg601z.6rrvde.h9wg49 vertical lines in tables: e.g. in https://courses-staging.kwarc.info/browser/%3AsTeX%2Fdocument%3Farchive%3DMiKoMH%2FAI%26filepath%3Dcourse%2Fnotes%2Fnotes.xhtml?inDocPath=-qxa9pm.-z4t3oa.3tqito
very long dash in https://courses-staging.kwarc.info/browser/%3AsTeX%2Fdocument%3Farchive%3DMiKoMH%2FAI%26filepath%3Dcourse%2Fnotes%2Fnotes.xhtml?inDocPath=6deehn.4q53cp.xj5wid
Toying around with latest
from 2023-07-13, I found:
\documentclass{article}
\begin{document}
Backslash-Space works in text mode but not math mode: x\ 678.
\[
x\ 678
\]
This $y$ should be italic:
\[
3y
\]
\end{document}
A content ERROR was logged by "Philipp Hofmann" at the following url:
https://courses.voll-ki.fau.de/de/course-notes/ai-1?inDocPath=-xsjx0y.wpwfyn%7E5b6b26ef
The Slide in the Lecture has the 50% on the left side and the Consumer tasks above the 10^6
Precision 100% Producer Tasks 50% Consumer Tasks 103±1 Concepts 106±1 Concepts Coverage
INNERMOST SECTION FIRST
GitLab: https://gl.mathhub.info/MiKoMH/AI/-/blob/main/source/intro/slides/ai-producer-consumer.en.tex
FetchURL: https://stexmmt.mathhub.info//:sTeX/fulldocument?archive=MiKoMH/AI&filepath=intro/slides/ai-producer-consumer.en.xhtml&bindings=0_3_zjnV863E
GitLab: https://gl.mathhub.info/MiKoMH/AI/-/blob/main/source/course/sec/two-attacks.en.tex
FetchURL: https://stexmmt.mathhub.info//:sTeX/fulldocument?archive=MiKoMH/AI&filepath=course/sec/two-attacks.en.xhtml&bindings=0_1_v6h6
GitLab: https://gl.mathhub.info/MiKoMH/AI/-/blob/main/source/course/sec/overview.en.tex
FetchURL: https://stexmmt.mathhub.info//:sTeX/fulldocument?archive=MiKoMH/AI&filepath=course/sec/overview.en.xhtml&bindings=0_0_7i
GitLab: https://gl.mathhub.info/MiKoMH/AI/-/blob/main/source/course/notes/notes1.tex
FetchURL: https://stexmmt.mathhub.info//:sTeX/fulldocument?archive=MiKoMH/AI&filepath=course/notes/notes1.xhtml
While playing around with the latest git (3a62360), I stumbled across an interesting (though in practice, probably not often relevant) divergence between pdf & html output:
Here is a box:
\begin{tikzpicture}
\draw (0,0) -- (1,0) -- (1,1) -- (0,1) -- cycle;
\end{tikzpicture}
produces a box in the html:
but if the tikzpicture has the overlay option set:
Here is a box:
\begin{tikzpicture}[overlay]
\draw (0,0) -- (1,0) -- (1,1) -- (0,1) -- cycle;
\end{tikzpicture}
then the box is gone:
In the html, the svg it was translated to is actually still there — but with width & height set to 0, and hence invisible. I'm not sure how much can be done about it (the tikz manual states that setting overlay
turns off computation of the bounding box, which it seems would be needed here), and tbh I was beyond impressed that anything tikz-related works at all; but I still thought I'd let you know in case you're not aware of it already / it is something that can be fixed by someone more familiar with RusTeX's internal workings.
(as a short postscript: this was discovered when someone asked me 'but does the coffeestains package work?' — the answer turned out to be yes, but only by using the 'internal' \stainA
, \stainB
by hand in a tikzpicture; \coffeestainA
& friends as given in the documentation set overlay
& hence fail)
For Example 5 slides need to be generated for the following document:
https://gl.mathhub.info/MiKoMH/AI/-/blob/main/source/intro/slides/aiexists.en.tex
Latest master (eebf676) fails to build with following error:
$cargo build
…
error[E0308]: mismatched types
--> src/lib.rs:213:45
|
213 | Ok(mut bmp) => Some(bmp.as_image()),
| ---- ^^^^^^^^^^^^^^ expected `DynamicImage`, found `image::dynimage::DynamicImage`
| |
| arguments to this enum variant are incorrect
|
= note: `image::dynimage::DynamicImage` and `DynamicImage` have similar names, but are actually distinct types
note: `image::dynimage::DynamicImage` is defined in crate `image`
--> /home/rajeesh/.cargo/registry/src/index.crates.io-6f17d22bba15001f/image-0.24.9/src/dynimage.rs:55:1
|
55 | pub enum DynamicImage {
| ^^^^^^^^^^^^^^^^^^^^^
note: `DynamicImage` is defined in crate `image`
--> /home/rajeesh/.cargo/registry/src/index.crates.io-6f17d22bba15001f/image-0.25.1/src/dynimage.rs:50:1
|
50 | pub enum DynamicImage {
| ^^^^^^^^^^^^^^^^^^^^^
= note: perhaps two different versions of crate `image` are being used?
help: the type constructed contains `image::dynimage::DynamicImage` due to the type of the argument passed
--> src/lib.rs:213:40
Cargo.lock
contains two crates of image
, versions 0.24.9 and 0.25.1, probably pulled by different dependent crates.
reported at slatex/sTeX-React#25
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.