• Re: Forced space

    From Pieter van Oostrum@21:1/5 to dieterhansbritz@gmail.com on Tue Jul 2 14:02:46 2024
    db <dieterhansbritz@gmail.com> writes:

    In a text I'm writing, I have this line

    is \begin{otherlanguage}{russian}река \end{otherlanguage}\;(rieka),

    If I don't put the \; in and put a space in instead, there is
    no space after compiling. As it is with \;, there is a space,
    but now "(rieka)" is highlighted yellow. How come? What is the
    best way to force a space where I have that \; ?
    --
    db

    When I put your line in a minimal LaTeX document with \; replaced by a space, there is a space between 'река' and '(rieka)'. I think this is the space that is after 'река' in the source.

    And what do you mean by highlighted yellow?
    --
    Pieter van Oostrum <pieter@vanoostrum.org>
    www: http://pieter.vanoostrum.org/
    PGP key: [8DAE142BE17999C4]

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From Ulrich D i e z@21:1/5 to All on Tue Jul 2 14:22:14 2024
    db wrote:

    In a text I'm writing, I have this line

    is \begin{otherlanguage}{russian}река \end{otherlanguage}\;(rieka),

    If I don't put the \; in and put a space in instead, there is
    no space after compiling. As it is with \;, there is a space,
    but now "(rieka)" is highlighted yellow. How come? What is the
    best way to force a space where I have that \; ?

    You do not provide sufficient information for reproducing and tracking
    down the problem. Therefore the only option is resorting to guesswork:

    Probably \end{otherlanguage} does \ignorespacesafterend.

    What happens when you do:

    \newcommand\myspacemacro{ }
    ... \begin{otherlanguage}{russian}река\end{otherlanguage}\myspacemacro(rieka),

    ?

    Or:

    \newcommand\foo[1]{#1}
    ...
    \begin{otherlanguage}{russian}река\end{otherlanguage}\foo{ }(rieka),

    ?

    Your remark about yellow highlighting does not provide useful
    information at all as it is not clear what exactly you look at and what programs you use and what packages/tools you might use for achieving
    whatsoever highlighting.

    Ulrich

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From Dr Engelbert Buxbaum@21:1/5 to All on Wed Jul 3 10:21:39 2024
    In article <v5ul3k$15am2$1@dont-email.me>, dieterhansbritz@gmail.com
    says...

    In a text I'm writing, I have this line

    is \begin{otherlanguage}{russian}???? \end{otherlanguage}\;(rieka),

    If I don't put the \; in and put a space in instead, there is
    no space after compiling. As it is with \;, there is a space,
    but now "(rieka)" is highlighted yellow. How come? What is the
    best way to force a space where I have that \; ?

    Have you tried using "\ "? That is the usual command to enter a space
    after a TeX-command so it does not get eaten. Since you don't give a
    minimal compilable example, it is difficult to give more specific
    advice.

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From Ulrich D i e z@21:1/5 to Dr Engelbert Buxbaum on Wed Jul 3 17:41:07 2024
    Dr Engelbert Buxbaum schrieb:

    Have you tried using "\ "? That is the usual command to enter a space
    after a TeX-command so it does not get eaten. Since you don't give a
    minimal compilable example, it is difficult to give more specific
    advice.

    You use <control space> to insert that amount of discardable glue that
    you get by a <space token> when the space factor is 1000.
    Usually this is what you want in situations where preventing the eating
    of spaces is neded.

    Whether <control space> or <space token> after the
    otherlanguage-environment is better for inserting discardable glue might
    depend on behavior desired in the case of the phrase within the otherlanguage-environment ending with punctuation.

    Sincerely

    Ulrich

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)