Closed cspiel closed 4 years ago
Hi, I am a bit concerned about default behaviour. At the moment if no language is specified, the PR emits a lang="en"
attribute to the <html .. >
element. Wouln't the previous behaviour of not emitting any lang
attribute be more logical ?
I'd also like to have a look at the main=...
question, as I do not understand exactly why babel.hva cannot parse the main=italian optional package argument.
I'd also like to have a look at the
main=...
question, as I do not understand exactly why babel.hva cannot parse the main=italian optional package argument.
My commit to your PR attempts precisely to do this. I had to modify package.hva
a bit. Would you please have a look on it ?
Code looks good and passed all my tests. Now
main=
works as expected.
I am glad it does. What about my other comment on not having a lang attribute when no language is specified?
I know you are afraid of breaking backward compatibility with
the introduction of lang="en"
as default.
lang="en"
. The document's language
should be a document property and not a (configurable?!) browser
property.So, I'm inclined to have a default lang
-attribute, though I'm not sure which
to prefer: en
or en-US
.
Hi,
Ok I see. Although I'd rather had have language unspecified for pages in English, that pages in French with lang="en" specification, I'll follow your suggestion and merge the PR.
Thanks a lot for your contribution.
This P/R addresses issue #25. Its primary target is to provide transparent setting of the
lang
attribute for the whole HTML document based on the LaTeX\selectlanguage
(in the preamble)It has turned out that the central function, a map from babel language names (e.g.
swissgerman
) to language codes (e.g.de-CH
) is also suitable to implement some of the missing babel environments and macros e.g.\foreignlanguage{LANG}{TEXT}
. Their implementation is trivial. The documentation has been extended and updated accordingly.Known Problem: Babel allows for a quirky way to set the document's main language
which makes
italian
the main language. This P/R partially implements parsing themain
modifier, but ''babel.hva'' ignores it (due to standard parsing of the package's options) and thus the document's main language is wrongly detected whenmain=
is used.