English 中文(简体)
Tex Commands Reference

Symbols

A

B

页: 1

C

D

E

F

G

H

I

J

K

L

M

N

O

P

Q

R

S

T

U

V

W

X

Y

Z

Selected Reading

ewcommand
  • 时间:2024-11-03

ewcommand - Tex Command


Previous Page Next Page  

newcommand

ewcommand - Used to create your own commands (control sequences, macros, definitions).

SYNOPSIS

{ 
ewcommandmyCommandName
  [ <optional # of arguments, from 1 to 9> ]
  { <replacement text> } }

DESCRIPTION

ewcommand command is used for defining your own commands (control sequences, macros, definitions); ewcommand must appear (within math depmiters) before it is used; if desired, you can use the TeX.Macros property of the configuration to define macros in the head. The bracketed # of arguments is omitted when there are no arguments.

EXAMPLE

    
    ewcommandmyHearts 
     {color{purple}{heartsuit}kern-2.5ptcolor{green}{heartsuit}}
    
    myHeartsmyHearts
    
    $ ewcommandmyHearts {color{purple}{heartsuit}kern-2.5ptcolor{green}{heartsuit}} myHeartsmyHearts $

    
    ewcommandmyHearts[2] 
     {color{#1}{heartsuit}kern-2.5ptcolor{#2}{heartsuit}}
      
    myHearts{red}{blue}
    
    $ ewcommandmyHearts[2] {color{#1}{heartsuit}kern-2.5ptcolor{#2}{heartsuit}} myHearts{red}{blue} $

Advertisements