t;
\letterhash
'$': "\\$"
\letterdollar
'&': "\\&"
No escape needed.
'`': "\\textasciigrave{}"
\textgrave
'^': "\\textasciicircum{}"
\letterhat
'~': "\\textasciitilde{}"
\lettertilde
, 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
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
%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
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
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
Are there some other predefined "\letterxxx" commands?
> \letteropenbrace
> \letterclosebrace
> \letterampersand
> \letterless
> \lettermore
> \letterhash
> \letterdoublequote
> \lettersinglequote
> \letterdollar
> \letterpercent
> \letterhat
> \
lequote
\lettersinglequote
\letterdollar
\letterpercent
\letterhat
\letterunderscore
\letterbar
\lettertilde
\letterbackslash
\letterslash
\letterquestionmark
\letterat
\lettercolon
\letterescape
\letterbgroup
\letteregroup
\letterleftbrace
\letterrightbrace
\letterexclamationmark
Is (and how) p
]
\sethyphenationfeatures[strict]
\unexpanded\def\TexC#1%
{\dontleavehmode\begingroup
\sethyphenationfeatures[whatever]%
\normalexpanded{\TeXcode{\letterbackslash#1}}%
\endgroup}
\starttext
\hsize\zeropoint
newlargewordwithhyphen
[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
]
\sethyphenationfeatures[strict]
\unexpanded\def\TexC#1%
{\dontleavehmode\begingroup
\sethyphenationfeatures[whatever]%
\normalexpanded{\TeXcode{\letterbackslash#1}}%
\endgroup}
\starttext
\hsize\zeropoint
newlargewordwithhyphen
\TexC{definebodyfont
\TexC#1%
{\dontleavehmode\begingroup
\sethyphenationfeatures[whatever]%
\normalexpanded{\TeXcode{\letterbackslash#1}}%
\endgroup}
\starttext
\hsize\zeropoint
newlargewordwithhyphen
\TexC{definebodyfont}
newlargewordwithnohyphen
\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
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
(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
[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
]
\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
=hyphenated]
\definehyphenationfeatures
[whatever]
[righthyphenchar=_]
\setuphyphenation
[method=traditional]
\unexpanded\def\TexC#1%
{\dontleavehmode\begingroup
\sethyphenationfeatures[whatever]%
\normalexpanded{\TeXcode{\letterbackslash#1}}%
\endgroup
\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
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
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
\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
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
... 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
:
\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
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
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
[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
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
) 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
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
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
}.
\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
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
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
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
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
Hi
Consider the following example:
\startluacode
print(lualetterbackslash:, [=[\\include]=])
\stopluacode
\def\lualetterbackslash{\letterbackslash}
\startluacode
print(letterbackslash:, [=[\\include]=])
\stopluacode
\bye
gives
lualetterbackslash: \\include
letterbackslash
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
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
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
\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
\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
, \textdollar
% : \letterpercent, \percent
^ : \letterhat
_ : \letterunderscore, \textunderscore
| : \letterbar, \textbar
~ : \lettertilde, \textasciitilde
\ : \letterbackslash, \letterescape, \textbackslash
/ : \letterslash, \textslash
? : \letterquestionmark
! : \letterexclamationmark
@ : \letterat
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
\ § \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
- 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
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
. 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
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
]{{\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
]{{\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
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
\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
\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
\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
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
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
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
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
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
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
62 matches
Mail list logo