[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: wrong font shape for `@var` in `@example`
From: |
Werner LEMBERG |
Subject: |
Re: wrong font shape for `@var` in `@example` |
Date: |
Sun, 21 Aug 2022 11:24:56 +0000 (UTC) |
[CCing `bug-texinfo` – this was lost by accident, right?]
> Slanted typewriter may be better in this context but there are at
> least two other contexts where slanted roman is better for @var (on
> definition lines, and in @table @code which is used for
> definitions).
Definition lines are a separate beast, and I agree that new semantics
are ok – as long as new Texinfo command names are used IMHO.
For `@table @code` I'm not sure that this is always true.
> It's not possible to tell just from what is visually appealing in an
> isolated example. The context and purpose is important. Why is the
> fixed-width spacing important here?
Two meta-ness levels meet in things like
```
Add command line option @code{--jobs @var{n}}, where @var{n} ...
```
* Input to be entered by the user is usually shown with a typewriter
font – and IMHO, *everything* a user should type has to be shown in
typewriter.
* Variables in user input should be recognizable as such – and at the
same time still be recognizable as being user input. For me, the
solution is slanted typewriter, and Texinfo does the right thing
since a looong time.
In a similar vein, stuff within an `@example` environment *must* be
completely typeset in typewriter; the normal use case is to show
terminal output, or the contents of a configuration file, which is by
default identified with a fixed-width font. If, for whatever reasons,
some variables are shown, they must, again, be typeset in typewriter.
> Specifically, I felt that matching the font style between typewriter
> and non-typewriter environments was important, so that when
> documents referred to @var{flubb} in a paragraph it would look the
> same as @var{flubb} in the code, so that readers could easily look
> back and forth between the two.
This might be so if everywhere people would use `@samp` instead of
`@code`. However, this is not the reality.
I suggest a global customization variable `@varinputstyle` that
selects the font style if used within `@code`, `@example`, and friends
(with the default set to the old behaviour for backward compatibility,
at least for the next version). Alternatively, leave the behaviour of
`@var` as is and add a new command that has the new metaness
properties.
> Another option is to change your document to use @t{@slanted{...},
> which produces the slanted typewriter font.
Honestly, I don't like that – what I want *does* transport metaness!
Using `@t` would demote this to a 'fancy font change to make the
author happy', which is not true.
> Obviously, we don't want to be telling users to make lots of changes
> to documents...
Indeed.
> ...but maybe it is limited.
I don't think so.
> If fixed-width spacing is necessary for alignment, then we could use
> the alignment of the fixed-width font even if we used slanted roman.
> One effect of this would be that it would stop @var breaking across
> lines inside @example.
Thank you, but no :-)
Werner
- wrong font shape for `@var` in `@example`, Werner LEMBERG, 2022/08/21
- Re: wrong font shape for `@var` in `@example`, pertusus, 2022/08/21
- Message not available
- Re: wrong font shape for `@var` in `@example`,
Werner LEMBERG <=
- Re: wrong font shape for `@var` in `@example`, Patrice Dumas, 2022/08/21
- Re: wrong font shape for `@var` in `@example`, Werner LEMBERG, 2022/08/21
- Re: wrong font shape for `@var` in `@example`, pertusus, 2022/08/21
- Re: wrong font shape for `@var` in `@example`, Werner LEMBERG, 2022/08/21
- Re: wrong font shape for `@var` in `@example`, Gavin Smith, 2022/08/21
- Re: wrong font shape for `@var` in `@example`, Werner LEMBERG, 2022/08/21
- Re: wrong font shape for `@var` in `@example`, pertusus, 2022/08/21
- Re: wrong font shape for `@var` in `@example`, Gavin Smith, 2022/08/22