help-texinfo
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Cross-reference for a non-English book


From: Eli Zaretskii
Subject: Re: Cross-reference for a non-English book
Date: Sun, 31 Dec 2023 15:08:22 +0200

> From: Gavin Smith <gavinsmith0123@gmail.com>
> Date: Sun, 31 Dec 2023 12:32:21 +0000
> Cc: dan.list@brilhante.top, pertusus@free.fr, help-texinfo@gnu.org
> 
> On Sun, Dec 31, 2023 at 08:52:20AM +0200, Eli Zaretskii wrote:
> > Btw, what exactly does makeinfo produce for cross-references when
> > @documentlanguage is not en_US?  Is the "*note" thing still produced,
> > or is it replaced by something else?  I'm guessing that "*note" is
> > still produced, since the Info readers need that to recognize a
> > cross-reference.  And if that is so, then "*note" is still in English,
> > isn't it, and thus not very different from "see"?
> 
> It is still *note (for @ref and @pxref), or *Note (for @xref).

So not hiding these *note things will still show English words.

> > And another question: if Emacs is expected to adapt itself to the
> > document's language, and for Portuguese produce something like "veja"
> > instead, then how can Emacs know what that language is?  The
> > @documentlanguage directive leaves no trace in the Info output,
> > AFAICT, so what should Emacs do to DTRT here?
> 
> You have hit the nail on the head.  makeinfo should be modified to
> record the language of the document.  It would be sensible to place it
> in the "Local Variables" section at the end of the file.  Currently,
> it looks like
> 
> 
> Local Variables:
> coding: utf-8
> End:
> 
> Such a section may be recognized by Emacs, too (see Info node
> "(emacs)File Variables").
> 
> My question is whether the new variable should be "language",
> "documentlanguage" or something else.  If Emacs already uses a similar
> variable then we could use the same one.
> 
> I had a look at the "Language Environments" node in the "emacs" manual
> but I doubt that this is what is needed as that is more to do with
> character encoding and input methods.
> 
> Or perhaps the new variable should have an "Info-" prefix, as in
> "Info-language"?

We have current-iso639-language, but its value is a 2-letter string,
the first 2 characters of the locale's name.  So I think this should
be a new variable, and Info-documentlanguage sounds like a good
candidate.

> There is the minor question of what to do if a document has more than
> one @documentlanguage directive, but if that is the case, we can take
> the first one that occurs, or the last, or none at all, whichever is
> easiest.

If this becomes an issue in Info manuals, we could extend the
Info-documentlanguage variable to have values that are not just a
single string, but, say, a list of elements of the form

  (LANG START END)

where START and END are character positions for the region whose
language is LANG.  But I'd wait with such complications until they
become a real problem.



reply via email to

[Prev in Thread] Current Thread [Next in Thread]