* Different Styles of Typing
@ 2021-07-28 12:14 Jeroen via ntg-context
2021-07-28 13:31 ` Hans Hagen via ntg-context
2021-07-28 14:18 ` Henning Hraban Ramm via ntg-context
0 siblings, 2 replies; 4+ messages in thread
From: Jeroen via ntg-context @ 2021-07-28 12:14 UTC (permalink / raw)
To: mailing list for ConTeXt users; +Cc: Jeroen
[-- Attachment #1.1: Type: text/plain, Size: 274 bytes --]
Is there a way to have two different types of typing. I tried the
following, but it does not seem to work.
\setuptyping[abc][style=\ttx]
\setuptyping[def][style=\ttxx]
\starttext
\starttyping[abc]
text
text
\stoptyping
\starttyping[def]
text
text
\stoptyping
\stoptext
[-- Attachment #1.2: Type: text/html, Size: 351 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] 4+ messages in thread
* Re: Different Styles of Typing
2021-07-28 12:14 Different Styles of Typing Jeroen via ntg-context
@ 2021-07-28 13:31 ` Hans Hagen via ntg-context
[not found] ` <ef85a781-b7e2-1af0-6630-de48b6387676@gmail.com>
2021-07-28 14:18 ` Henning Hraban Ramm via ntg-context
1 sibling, 1 reply; 4+ messages in thread
From: Hans Hagen via ntg-context @ 2021-07-28 13:31 UTC (permalink / raw)
To: Jeroen via ntg-context, Wolfgang Schuster; +Cc: Hans Hagen
On 7/28/2021 2:14 PM, Jeroen via ntg-context wrote:
> Is there a way to have two different types of typing. I tried the
> following, but it does not seem to work.
>
> \setuptyping[abc][style=\ttx]
> \setuptyping[def][style=\ttxx]
>
> \starttext
>
> \starttyping[abc]
> text
> text
> \stoptyping
>
> \starttyping[def]
> text
> text
> \stoptyping
>
> \stoptext
in lmtx we can do this
\definetyping[abc] \setuptyping[abc][style=\ttx]
\definetyping[def] \setuptyping[def][style=\ttxx]
\unprotect
\tolerant\def\buff_verbatim_typing_start_yes[#1]#*[#2]%
{\let\m_typing\currenttyping
\ifhastok={#1}%
\setupcurrenttyping[#1]%
\orelse\ifcstok{#1}\v!continue
\lettypingparameter\c!continue\v!yes
\orelse\iftok{#1}\emptytoks
% assume typing
\orelse\ifcstok{#1}\v!typing
% no overload
\else
\edef\currenttyping{#1}%
\fi
\ifparameter#2\or
\setupcurrenttyping[#2]%
\fi
\typingparameter\c!before\relax
\startpacked[\v!blank]%
\buff_verbatim_setup_line_numbering
\buff_verbatim_initialize_typing_one
\buff_verbatim_setup_keep_together
\normalexpanded{\buff_verbatim_type_block{\e!start\m_typing}{\e!stop\m_typing}}}
\protect
\starttext
\starttyping[abc][color=red]
[text]
text
\stoptyping
\starttyping[def][style=\sl]
text
text
\stoptyping
\startdef
text
text
\stopdef
\stoptext
but first i want wolfgangs opinion on this (possible side effects and such)
Hans
-----------------------------------------------------------------
Hans Hagen | PRAGMA ADE
Ridderstraat 27 | 8061 GH Hasselt | The Netherlands
tel: 038 477 53 69 | www.pragma-ade.nl | www.pragma-pod.nl
-----------------------------------------------------------------
___________________________________________________________________________________
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] 4+ messages in thread
* Re: Different Styles of Typing
2021-07-28 12:14 Different Styles of Typing Jeroen via ntg-context
2021-07-28 13:31 ` Hans Hagen via ntg-context
@ 2021-07-28 14:18 ` Henning Hraban Ramm via ntg-context
1 sibling, 0 replies; 4+ messages in thread
From: Henning Hraban Ramm via ntg-context @ 2021-07-28 14:18 UTC (permalink / raw)
To: mailing list for ConTeXt users; +Cc: Henning Hraban Ramm
> Am 28.07.2021 um 14:14 schrieb Jeroen via ntg-context <ntg-context@ntg.nl>:
>
> Is there a way to have two different types of typing. I tried the following, but it does not seem to work.
>
> \setuptyping[abc][style=\ttx]
> \setuptyping[def][style=\ttxx]
>
> \starttext
>
> \starttyping[abc]
> text
> text
> \stoptyping
You can try
\starttyping[style=\ttx]
Hraban
___________________________________________________________________________________
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] 4+ messages in thread
end of thread, other threads:[~2021-07-29 7:45 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-07-28 12:14 Different Styles of Typing Jeroen via ntg-context
2021-07-28 13:31 ` Hans Hagen via ntg-context
[not found] ` <ef85a781-b7e2-1af0-6630-de48b6387676@gmail.com>
2021-07-29 7:45 ` Hans Hagen via ntg-context
2021-07-28 14:18 ` Henning Hraban Ramm via ntg-context
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).