Open kohlhase opened 9 years ago
hmmm, it seems that the profiles only exist on pine
at /var/data/localmh/ext/perl5lib/lib/perl5/LaTeXML/resources/Profiles
and not in the LaTeXML repository. So we would have to commit them there. But we should find the best extension mechanism for lmh
before I do that.
if @dginev please confirm LaTeXML accepts two --profile options (and accepts absolute paths for profile files).
Actually, it doesn't do either of those. But you can give a --path=/absolute/path to the profile directory and it will then find your custom profile. (That's pretty new btw). Multiple profiles are something we agreed we want, but I haven't added yet (there is an issue about that somewhere in the LaTeXML tracker)
@KWARC/mmt will do building in the future.
@kohlhase is this still up-to-date?
I would really like to make progress on this, ... to speed up LaTeXML processing in MathHub.
Christian tells me that the MMT building works now. So we need to do two things:
@cmaeder this is the issue I was talking about.
@kohlhase I could implement using MMT for building now, but AFAIK we are currently in the progress of changing the build.msl syntax to something sbt-like (see KWARC/MMT#24). Since I expect this will come with new command line arguments as well (for building individual files), I would rather want to wait to implement anything until that is completly finished.
I do not think that the new syntax will change much in the call patterns. @cmaeder what do you think? In any case, it would be good to expose the new mechanism to being used to flush out bugs and generally make progress.
Currently the used profile can be overwritten by setting environment variable LATEXMLPROFILE (which is maybe inconvenient).
Based on the git group, MMT could use a default profile containing the group name as is the case for
stex-smglom-module
. (This means stex-slides-module.opt
should be renamed to stex-MiKoMH-module.opt
.)
Currently, the only difference between those two are basically the .cls files to preload (smglom.cls
versus mikoslides.cls
). (I'm not sure if it is a problem if several profiles may be given. Can both classes be preloaded without causing too much overhead?)
Additional preloads (like tikz
) can also be given via the LATEXMLPRELOADS variable.
MMT could look up for profiles under ext/LaTeXML/blib/lib/LaTeXML/resources/Profiles
if it finds a suitable one for a given group or repo (but it is a pain). Profiles are mere text files and it should be possible to pick them up from any (user) directory. (Adjusting a profile by editing ext/LaTeXML/lib/LaTeXML/resources/Profiles and re-installing LaTeXML to move the profiles to blib
is also a pain.)
How about having a property in META-INF/MANIFEST.MF that describes the default profile?
On Thu, Sep 10, 2015, 10:53 cmaeder notifications@github.com wrote:
Currently the used profile can be overwritten by setting environment variable LATEXMLPROFILE (which is maybe inconvenient).
Based on the git group, MMT could use a default profile containing the group name as is the case for stex-smglom-module. (This means stex-slides-module.opt should be renamed to stex-MiKoMH-module.opt.)
Currently, the only difference between those two are basically the .cls files to preload (smglom.cls versus mikoslides.cls). (I'm not sure if it is a problem if several profiles may be given. Can both classes be preloaded without causing too much overhead?)
Additional preloads (like tikz) can also be given via the LATEXMLPRELOADS variable.
MMT could look up for profiles under ext/LaTeXML/blib/lib/LaTeXML/resources/Profiles if it finds a suitable one for a given group or repo (but it is a pain). Profiles are mere text files and it should be possible to pick them up from any (user) directory. (Adjusting a profile by editing ext/LaTeXML/lib/LaTeXML/resources/Profiles and re-installing LaTeXML to move the profiles to blib is also a pain.)
— Reply to this email directly or view it on GitHub https://github.com/KWARC/localmh/issues/226#issuecomment-139173553.
Yes, I could do this, too. The question is if we need different profiles for individual repos or just groups.
@kohlhase It would be easy for me to take a profile from META-INF/MANIFEST.MF
(and use a default one if none is given).
It would make sense to give a default profile for a whole group (like stex-smglom-module
for the group smglom
and stex-slides-module
for MiKoMH
). One place for this would be a meta
repository within a group.
Furthermore, it looks as if the profile should match the \documentclass
given in the lib/pre.tex
file of a repo. It may be possible to also generate these (even language-specific) pre- and postamble files.
@kohlhase It would be easy for me to take a profile from META-INF/MANIFEST.MF (and use a default one if none is given).
yes, that would be helpful.
One place for this would be a meta repository within a group.
there is already a meta-inf
repository per group (or there should be one at least). We should use that.
It may be possible to also generate these (even language-specific) pre- and postamble files.
yes please.
Ok, I use the file meta-inf/MANIFEST.MF
(missing for BaseMH
and KwarcMH
).
What should be the property key? profile
documentclass
?
The names for profiles and .cls files should be unified (slides
versus mikoslides
).
I'm not sure how additional \documentclass
arguments would be passed.
I suggest to only generate pre[.<lang>].tex
and post.tex
files (one per repo) if there are none (as done for localpaths.tex
- per folder).
@jucovschi introduced new profiles in the KWARC branch of LaTeXML to optimize preloading, they can be found at `LaTeXML/lib/LaTeXML/resources/Profiles``
stex-slides-module.opt
for slides-like repositories (e.g.MiKoMH/GenCS
)stex-smglom-module.opt
for SMGloM repositories (e.g.smglom/sets
)stex-omdoc-modules.opt
(seems a duplicate, bad name should be removed) all of these differ in what (class) they preload, and thus make processing much much faster (see https://github.com/KWARC/sTeX/issues/91) We should also have astex-problems-module.opt
which preloads thehwexam.cls.ltxml
class.I will make the changes to the profiles (thus assigning this issue to Tom), but we should also use them in the LaTeXML invocation. For that we probably need a configuration switch (which should be initialized with
lmh init as well
) with valuesslides
,smglom
, andproblems
(more to come probably) which configures which type of repos this is and then choose the options accordingly.Alternatively we could have files in the
lib
directory of a repository which contain pieces of invocation script. E.g. the filelib/latexml-invocation.incl
could haveand that could be included into the LaTeXML invocation. This may be the more general mechanism, and we could just continue to use
stex-module.opt
and augment it as needed for the repos. Thelib/latexml-invocation.incl
file would mirror thelib/preamble.tex
file.Alternatively (or additionally), we could have a file
lib/latexml-profile.incl
that states which profile should be used.And finally, we could have a file
lib/local.opt
that is an extension to thestex-module.opt
, if @dginev please confirm LaTeXML accepts two--profile
options (and accepts absolute paths for profile files).@dginev, I would love to hear your opinion on this.