Difference between revisions of "Line breaks marker"

From Wiki
Jump to navigation Jump to search
(Former example didn't work any more (2024/02). Removed part of example whose purpose I could not devine and made the rest work.)
 
(5 intermediate revisions by 3 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>
 
[http://www.town-china.cn 中央吸尘][http://www.town-china.cn 新风系统]
 
[http://www.town-china.cn 杭州通诚投资公司][http://www.021boy.com 成人用品]
 
[http://www.91yg.com 成人用品][http://www.air520.com 杭州婚庆][http://www.anteyi.cn 屏蔽器]
 
[http://www.atetech.com.cn 手机信号屏蔽器][http://www.51wisdom.com 网站建设] [http://www.51wisdom.com 杭州网络公司]
 
[http://www.56918.com/web.htm 网站建设][http://www.56918.com 虚拟主机][http://www.56918.com 域名注册]
 
[http://www.56918.com/promote.htm 网站推广][http://www.56918.com/email.htm 企业邮箱][http://www.56918.com/domain.htm 域名申请]
 
[http://www.56156.com 物流][http://www.dzsc.com 电子][http://www.ic37.com IC]
 
[http://www.51wisdom.com/jianshe_1.htm 网站建设] [http://www.51wisdom.com/jz.htm 虚拟主机]
 
[http://www.51wisdom.com/yinyong_1.asp 域名注册] [http://www.51wisdom.com/tuiguang.asp 网站推广]
 
[http://www.51wisdom.com/youju.asp 企业邮局][http://www.zhkaw.com 癌症] [http://www.51wisdom.com.cn/vi.htm vi设计] [http://www.51wisdom.com.cn/wangye 网页设计] [http://www.air520.com 杭州婚庆]
 
[http://www.air520.com 杭州婚庆司仪][http://www.air520.com 杭州婚庆主持]
 
[http://www.ywxjm.com 腰带] [http://www.51wisdom.com.cn/pingmian.htm 平面设计]
 
[http://www.51wisdom.net/biaozhi.htm 标志设计] [http://www.anteyi.cn 手机信号屏蔽器] [http://www.anteyi.cn 屏蔽器]
 

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: