由买买提看人间百态

boards

本页内容为未名空间相应帖子的节选和存档,一周内的贴子最多显示50字,超过一周显示500字 访问原贴
TeX版 - how to make a newcommand for verbatim
相关主题
beamer question有没有latex internal command的summary?
怎样用latex编排C语言源代码?TEX里面有没有注视大段文字的命令?
两个非常小的问题。怎么插入code在latex里?
2列文章里面跨列图片[合集] 怎样用latex编排C语言源代码?
Footnote in latex求助,如何在latex里以一般code格式贴code
how to convert latex to txt?如何加入programming codes?
兄弟们latex里面怎样把一个致富放在最右面请问latex有无注释环境?
latex不能认识 \sci (journal science)问个latex 字体命令
相关话题的讨论汇总
话题: newcommand话题: verbatim话题: make话题: end话题: token
进入TeX版参与讨论
1 (共1页)
yy
发帖数: 45
1
I tried to alias a newcommand for verbatim like:
\newcommand{\bev}{\begin{verbatim}}
\newcommand{\eev}{\end{verbatim}}
I don't know why the latex seems not recognize this newcommand at all?
Am I missing something?
Thanks,
T*******n
发帖数: 493
2
You can't to that.
\begin{verbatim} puts TeX's tokenizer in a special mode
where each charcter becomes a token (instead of commands
like "\whatever" being read in as a single token), and it obeys
spaces and obeys line breaks, and no longer understands the
meaning of other characters. The only way to kick itself out
of this mode is for it to run across the exact token sequence
(string) "\end{verbatim}". So the "\end{verbatim}" isn't really an
end-environment command here, it's a dumb text strin

【在 yy 的大作中提到】
: I tried to alias a newcommand for verbatim like:
: \newcommand{\bev}{\begin{verbatim}}
: \newcommand{\eev}{\end{verbatim}}
: I don't know why the latex seems not recognize this newcommand at all?
: Am I missing something?
: Thanks,

1 (共1页)
进入TeX版参与讨论
相关主题
问个latex 字体命令Footnote in latex
latex中显示latex命令how to convert latex to txt?
怎样在tex文档中保持原计算机代码的font?兄弟们latex里面怎样把一个致富放在最右面
What is the best Latex booklatex不能认识 \sci (journal science)
beamer question有没有latex internal command的summary?
怎样用latex编排C语言源代码?TEX里面有没有注视大段文字的命令?
两个非常小的问题。怎么插入code在latex里?
2列文章里面跨列图片[合集] 怎样用latex编排C语言源代码?
相关话题的讨论汇总
话题: newcommand话题: verbatim话题: make话题: end话题: token