ntg-context - mailing list for ConTeXt users
 help / color / mirror / Atom feed
From: Wolfgang Schuster via ntg-context <ntg-context@ntg.nl>
To: Gerben Wierda via ntg-context <ntg-context@ntg.nl>
Cc: Wolfgang Schuster <wolfgang.schuster.lists@gmail.com>
Subject: Re: [NTG-context] \getbuffer without extra whitespace?
Date: Mon, 29 May 2023 16:25:24 +0200	[thread overview]
Message-ID: <9c136310-431c-676f-1bab-5e193135924c@gmail.com> (raw)
In-Reply-To: <2CCC87FD-BFFD-4415-9C2D-67D4E82CB78C@rna.nl>


[-- Attachment #1.1: Type: text/plain, Size: 695 bytes --]

Gerben Wierda via ntg-context schrieb am 29.05.2023 um 16:19:
> If I do something like:
>
> \startbuffer[version]20230529a\stopbuffer
> Version: \getbuffer[version]-en
>
> I get whitespace between the content of the buffer and “-en”
>
> What is the proper LMTX way to do this?

You need the \inlinebuffer command

\starttext

\startbuffer[version]
20230529a
\stopbuffer

Version: \inlinebuffer[version]-en

\stoptext

but buffers aren't the right tool to store strings like version information.

One alternative solution is to set the string with the \setupdocument 
command.

\setupdocument
   [version=20230529a]

\starttext

Version: \documentvariable{version}-en

\stoptext

Wolfgang


[-- Attachment #1.2: Type: text/html, Size: 1545 bytes --]

[-- Attachment #2: Type: text/plain, Size: 496 bytes --]

___________________________________________________________________________________
If your question is of interest to others as well, please add an entry to the Wiki!

maillist : ntg-context@ntg.nl / https://www.ntg.nl/mailman/listinfo/ntg-context
webpage  : https://www.pragma-ade.nl / http://context.aanhet.net
archive  : https://bitbucket.org/phg/context-mirror/commits/
wiki     : https://contextgarden.net
___________________________________________________________________________________

      reply	other threads:[~2023-05-29 14:25 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-05-29 14:19 Gerben Wierda via ntg-context
2023-05-29 14:25 ` Wolfgang Schuster via ntg-context [this message]

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=9c136310-431c-676f-1bab-5e193135924c@gmail.com \
    --to=ntg-context@ntg.nl \
    --cc=wolfgang.schuster.lists@gmail.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;
as well as URLs for NNTP newsgroup(s).