bug-texinfo
[Top][All Lists]
Advanced

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

Re: no-op brace command not starting a paragraph for mixing with raw out


From: Patrice Dumas
Subject: Re: no-op brace command not starting a paragraph for mixing with raw output
Date: Tue, 20 Dec 2022 00:02:30 +0100

On Mon, Dec 19, 2022 at 10:51:00PM +0000, Gavin Smith wrote:
> On Mon, Dec 19, 2022 at 10:30:04PM +0100, Patrice Dumas wrote:
> > Hello,
> > 
> > With @inline* commands, it is rather easy to mix raw output with Texinfo
> > within paragraphs.  With output format block commands such as @html, it
> > is also possible to mix blocks without starting paragraphs.  However,
> > there is no way to mix raw output with Texinfo outside of paragraph and
> > blocks.  There is a use case, as reported by Arnold Robbins, to put
> > some DocBook output from Texinfo with <title> </title>.  This cannot be
> > done because any Texinfo content starts a paragraph.
> 
> I did not think it was true that any Texinfo content started a paragraph.

Not any command, most line and block commands do not start a paragraph,
however most brace commands start a paragraph, except for
          'titlefont', 'caption', 'shortcaption',
          'image', '*', 'hyphenation', 'anchor', 'errormsg'

> There were problems with the @image command in the past.  From the manual:
> 
>      If an image is the first thing in a paragraph and followed by more
>   text, then you should precede the ‘@image’ command with ‘@indent’ or
>   ‘@noindent’ to indicate the beginning of paragraph formatting.  This is
>   especially important for TeX output to get correct paragraph
>   indentation.
> 
> If this still true, then it is possible to treat the raw block commands
> in a similar way to @image so that they do not start paragraphs?  So the
> following would not start a paragraph:

It is already the case that raw block commands do not start paragraphs.
But then it is not possible to mix them with Texinfo code.

Here is the example that cannot work, based on Arnold case:

@c =======================================================
@ifdocbook
@macro cartouchetitle {title}
@docbook
<title>
@end docbook
\title\
@docbook
</title>
@end docbook
@end macro
@end ifdocbook

@ifnotdocbook
@macro cartouchetitle {title}
@center @b{\title\}
@end macro
@end ifnotdocbook


@cartouche
@cartouchetitle Sidebar Title Here
Cartouche text
@end cartouche

@c =======================================================



For DocBook this expands to something like:

<sidebar><title>
<para>Sidebar Title Here
</title>
Cartouche text</para>
</sidebar>

The 'Sidebar' string starts a paragraph.  That's what I would like to
avoid.  The issue is with mixing Texinfo and raw DocBook outside of a
paragraph.

-- 
Pat



reply via email to

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