Skip to main content
Tweeted twitter.com/StackTeX/status/691722129574907905
Copy edited. Removed meta information (this belongs in comments).
Source Link

defining newcommand Defining 'newcommand' without brackets

I know that in latex newcommandLaTeX newcommand is defined as:

\newcommand{name}[num] {definition } 

But I want to define a new command which itswhose argument is not defined between brackets, and it is defined with between \begin and \end commands for. For example, something like this:

\teststart bla-bla-bla \testend 

Maybe I should define two newcommandnewcommands, one for \teststart and one for \testend.

I should mention that I have seen such commands in the changebar package:, \cbstart and \cbend.

Thanks

defining newcommand without brackets

I know that in latex newcommand is defined as:

\newcommand{name}[num] {definition } 

But I want to define a new command which its argument is not defined between brackets and it is defined with between \begin and \end commands for example something like this:

\teststart bla-bla-bla \testend 

Maybe I should define two newcommand, one for \teststart and one for \testend.

I should mention that I have seen such commands in changebar package: \cbstart and \cbend.

Thanks

Defining 'newcommand' without brackets

I know that in LaTeX newcommand is defined as:

\newcommand{name}[num] {definition } 

But I want to define a new command whose argument is not defined between brackets, and it is defined with between \begin and \end commands. For example, something like this:

\teststart bla-bla-bla \testend 

Maybe I should define two newcommands, one for \teststart and one for \testend.

I should mention that I have seen such commands in the changebar package, \cbstart and \cbend.

added 10 characters in body
Source Link
user31729
user31729

I know that in latex newcommand is defined as:

\newcommand{name}[num] { definition }

\newcommand{name}[num] {definition } 

But I want to define a new command which its argument is not defined between brackets and it is defined with between \begin and \end commands for example something like this:

\teststart bla-bla-bla \testend

\teststart bla-bla-bla \testend 

Maybe I should define two newcommand, one for \teststart\teststart and one for \testend\testend.

I should mention that I have seen such commands in changebarchangebar package: \cbstart\cbstart and \cbend\cbend.

Thanks

I know that in latex newcommand is defined as:

\newcommand{name}[num] { definition }

But I want to define a new command which its argument is not defined between brackets and it is defined with between \begin and \end commands for example something like this:

\teststart bla-bla-bla \testend

Maybe I should define two newcommand, one for \teststart and one for \testend.

I should mention that I have seen such commands in changebar package: \cbstart and \cbend.

Thanks

I know that in latex newcommand is defined as:

\newcommand{name}[num] {definition } 

But I want to define a new command which its argument is not defined between brackets and it is defined with between \begin and \end commands for example something like this:

\teststart bla-bla-bla \testend 

Maybe I should define two newcommand, one for \teststart and one for \testend.

I should mention that I have seen such commands in changebar package: \cbstart and \cbend.

Thanks

Source Link
ehsan
  • 109
  • 1
  • 9

defining newcommand without brackets

I know that in latex newcommand is defined as:

\newcommand{name}[num] { definition }

But I want to define a new command which its argument is not defined between brackets and it is defined with between \begin and \end commands for example something like this:

\teststart bla-bla-bla \testend

Maybe I should define two newcommand, one for \teststart and one for \testend.

I should mention that I have seen such commands in changebar package: \cbstart and \cbend.

Thanks