Difference between revisions of "Line breaks marker"

From Wiki
Jump to navigation Jump to search
m (revert spam)
(Former example didn't work any more (2024/02). Removed part of example whose purpose I could not devine and made the rest work.)
 
(4 intermediate revisions by 2 users not shown)
Line 1: Line 1:
< [[The ConTeXt Way]]
 
 
 
== End of line marker in verbatim texts ==
 
== End of line marker in verbatim texts ==
  
 
from the wizard himself:
 
from the wizard himself:
  
<texcode>
+
<context source="yes" text="looks like this:">
\startreusableMPgraphic{return}
+
\startreusableMPgraphic{return}
 
     drawarrow
 
     drawarrow
 
       (0,0)--
 
       (0,0)--
Line 17: Line 15:
  
 
\setupcolors[state=start]
 
\setupcolors[state=start]
 
\starttext
 
  
 
\def\vcrlf{\symbol[return]\crlf\strut\kern1em\strut\ignorespaces}
 
\def\vcrlf{\symbol[return]\crlf\strut\kern1em\strut\ignorespaces}
  
\setuptyping[option=commands]
+
\setuptyping[TEX][escape=yes]
  
\starttyping
+
\startTEX
test test test /vcrlf test test
+
test test test /BTEX\vcrlf/ETEX test test
\stoptyping
+
\stopTEX
  
\setuptyping[option=color]
+
</context>
 
 
\installnewpretty r \vcrlf
 
 
 
\starttyping
 
test \test{test} %%\ r test test
 
\stoptyping
 
</texcode>
 
 
 
looks like this:
 
 
 
<context>
 
\startreusableMPgraphic{return}
 
    drawarrow
 
      (0,0)--
 
      (1EmWidth,0)--
 
      (1EmWidth,-.5ExHeight)--
 
      (.5EmWidth,-.5ExHeight) ;
 
\stopreusableMPgraphic
 
 
 
\definesymbol[return][\reuseMPgraphic{return}]
 
 
 
\setupcolors[state=start]
 
 
 
\def\vcrlf{\symbol[return]\crlf\strut\kern1em\strut\ignorespaces}
 
 
 
\setuptyping[option=commands]
 
 
 
\starttyping
 
test test test /vcrlf test test
 
\stoptyping
 
 
 
\setuptyping[option=color]
 
  
\installnewpretty r \vcrlf
+
[[Category:Basics]]
 
+
[[Category:Tools]]
\starttyping
 
test \test{test} %%\ r test test
 
\stoptyping
 
</context>
 

Latest revision as of 15:02, 3 February 2024

End of line marker in verbatim texts

from the wizard himself:

\startreusableMPgraphic{return}
    drawarrow
      (0,0)--
      (1EmWidth,0)--
      (1EmWidth,-.5ExHeight)--
      (.5EmWidth,-.5ExHeight) ;
\stopreusableMPgraphic

\definesymbol[return][\reuseMPgraphic{return}]

\setupcolors[state=start]

\def\vcrlf{\symbol[return]\crlf\strut\kern1em\strut\ignorespaces}

\setuptyping[TEX][escape=yes]

\startTEX
test test test /BTEX\vcrlf/ETEX test test
\stopTEX

looks like this: