UTF-8 hardcopy support using xelatex, polyglossia, fontspec, xunicode (replaces part of PR#972)#977
Merged
taniwallach merged 1 commit intoAug 8, 2019
Conversation
….dist as it was removed in commit bea85e1 apparently by accident. The hard copy generation code in lib/WeBWorK/ContentGenerator/Hardcopy.pm and the web service hard PDF generation code in lib/WebworkWebservice/MathTranslators.pm both expect this setting to exist. 2. Changes to support multilingual PDF generation using XeLaTeX and polyglossia. My test case was English+Hebrew, so I have added XeLaTeX conf/snippets/hardcopyThemes directories for using polyglossia for English and English+Hebrew. Testing requires using xelayex and having all of the following installed: the culmus Hebrew fonts, LaTeX pakages: polyglossia, fontspec, xunicode. conf/localOverrides.conf.dist contains sample code to use the new themes. The code in lib/WeBWorK/ContentGenerator/Hardcopy.pm which displays the available hardcopyThemes options was changed to avoid the use of maketext. Local installations may have local hardcopyThemes and they will not have entries in the PO translations files, and the prior code would trigger errors as a result. Note: The version of xelatex and various latex packages in Ubuntu 16.04 did not manage to compile the Hebrew+English latex files I tested, but they compile under Ubuntu 18.04 with the same packages.
Member
Author
|
@nmoller @heiderich - This is the hardcopy part of the old PR. Please check so we can merge it. |
Member
Author
|
I'm merging this in based on the prior testing in the previous multi-topic PR, as I am about to post a call for testing in the forums.
|
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
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 replaces the hardcopy part of #972 without the Docker config modifications.
Summary of changes:
conf/localOverrides.conf.distcontains sample code to use the new themes.conf/site.conf.distreinserts the$externalPrograms{pdflatex}setting as it was removed in commit bea85e1 apparently by accident.lib/WeBWorK/ContentGenerator/Hardcopy.pm- the code which displays the availablehardcopyThemesoptions was changed to avoid the use ofmaketext.Discussion of testing can be found in #972 .
@nmoller reviewed at #972 (review)
Testing with Hebrew requires using
xelatexinstead ofpdflatexand having all of the following installed:Note: The version of
xelatexand various latex packages in Ubuntu 16.04 did not manage to compile the Hebrew+English latex files I tested, but they compiled under Ubuntu 18.04 with the same packages.As noted at #972 (comment) the change to use
xelatexand to add the extra hardcopy themes can be done (by hand) incourse.conffor a specific course.