ntg-context - mailing list for ConTeXt users
 help / color / mirror / Atom feed
* \type{...} as macro argument
@ 2020-11-08 13:47 Sylvain Hubert
  2020-11-08 14:03 ` Wolfgang Schuster
  0 siblings, 1 reply; 5+ messages in thread
From: Sylvain Hubert @ 2020-11-08 13:47 UTC (permalink / raw)
  To: mailing list for ConTeXt users


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

Dear List,

I would like to ask how to define a command, \same, such that

    \same{\type{a   b c}}

produces the same result as its argument does

    \type{a   b c}

The naive way doesn't work because it makes all the spaces collapse:

    \define[1]\same{#1}

I would also like to ask whether this could be achieved using the lua
interface:

    \startluacode
    interfaces.definecommand {
       name="same",
       -- catcode/mode/arguments = ???
    }

Thanks in advance.

Best,
Sylvain

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

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

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

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

^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2020-11-08 18:35 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-11-08 13:47 \type{...} as macro argument Sylvain Hubert
2020-11-08 14:03 ` Wolfgang Schuster
2020-11-08 16:56   ` Sylvain Hubert
2020-11-08 17:27     ` Wolfgang Schuster
2020-11-08 18:35       ` Sylvain Hubert

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).