9front - general discussion about 9front
 help / color / mirror / Atom feed
From: Anthony Martin <ality@pbrane.org>
To: 9front@9front.org
Subject: [9front] Re: Any way to insert code verbatim bypassing the rest of parsing in troff?
Date: Sun, 2 Jun 2024 15:53:01 -0700	[thread overview]
Message-ID: <Zlz3zWycnjYSnxVB@alice> (raw)
In-Reply-To: <20240602214727.5acc13aa@ygrex-t550.ygrex.ru>

ygrex <ygrex@ygrex.ru> once said:
> As far as I figured it out, .DS/.DE block gives the best results but
> can I bypass its backslash interpolation somehow?

No. DS switches to a separate environment so you'd have to modify
tmac.s to do this.

> Second attempt to leverage .eo/.ec to keep backslashes, it does but
> breaks code lines, I need to insert extra empty lines in between to
> keep the lines. It looks worse than with .DS/.DE after all.

You can turn off filling and disable the escape mechanism with:

.nf
.eo
some text with backslashes like \ and \foo.

and empty lines like above.
just don't start a line with a control character:
	.this is good
\.as is this
.but not this
'or this.
see?
.ec
.fi

Cheers,
  Anthony

  parent reply	other threads:[~2024-06-02 22:54 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-06-02 18:47 [9front] " ygrex
2024-06-02 18:54 ` sl
2024-06-02 22:53 ` Anthony Martin [this message]
2024-06-03  6:21   ` [9front] " ygrex

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=Zlz3zWycnjYSnxVB@alice \
    --to=ality@pbrane.org \
    --cc=9front@9front.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).