On 2016-04-20, GNU Support wrote:
> I understand what you mean.

> However, space is something I can see.

> Why is there the same behavior after tex command which is anyway
> surrounded by visible red box, if I hit space or if I don't hit
> space. It should not be the same.

The LaTeX command may change the following "normal" text but LyX does not
know this, hence it cannot reflect this in the GUI.

Another example, some text enclosed in two ERT boxes:

  [\emph{] some text [}] 

The output will emphasise "some text", but in LyX this is not visible.

If you use ERT (raw LaTeX), you must know LaTeX

> If space after tex command is not accepted by LyX then the space shall
> not be allowed to be hit at that place. User shall explicitly choose
> some other space like Control-Space or similar.

This is impossible to program for all use cases. Only the user knows,
whether his/her LaTeX construct will gobble following spaces.

> Maybe that feature or un-feature shall be explained in the
> documentation. Until now I forget it often and I type texcommand rather
> for the purpose of variable expansions, and later to find out there was
> no space after it. Looks bad.

> In general, I am searching for a way to replace variables in the
> document. Maybe I don't know to use LyX in that manner.

> Is there any other manner to replace variables, like company names,
> names or addresses in a LyX document? If yes, I am interested to know
> how.

> Otherwise, I have to give LyX to multiple people to work for me and to
> explain to them to take care of the space after variable replacement. It
> makes no sense to teach someone the undocumented un-feature.

There may be an alternative using a local layout or module (either in
your personal LyX directory (e.g. ~/.lyx/layouts/) or embedded in the
document (Document>Settings>Local Layout).

Creating local layouts is cumbersome but well explained in the Customization
manual.

Günter

Reply via email to