Giter VIP home page Giter VIP logo

Comments (6)

kohlhase avatar kohlhase commented on September 28, 2024

I like this idea, I guess then we would have

\begin{module}{foo}

in foo.en.tex and this will constitute a module foo (the environment name module can be changed).
Then we will have "other-language-files" e.g. foo.de.tex with something like

\begin{module}[siglang=en]{foo}

which loads foo.en.tex in sms mode and puts all the contents to the foo module.
What we lose here is the automated language handling we had in smglom.

from fomid.

kohlhase avatar kohlhase commented on September 28, 2024

Something like this looks like a very good corollary of the sms mode stuff we already have in sTeX now.

from fomid.

Jazzpirate avatar Jazzpirate commented on September 28, 2024

What we lose here is the automated language handling we had in smglom.

Can you elaborate on what you mean by "automated language handling"?

from fomid.

kohlhase avatar kohlhase commented on September 28, 2024

Can you elaborate on what you mean by "automated language handling"?

\begin{mhmodnl}{foo}{de}

did a \selectlanguage{german}

from fomid.

Jazzpirate avatar Jazzpirate commented on September 28, 2024

ah, yes. Conversely though, I've been thinking about whether the babel language should determine which language is used.
So if you wanted the english and the german version of some module (e.g. for a dictionary) you could do

\inputref{foo}
\selectlanguage{german}
\inputref{foo}
\selectlanguage{english}

from fomid.

Jazzpirate avatar Jazzpirate commented on September 28, 2024

Current implementation on sTeX2.0:

\begin{module}[lang=xx,sig=xy,name=Foo] 1. creates module Foo, 2. opens Foo.xy and merges it into Foo, 3. does \selectlanguage{long-version-of-xx} (e.g. lang=en does \selectlanguage{english}).

\importmodule{..?Foo} opens Foo if that exists, and Foo.short-version-of-xx if not; where xx is the current babel language if defined and en otherwise by default.

On the MMT side, \begin{module} creates a "language module" .../Foo?xx, and if sig is not declared, an additional signature module ...?Foo, and (in both cases) adds an include ?Foo -> /Foo?xx. All symdecls end up in ?Foo, all terms that occur in the text end up in /Foo?xx.

Nice advantage: The duality \importmodule/\usemodule is easily mirrored on the MMT side: An \importmodule ends up in the signature module, a \usemodule ends up in the language module - meaning: we can model both as includes while avoiding circular dependencies :)

from fomid.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.