forked from ILIAS-eLearning/ILIAS
-
Notifications
You must be signed in to change notification settings - Fork 0
Draft: Add LatexContent component to UI Framework #6
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Open
fneumann
wants to merge
1,040
commits into
dev-trunk
Choose a base branch
from
dev11-streamline-latex-ui-modification
base: dev-trunk
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
…AS-eLearning#9545) * Bugfix 45021 * Insert Version in sk.lang and zh.lang * Fix Copyright --------- Co-authored-by: Keven Clausen <keven.clausen@kroeplin-projekte.de>
(cherry picked from commit 1170f4f)
(cherry picked from commit 4940162)
…ther container (45013)
Co-authored-by: Felix Jonas Wiegleb <jwiegleb@databay.de>
This reverts commit 2273e89.
…zeigt (ILIAS-eLearning#9744) * fix(44826): include scss rules for displaying latex in the editor * style: remove double new lines (cherry picked from commit 1b90a73)
e2b6816 to
04660bd
Compare
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This PR proposes to add a new component Legacy\LatexContent to the UI framework. It is related to the corresponding feature request Streamline LaTeX usage .
Legacy\LatexContentis used as an intermediate solution for legacy content with mathematical formulas that are rendered by the JavaScript library MathJax. The LaTeX code of these formulas must be wrapped in the delimiters[tex]and[tex].The modification of page content by MathJax is controlled by CSS classes. The class
tex2jax_ignoreis added to the body element of a page to prevent a modification outsideLegacy\LatexContent. These contents are wrapped in elements with a classtex2jax_processto enable the modification inside.Legacy\LatexContentregisters a JavaScript filemathjax.json the page. This file configures and loads MathJax asynchronously. MathJax scans the page for content to be processed and subsequently loads additional modules. All resources that are needed by MathJax are defined by the classDefaultLatexResourcesimplementing the interfaceLatexResources. It is used by the UI framework to populate the public folder with these resources, and it is offered to other Components by a 'Define/Use' integration to support the export of the resources for offline content.The
Legacy\Factoryis added to provide separate renderers for the legacy componentsContentandLatexContent. This way the resources for MathJax are only added to pages that useLatexContent. However, these are stilly many pages because the content of the ILIAS page editor needs to be wrapped in aLatexContentcomponent.Compared to the previous pull request, this new one does not inject a configuration to the UI framework by ILIAS. That means there is no setup switch to prevent the inclusion of the MathJax library on the page once a
LatexContentis included, event if it does not have a LaTeX formula at all.