[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Deprecate Texinfo commands
From: |
Gavin Smith |
Subject: |
Re: Deprecate Texinfo commands |
Date: |
Sun, 8 Nov 2020 08:59:03 +0000 |
User-agent: |
Mutt/1.9.4 (2018-02-28) |
On Sun, Nov 08, 2020 at 06:07:20AM +0100, Werner LEMBERG wrote:
>
> > @smallexample and friends. Simpler to use @example instead. If
> > people desperately want to use smaller fonts in the printed output
> > they could use
> >
> > @set dispenvsize small
> >
> > instead, which is only used by texinfo.tex and doesn't affect
> > anything else.
>
> So what is the right way to make an environment display at a smaller
> size in HTML output? Sometimes examples have really long lines,
> making horizontal screen scrolling uncomfortable...
I don't have an answer to this. It would be possibly to make all
environments of a certain type display at a smaller size using CSS.
I'm not sure how you would make one particular use of an environment
display smaller. It seems to me that the problem of too long lines
is dealt with by making the lines shorter, rather than making the
font smaller. Is there no way to split lines in your examples?
One idea is to change Texinfo to allow @example to have an argument
which would be output as a 'class' in HTML. This could be used to
specify the language of an example for syntax highlighting as well.
Some users of Texinfo manage to use syntax highlighting anyway but
this would make it easier. Something like
@example C small
int
foo (int bar)
{
return bar * bar * bar * bar * bar * bar * bar * bar * bar * bar * bar * bar
* bar * bar * bar;
}
@end example
to be output as
<div class='example'>
<pre class='example C small'>
int
foo (int bar)
{
return bar * bar * bar * bar * bar * bar * bar * bar * bar * bar * bar * bar
* bar * bar * bar;
}
</pre>
</div>
Another idea (more general) would be to have ways to mark certain
regions of the file. There could be @div and @span commands, like
@div small-example
@example
int
foo (int bar)
{
return bar * bar * bar * bar * bar * bar * bar * bar * bar * bar * bar * bar
* bar * bar * bar;
}
@end example
@end div
or
blah blah blah @span{underline green, something something} blah blah
This could be used for anything as an extensibility mechanism,
although not to be encouraged unless you really need it.
- Deprecate Texinfo commands, Gavin Smith, 2020/11/07
- Re: Deprecate Texinfo commands, Werner LEMBERG, 2020/11/08
- Re: Deprecate Texinfo commands,
Gavin Smith <=
- Re: Deprecate Texinfo commands, Werner LEMBERG, 2020/11/08
- Re: Deprecate Texinfo commands, Gavin Smith, 2020/11/10
- Re: Deprecate Texinfo commands, Patrice Dumas, 2020/11/11
- Re: Deprecate Texinfo commands, Gavin Smith, 2020/11/11
- Re: Deprecate Texinfo commands, Patrice Dumas, 2020/11/11
- Re: Deprecate Texinfo commands, Gavin Smith, 2020/11/12
- Re: Deprecate Texinfo commands, Patrice Dumas, 2020/11/12
- Re: Deprecate Texinfo commands, Werner LEMBERG, 2020/11/12
- Re: Deprecate Texinfo commands, Gavin Smith, 2020/11/16
- Re: Deprecate Texinfo commands, Patrice Dumas, 2020/11/16