emacs-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Faces for strong, emph and friends in Info?


From: Eli Zaretskii
Subject: Re: Faces for strong, emph and friends in Info?
Date: Wed, 10 Apr 2024 19:51:27 +0300

> From: Robert Pluim <rpluim@gmail.com>
> Cc: raman@google.com,  emacs-devel@gnu.org
> Date: Wed, 10 Apr 2024 18:11:25 +0200
> 
> >>>>> On Tue, 09 Apr 2024 12:56:43 +0300, Eli Zaretskii <eliz@gnu.org> said:
> 
>     Eli> Here's the first hit I found:
> 
>     Eli>   ‘woman-use-topic-at-point’
>     Eli>        A boolean value that defaults to ‘nil’.  If non-‘nil’ then the
>     Eli>        ‘woman’ command uses the word at point as the topic, _without
>     Eli>        interactive confirmation_, if it exists as a topic.
> 
>     Eli> We never wrap @emph and @strong in @w, so it's small wonder this
>     Eli> happens quite a lot.
> 
> In the original texi "without interactive confirmation" is all on the
> same line, so this one is understandable.

This can happen in Texinfo anywhere, and there's nothing we can do to
avoid this, in general.

> And thereʼs indentation in the resulting info file, which means when
> we use '_' to simulate italics, the indentation does not look good. So
> hereʼs what needs deciding:

Forgive me, but I think you are trying to solve too many loosely
related problems at once, so you take a simple problem and conclude
that it's almost unsolvable.  Let me try to simplify things:

> - what do we fontify? There are instances of eg @strong{Warning:}
> where I could argue that the ':' should be outside the @strong{}. So
> we either match ?: (and ?.) as well, or move those chars outside the
> {}

We match whatever the Texinfo source produced.  In the above case, the
colon will be included, and if the author doesn't like the results,
they need to say @strong{Warning}: instead.  (But since this produces
bold in the printed version, I guess including the colon is actually
perfectly okay.)

> - do we match across newlines?

Yes, we do.

> - if we match across newlines, do we go around wraping @w around all
> the multiword @emph and @strong? (could we persuade the texinfo
> project to do this for us or emit a warning?)

Not a problem for this feature to solve.  If people dislike what it
will produce, they will either turn off this feature (which must be
optional, btw) or go back and wrap in @w what they want.  We do that
already with the likes of @code and @kbd, where it matters, so how are
these markups different?

> - how configurable does this need to be? Iʼd say a single toggle is
> enough, but Drew might disagree. I guess adding a defcustom for the
> matching regexp is easy enough as well.

A single toggle is enough.



reply via email to

[Prev in Thread] Current Thread [Next in Thread]