LATEX-L Archives

Mailing list for the LaTeX3 project


Options: Use Forum View

Use Monospaced Font
Show Text Part by Default
Condense Mail Headers

Message: [<< First] [< Prev] [Next >] [Last >>]
Topic: [<< First] [< Prev] [Next >] [Last >>]
Author: [<< First] [< Prev] [Next >] [Last >>]

Print Reply
Mailing list for the LaTeX3 project <[log in to unmask]>
Javier Bezos <[log in to unmask]>
Sun, 27 May 2001 11:20:04 +0100
Mailing list for the LaTeX3 project <[log in to unmask]>
text/plain (46 lines)
Marcel writes:

> - Regarding Javier's above example: I think this is the correct and
>   expected behavior.  I want to be able to able to write:
>   \begin{chinese}
>     \newcommand{\foo}{***something chinese***}
>     \newcommand{\bar}{***and some more chinese***}
>   \end{chinese}
>   The chinese characters \foo\ and \bar\ are not easy to enter on a
>   western keyboard.  If you need to frequently use \foo\ in your
>   scholarly discussion of Chinese literature, it is better to first
>   define macros for all the chinese characters you need, and then just
>   write \verb|\foo| whenever you need \foo.

While desirable, this behaviour won't be necessarily corrrect. The issues
- how to record the context which \foo\ and \bar\ were defined in?
- is the context actually relevant (from both TeX and users points of view)?

If I say

    \newcommand{\foo}{<Unicode char corresponding to Chinese ai>}

how TeX knows that \foo\ was defined in a Mandarin context (including
perhaps input encoding information)? And what is expected by the user,
that the Chinese char should be considered "conceptual" (thus rendered
differently in Japanese and Mandarin) or that the Chinese char must be
rendered with the simplified ideogram (ie, Mandarin vs. Japanese)?
What makes that different from, say,
  \newcommand{\foo}{\unichar{<Unicode code>}}
(without specifying the language)?

A possible solution [at least, the solution I took in my proposal] is to
add a set of macros (\ensurelanguage and \ensuredcommand) which records
the apropiate information. The problem, of course, is that if they are
used in a wrong way, the definition will become a mess, so a better
approach seems advisable.