From: Thomas Lamprecht <t.lamprecht@proxmox.com>
To: Proxmox VE development discussion <pve-devel@lists.proxmox.com>,
Noel Ullreich <n.ullreich@proxmox.com>
Subject: Re: [pve-devel] [PATCH pve-docs 1/3] Fixed inline code breaking in pdf docs
Date: Tue, 3 Jan 2023 16:36:16 +0100 [thread overview]
Message-ID: <61b40856-60ea-f9b2-ba99-700e7ce1b899@proxmox.com> (raw)
In-Reply-To: <20230103133121.114234-2-n.ullreich@proxmox.com>
Am 03/01/2023 um 14:31 schrieb Noel Ullreich:
> Had to overwrite the `texttt` command to allow breaks in long strings
> with no space. Now the line can be broken on specific chars as well.
>
any context/reference where you pulled this from or how
you came up with it?
> Signed-off-by: Noel Ullreich <n.ullreich@proxmox.com>
> ---
> asciidoc/dblatex-custom.sty | 13 +++++++++++++
> 1 file changed, 13 insertions(+)
>
> diff --git a/asciidoc/dblatex-custom.sty b/asciidoc/dblatex-custom.sty
> index 6b2578c..02fbe16 100644
> --- a/asciidoc/dblatex-custom.sty
> +++ b/asciidoc/dblatex-custom.sty
> @@ -66,3 +66,16 @@
> \drawtitlepage
> \pagebreak[4]
> }
> +
> +% to correctly break inline code the texttt command needs to be renewed
> +\DeclareRobustCommand{\texttt}[1]{
> + \begingroup%
> + \ttfamily%
> + % characters on which to break. `_` does not work
> + \begingroup\lccode`~=`/\lowercase{\endgroup\def~}{/\discretionary{}{}{}}%
> + \begingroup\lccode`~=`.\lowercase{\endgroup\def~}{.\discretionary{}{}{}}%
> + \begingroup\lccode`~=`-\lowercase{\endgroup\def~}{-\discretionary{}{}{}}%
> + \catcode`/=\active\catcode`.=\active\catcode`-=\active%
> + \scantokens{#1\noexpand}%
> + \endgroup%
> +}
next prev parent reply other threads:[~2023-01-03 15:36 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-01-03 13:31 [pve-devel] [PATCH pve-docs 0/3] Fixed formatting of " Noel Ullreich
2023-01-03 13:31 ` [pve-devel] [PATCH pve-docs 1/3] Fixed inline code breaking in " Noel Ullreich
2023-01-03 15:36 ` Thomas Lamprecht [this message]
2023-01-03 13:31 ` [pve-devel] [PATCH pve-docs 2/3] Fixed the table in 3.11.8 Noel Ullreich
2023-01-03 15:35 ` Thomas Lamprecht
2023-01-10 12:56 ` Noel Ullreich
2023-01-03 13:31 ` [pve-devel] [PATCH pve-docs 3/3] Fixed kerning in table of contents Noel Ullreich
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=61b40856-60ea-f9b2-ba99-700e7ce1b899@proxmox.com \
--to=t.lamprecht@proxmox.com \
--cc=n.ullreich@proxmox.com \
--cc=pve-devel@lists.proxmox.com \
/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