Re: [NTG-context] Escaping reserved/problematic characters

2021-03-11 Thread Wolfgang Schuster
t; \letterhash     '$': "\\$" \letterdollar     '&': "\\&" No escape needed.     '`': "\\textasciigrave{}" \textgrave     '^': "\\textasciicircum{}" \letterhat     '~': "\\textasciitilde{}" \lettertilde    

Re: [NTG-context] ASCII mode within \footnote

2019-11-08 Thread context
, if you have many such files is to define a macro: \define[1]\APPDATA{\mono{\letterpercent APPDATA\letterpercent\letterbackslash#1}} And then use: \footnote{\APPDATA{file.txt}} or ... \footnote{\type[compact=absolute]{%APPDATA%\file.txt

Re: [NTG-context] ASCII mode within \footnote

2019-11-08 Thread Hans Hagen
with the \typeinlinebuffer command. \starttext \startbuffer %APPDATA%\file.txt \stopbuffer \footnote{\typeinlinebuffer} \stoptext Another option, if you have many such files is to define a macro: \define[1]\APPDATA{\mono{\letterpercent APPDATA\letterpercent\letterbackslash#1}} And then use: \footnote

Re: [NTG-context] ASCII mode within \footnote

2019-11-07 Thread Aditya Mahajan
%APPDATA%\file.txt \stopbuffer \footnote{\typeinlinebuffer} \stoptext Another option, if you have many such files is to define a macro: \define[1]\APPDATA{\mono{\letterpercent APPDATA\letterpercent\letterbackslash#1}} And then use: \footnote{\APPDATA{file.txt}} Aditya

Re: [NTG-context] issue with character and \xmlprettyprinttext

2018-02-20 Thread Hans Hagen
I missing something? are you sure that the font you use has the character Many thanks for your reply, Hans. The chars are there: \setuptype[option=tex] \starttext \startTEXpage[offset=1em] \type{\ ␣ \ á \ ñ} % \type{\␣ \á \ñ} {\ttbf \letterbackslash ␣ \letterb

Re: [NTG-context] issue with character and \xmlprettyprinttext

2018-02-20 Thread Pablo Rodriguez
g or am I missing something? > are you sure that the font you use has the character Many thanks for your reply, Hans. The chars are there: \setuptype[option=tex] \starttext \startTEXpage[offset=1em] \type{\ ␣ \ á \ ñ} % \type{\␣ \á \ñ} {\ttbf \letterbackslash ␣ \l

Re: [NTG-context] (My) problem with percent sign in URLs -- about Wiki

2017-08-15 Thread Alan Braslau
Are there some other predefined "\letterxxx" commands? > \letteropenbrace > \letterclosebrace > \letterampersand > \letterless > \lettermore > \letterhash > \letterdoublequote > \lettersinglequote > \letterdollar > \letterpercent > \letterhat > \

Re: [NTG-context] (My) problem with percent sign in URLs -- about Wiki

2017-08-15 Thread Wolfgang Schuster
lequote \lettersinglequote \letterdollar \letterpercent \letterhat \letterunderscore \letterbar \lettertilde \letterbackslash \letterslash \letterquestionmark \letterat \lettercolon \letterescape \letterbgroup \letteregroup \letterleftbrace \letterrightbrace \letterexclamationmark Is (and how) p

Re: [NTG-context] underscore hyphenation

2014-12-11 Thread Pablo Rodriguez
] \sethyphenationfeatures[strict] \unexpanded\def\TexC#1% {\dontleavehmode\begingroup \sethyphenationfeatures[whatever]% \normalexpanded{\TeXcode{\letterbackslash#1}}% \endgroup} \starttext \hsize\zeropoint newlargewordwithhyphen

Re: [NTG-context] two issues with new hyphenator

2014-12-10 Thread Pablo Rodriguez
[whatever]% % \prehyphencharFE000 \normalexpanded{\TeXcode{\letterbackslash#1}}% \endgroup} \starttext \input tufte \dorecurse{100}{\TexC{definebodyfont} } \input tufte \stoptext we can add some of them but first i need to think about what slots

[NTG-context] underscore hyphenation

2014-12-10 Thread Pablo Rodriguez
] \sethyphenationfeatures[strict] \unexpanded\def\TexC#1% {\dontleavehmode\begingroup \sethyphenationfeatures[whatever]% \normalexpanded{\TeXcode{\letterbackslash#1}}% \endgroup} \starttext \hsize\zeropoint newlargewordwithhyphen \TexC{definebodyfont

Re: [NTG-context] underscore hyphenation

2014-12-10 Thread Hans Hagen
\TexC#1% {\dontleavehmode\begingroup \sethyphenationfeatures[whatever]% \normalexpanded{\TeXcode{\letterbackslash#1}}% \endgroup} \starttext \hsize\zeropoint newlargewordwithhyphen \TexC{definebodyfont} newlargewordwithnohyphen

Re: [NTG-context] two issues with new hyphenator

2014-12-10 Thread Hans Hagen
\normalexpanded{\TeXcode{\letterbackslash#1}}% \endgroup} \starttext \input tufte \dorecurse{100}{\TexC{definebodyfont} } \input tufte \stoptext we can add some of them but first i need to think about what slots to use (shouldn't conflict with other private slots

Re: [NTG-context] two issues with new hyphenator

2014-12-08 Thread Pablo Rodriguez
it be implemented in the following sample? \setupcolor[state=start] \setuplayout[backspace=95mm, width=middle] \definetype[TeXcode][option=TEX, compact=absolute] \unexpanded\def\tex#1{\normalexpanded{\TeXcode{\letterbackslash#1}}} \starttext \tex{thisisaverylongcommand} \hyphenatedurl{http

Re: [NTG-context] two issues with new hyphenator

2014-12-08 Thread Hans Hagen
(not for the rest of the text). How could it be implemented in the following sample? \setupcolor[state=start] \setuplayout[backspace=95mm, width=middle] \definetype[TeXcode][option=TEX, compact=absolute] \unexpanded\def\tex#1{\normalexpanded{\TeXcode{\letterbackslash#1}}} \starttext \tex

Re: [NTG-context] two issues with new hyphenator

2014-12-06 Thread Pablo Rodriguez
[whatever]% \normalexpanded{\TeXcode{\letterbackslash#1}}% \endgroup} \starttext \input tufte \dorecurse{100}{\TexC{definebodyfont} } \input tufte \stoptext i'll upload a beta (making one now) -- http://www.ousia.tk

Re: [NTG-context] two issues with new hyphenator

2014-12-06 Thread Hans Hagen
] \unexpanded\def\TexC#1% {\dontleavehmode\begingroup \sethyphenationfeatures[whatever]% \normalexpanded{\TeXcode{\letterbackslash#1}}% \endgroup} \starttext \input tufte \dorecurse{100}{\TexC{definebodyfont} } \input tufte \stoptext i'll upload a beta

Re: [NTG-context] two issues with new hyphenator

2014-12-05 Thread Pablo Rodriguez
=hyphenated] \definehyphenationfeatures [whatever] [righthyphenchar=_] \setuphyphenation [method=traditional] \unexpanded\def\TexC#1% {\dontleavehmode\begingroup \sethyphenationfeatures[whatever]% \normalexpanded{\TeXcode{\letterbackslash#1}}% \endgroup

Re: [NTG-context] two issues with new hyphenator

2014-12-05 Thread Hans Hagen
\sethyphenationfeatures[whatever]% \normalexpanded{\TeXcode{\letterbackslash#1}}% \endgroup} \starttext \input tufte \dorecurse{100}{\TexC{definebodyfont} } \input tufte \stoptext i'll upload a beta (making one now

Re: [NTG-context] two issues with new hyphenator

2014-12-04 Thread Pablo Rodriguez
commands, not for the whole text. Here is a minimal sample: \showframe \setupcolor[state=start] \setuplayout[backspace=95mm, width=middle] \definetype[TeXcode][option=TEX, compact=absolute] \unexpanded\def\tex#1{\normalexpanded{\TeXcode{\letterbackslash#1}}} \starttext \tex{thisisaverylongcommand

Re: [NTG-context] two issues with new hyphenator

2014-12-04 Thread Hans Hagen
from the font and enable it only for certain commands, not for the whole text. Here is a minimal sample: \showframe \setupcolor[state=start] \setuplayout[backspace=95mm, width=middle] \definetype[TeXcode][option=TEX, compact=absolute] \unexpanded\def\tex#1{\normalexpanded{\TeXcode{\letterbackslash#1

Re: [NTG-context] hyphenating urls and \tex

2014-10-07 Thread Pablo Rodriguez
\localrightbox{\llap{\smash{\lower.1ex\hbox{_% \setbox\scratchbox\hbox{#1}% \prehyphenchar`-\relax \unhbox\scratchbox \endgroup} \unexpanded\def\mex#1{\normalexpanded{\TeXcode{\letterbackslash#1}}} \def\tex#1{\underscorehyphenation{\mex{#1}}} \define[1]\url{{\tt\goto

Re: [NTG-context] another issue with PDF bookmarks

2014-04-15 Thread Hans Hagen
needs an overhaul: From typo-del.mkiv: \appendtoks \def\quotation#1{#1}% \def\quote#1{'#1'}% \to \everysimplifycommands and from buff-ver.mkiv: \appendtoks \def\type#1{\letterbackslash\checkedstrippedcsname#1}% or maybe detokenize \def\tex #1{\letterbackslash#1

Re: [NTG-context] another issue with PDF bookmarks

2014-04-10 Thread Pablo Rodriguez
... simplifycommands needs an overhaul: From typo-del.mkiv: \appendtoks \def\quotation#1{#1}% \def\quote#1{'#1'}% \to \everysimplifycommands and from buff-ver.mkiv: \appendtoks \def\type#1{\letterbackslash\checkedstrippedcsname#1}% or maybe detokenize \def\tex #1

Re: [NTG-context] another issue with PDF bookmarks

2014-04-09 Thread Aditya Mahajan
: \appendtoks \def\quotation#1{#1}% \def\quote#1{'#1'}% \to \everysimplifycommands and from buff-ver.mkiv: \appendtoks \def\type#1{\letterbackslash\checkedstrippedcsname#1}% or maybe detokenize \def\tex #1{\letterbackslash#1}% \to \everysimplifycommands The simplification of \type

Re: [NTG-context] issue with \processaction

2014-03-18 Thread Wolfgang Schuster
on our machines ;) Is there no way to do it with \processaction? Only when you ensure the text you get from Lua has the normal cathode regime and when you special characters like \ in the result you have to convert them to \letterbackslash etc. which isn’t simpler than Hans solution

Re: [NTG-context] issue with \processaction

2014-03-18 Thread Pablo Rodriguez
you have to convert them to \letterbackslash etc. which isn’t simpler than Hans solution. The advantage of Hans solution is that you don’t have to care about expansion. The solution from Hans is great. The only issue there is that it is much harder to understand for me. Since this is a minimal

Re: [NTG-context] confusion about expansion

2014-03-12 Thread Wolfgang Schuster
[cropmark][preset=lefttop,x=3cm,y=-1.5\lineheight]{\Markname} But when I run this, I get a UCS error that seems to indicate that the *result* of \CurrentUser (waxhaw\huttar) is getting parsed as a command sequence. When you want to pass a backslash to Lua you have to use \letterbackslash

Re: [NTG-context] confusion about expansion

2014-03-12 Thread Lars Huttar
to Lua you have to use \letterbackslash. Thanks... can you give me an example of what that would look like? I don't think I want to pass a backslash to Lua, so I'm not sure how to apply what you're saying. Or are you using Lua here in the sense of LuaTeX? A backslash appears in the output

Re: [NTG-context] confusion about expansion

2014-03-12 Thread Wolfgang Schuster
) is getting parsed as a command sequence. When you want to pass a backslash to Lua you have to use \letterbackslash. Thanks... can you give me an example of what that would look like? I don't think I want to pass a backslash to Lua, so I'm not sure how to apply what you're saying. Or are you using

Re: [NTG-context] confusion about expansion

2014-03-12 Thread Lars Huttar
this, I get a UCS error that seems to indicate that the *result* of \CurrentUser (waxhaw\huttar) is getting parsed as a command sequence. When you want to pass a backslash to Lua you have to use \letterbackslash. Thanks... can you give me an example of what that would look like? I don't think I

[NTG-context] defining headcommand

2014-02-25 Thread Pablo Rodriguez
Dear list, I have the following sample: \definetype[TeXcode][option=TEX] \unexpanded\def\tex#1{\normalexpanded{\TeXcode{\letterbackslash#1}}} \definedescription[TeXcommand][width=fit,hang=fit,headcommand=\tex] \starttext Its logo can be invoked with \tex{ConTeXt}. But you can have different

Re: [NTG-context] (again) coloring \tex with [option=TeX]

2013-10-05 Thread Hans Hagen
}. \stoptext How can I have \tex with colored output, the same way \type is colored above? by redefining it: \unexpanded\def\tex#1{\normalexpanded{\type{\letterbackslash#1}}} - Hans Hagen

Re: [NTG-context] (again) coloring \tex with [option=TeX]

2013-10-05 Thread Pablo Rodríguez
On 10/05/2013 10:58 PM, Hans Hagen wrote: On 10/5/2013 8:21 PM, Pablo Rodríguez wrote: [...] How can I have \tex with colored output, the same way \type is colored above? by redefining it: \unexpanded\def\tex#1{\normalexpanded{\type{\letterbackslash#1}}} Many thanks for your help, Hans

Re: [NTG-context] Using backslash in chapter title.

2013-07-28 Thread Aditya Mahajan
creating a special font just for this character but nothing changes. the \backslash command seems invulnerable to change. Is there a way in MKIV to express a backslash in another way (bigger and bolder)? \backslash is a math mode command. For text backslash, use \textbackslash or \letterbackslash

Re: [NTG-context] Escaping a special character in a MetaPost figure within a ConTeXt document fails

2011-12-01 Thread Raymond LeClair
Thanks for the reply! Found I needed to use \letterbackslash\letterhash for this to work. Does that make sense? On Nov 30, 2011, at 10:37 AM, Aditya Mahajan wrote: Try: using \letterhash instead of \# or \startasciimode \def \FrontMatterTitle { \startreusableMPgraphic

[NTG-context] Setting style and color attributes of label in metapost

2011-09-24 Thread Aditya Mahajan
as an unexpandable macro. I can get around this by setting the value of \currenttest inside the \sometxt{...} argument. Something like: \def\dosometxt#1#2% {\normaldosometxt{#1}% {\def\noexpand\letterbackslash currenttest{\currenttest #2}}} Surely, there should be a more direct way of achieving

[NTG-context] Definition of lualetterbackslash

2011-08-22 Thread Aditya Mahajan
Hi Consider the following example: \startluacode print(lualetterbackslash:, [=[\\include]=]) \stopluacode \def\lualetterbackslash{\letterbackslash} \startluacode print(letterbackslash:, [=[\\include]=]) \stopluacode \bye gives lualetterbackslash: \\include letterbackslash

Re: [NTG-context] Definition of lualetterbackslash

2011-08-22 Thread Hans Hagen
On 22-8-2011 09:15, Aditya Mahajan wrote: Hi Consider the following example: \startluacode print(lualetterbackslash:, [=[\\include]=]) \stopluacode \def\lualetterbackslash{\letterbackslash} \startluacode print(letterbackslash:, [=[\\include]=]) \stopluacode \bye gives lualetterbackslash

Re: [NTG-context] Definition of lualetterbackslash

2011-08-22 Thread Aditya Mahajan
On Mon, 22 Aug 2011, Hans Hagen wrote: On 22-8-2011 09:15, Aditya Mahajan wrote: Hi Consider the following example: \startluacode print(lualetterbackslash:, [=[\\include]=]) \stopluacode \def\lualetterbackslash{\letterbackslash} \startluacode print(letterbackslash:, [=[\\include

Re: [NTG-context] Definition of lualetterbackslash

2011-08-22 Thread Hans Hagen
On 22-8-2011 10:49, Aditya Mahajan wrote: and then \/include. Other than using the magic single letter commands, I don't see an easy way of getting a \ in a lua string inside luacode :( - \noexpand\include fails unless I define \include - \letterbackslash include gives \ include

Re: [NTG-context] List of special characters

2011-08-15 Thread Wolfgang Schuster
\textbackslash\ or \letterbackslash \textbraceleft\ or \letterleftbrace\ or \{ \textbraceright\ or \letterrightbrace\ or \} \percent\ or \letterpercent\ or \% \textdollar\ or \letterdollar\ or \$ \letterampersand\ or \ \letterhash\ or \# \stoplines \asciimode % $ # %% this is a comment \stoptext

Re: [NTG-context] List of special characters

2011-08-15 Thread Cecil Westerhof
\startlines \textbackslash\ or \letterbackslash \textbraceleft\ or \letterleftbrace\ or \{ \textbraceright\ or \letterrightbrace\ or \} \percent\ or \letterpercent\ or \% \textdollar\ or \letterdollar\ or \$ \letterampersand\ or \ \letterhash\ or \# \stoplines \asciimode

Re: [NTG-context] Producing quotesingle glyph

2011-03-20 Thread Wolfgang Schuster
, \textdollar % : \letterpercent, \percent ^ : \letterhat _ : \letterunderscore, \textunderscore | : \letterbar, \textbar ~ : \lettertilde, \textasciitilde \ : \letterbackslash, \letterescape, \textbackslash / : \letterslash, \textslash ? : \letterquestionmark ! : \letterexclamationmark @ : \letterat

[NTG-context] Verbatim text: intext colors (mkiv)

2011-03-10 Thread Reviczky, Adam
with a comment}/ETEX /BTEX{\color[SCgrey] ``this is a string''}/ETEX .postln ; /BTEX{\color[SCgreen] \letterbackslash aSymbol}/ETEX ; /BTEX{\color[SCblue] ThisClassDoesNotExists}/ETEX ; \stopSC \stoptext \starttext \defineframedtext [framedcode] [strut=yes, offset=2mm, width=7cm

[NTG-context] Typescript Bodoni Old Fashion

2010-12-03 Thread Philipp Gesang
\ § \letterbackslash\ / \letterat\space \letterampersand\ \letterbar\ \letterunderscore\space ¶ * † ‡ ™ © € \$ \# ( ) [ ] \{ \} \par \egroup \hairline% \blank[line] } \def\lem{% \language[pl] Jeżeli możemy mówić o~tym, co zaszło, i o tym, co nie zaszło, jakim sposobem moglibyśmy

Re: [NTG-context] Ampersand in Metapost

2010-05-14 Thread Marco
- label(textext(\letterbackslash\letterampersand),origin); - label(textext(\letterbackslash\),origin); This is because the commands are interpreted with TeX before they are written to mpgraph.mp. The \letterampersand or \ generates the character alone: you need to preceed

Re: [NTG-context] Ampersand in Metapost

2010-05-14 Thread Hans Hagen
performed was the ampersand and it needs the same workaround using \letterbackslash as textext. I know, your MyWay is old. Maybe some things are fixed now. But I don't see many advantages for me using it. don't expect mkii and mkiv to be 100% compatible in this area (mkii is somewhat stretching things

Re: [NTG-context] Ampersand in Metapost

2010-05-13 Thread Mojca Miklavec
. If I change \ into \letterampersand I get exactly the same error as \ produces (BTW: \letterpercent also produces an error, but a different one). So: - label(textext(\letterbackslash\letterampersand),origin); - label(textext(\letterbackslash\),origin); This is because the commands

Re: [NTG-context] Ampersand in Metapost

2010-05-13 Thread Aditya Mahajan
suppose you mean \letterampersand. If I change \ into \letterampersand I get exactly the same error as \ produces (BTW: \letterpercent also produces an error, but a different one). So: - label(textext(\letterbackslash\letterampersand),origin); - label(textext(\letterbackslash\),origin

[NTG-context] LuaTeX error main ctx instance:1: 'name' expected near '\'.

2010-02-18 Thread Peter Münster
]{{\letterdoublequote}0x}\s[Special]{{\letterpercent}lx}\s[Special]{{\letterbackslash}n}\s[Constant]{{\letterdoublequote}}\s[]{, ul);} I get this error, when compiling my product. When components are compiled one by one, there is no such error. I use pre-stepwise. Without this module, there is no such error

Re: [NTG-context] LuaTeX error main ctx instance:1: 'name' expected near '\'.

2010-02-18 Thread Hans Hagen
]{{\letterdoublequote}0x}\s[Special]{{\letterpercent}lx}\s[Special]{{\letterbackslash}n}\s[Constant]{{\letterdoublequote}}\s[]{, ul);} I get this error, when compiling my product. When components are compiled one by one, there is no such error. my guess is that t-vim is doing something funny with catcodes

Re: [NTG-context] two absolutely newbie questions

2009-08-24 Thread Aditya Mahajan
On Mon, 24 Aug 2009, Vyatcheslav Yatskovsky wrote: Sorry for two absolutely newbie questions, but 1) how to get '\' symbol? \letterbackslash (I need it in a file path) \filename{c:\Program Files} 2) how to get rid of section numbers? \setupstructureblock [bodypart] [bodymatter

Re: [NTG-context] t-vim: inline typing?

2009-07-20 Thread Aditya Mahajan
\relax, \s!default=\let\placevimlinenumber\relax, ]% \def\obeyedline{\placevimlinenumber\par\strut}% \fi } \def\shellescapedquote{\letterbackslash\letterdoublequote} \def\shellescapedquote{\letterdoublequote} \def\runvimsyntax#1% {\executesystemcommand {mtxrun --verbose

Re: [NTG-context] testing for broken links to external documents

2007-06-02 Thread Peter Münster
\letterbar\letterbar [ -f #2 ]; then echo \letterbackslash\letterbackslash useURL[#1][#2]; else echo \letterbackslash\letterbackslash#1DoesNotExist; fi texcmd.tmp}% \input texcmd.tmp} \setupcolors[state=start] \setupinteraction[state=start] \UseURL[fileOk][/tmp/real-file] \UseURL

Re: [NTG-context] testing for broken links to external documents

2007-05-29 Thread Peter Münster
\letterbar\letterbar [ -f #2 ]; then echo \letterbackslash\letterbackslash useURL[#1][#2]; else echo \letterbackslash\letterbackslash#1DoesNotExist; fi texcmd.tmp}% \input texcmd.tmp} \setupcolors[state=start] \setupinteraction[state=start] \UseURL[fileOk][/tmp/real-file] \UseURL

Re: [NTG-context] testing for broken links to external documents

2007-05-29 Thread Matthias Weber
and dirty: \def\UseURL[#1][#2]{% \executesystemcommand{% if wget -qO/dev/null #2 \letterbar\letterbar [ -f #2 ]; then echo \letterbackslash\letterbackslash useURL[#1][#2]; else echo \letterbackslash\letterbackslash#1DoesNotExist; fi texcmd.tmp}% \input texcmd.tmp

Re: [NTG-context] verbatim on wiki

2007-05-16 Thread Andrea Valle
for the vimsyntax module. Why do you use \type{\} in /BTEX{\color[SCgreen] \type{\}aSymbol}/ETEX ; and not use \letterbackslash which will give you syntax coloring for \ Aditya __ _ If your question is of interest

Re: [NTG-context] List of special characters?

2006-12-28 Thread Mojca Miklavec
On 12/28/06, [EMAIL PROTECTED] wrote: This works great. But then I've got the following keywords: # ! | \ @ ^ + - * / % Just copied from Aditya's code :) \letterhash, \# \letterexclamationmark \letterbar \letterbackslash \letterat \letterhat \letterslash \letterpercent, \% \letterless

Re: [NTG-context] List of special characters?

2006-12-28 Thread cormullion
On 2006-12-28, at 13:15.0, Mojca Miklavec wrote: On 12/28/06, [EMAIL PROTECTED] wrote: This works great. But then I've got the following keywords: # ! | \ @ ^ + - * / % Just copied from Aditya's code :) \letterhash, \# \letterexclamationmark \letterbar \letterbackslash \letterat

Re: [NTG-context] List of special characters?

2006-12-28 Thread Idris Samawi Hamid
On Thu, 28 Dec 2006 07:00:07 -0700, [EMAIL PROTECTED] wrote: Just copied from Aditya's code \letterhash, \# \letterexclamationmark \letterbar \letterbackslash \letterat \letterhat \letterslash \letterpercent, \% \letterless \lettermore \letterampersand, \ \letteropenbrace

Re: [NTG-context] \input introduces space

2006-02-28 Thread Taco Hoekwater
to 9 (ignored) also works. Here is a file demonstrating all four: \starttext % 1 \immediate\write18{echo -n X bla1.tex} X{\endlinechar=-1 \input bla1 }X % 2 \immediate\write18{echo -n X\letterpercent bla2.tex} X\input bla2 X % 3 \immediate \write18 {echo -n X\letterbackslash