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

ewenvironment
  • 时间:2024-12-24

ewenvironment - Tex Command


Previous Page Next Page  

newenvironment

ewenvironment - Used to create your own environments.

SYNOPSIS

{ 
ewenvironment{myEnvironmentName}
  [ <optional # of arguments, from 1 to 9> ]
  { <replacement text for each occurrence of egin{myEnvironmentName}> }
  { <replacement text for each occurrence of end{myEnvironmentName}> }}

DESCRIPTION

ewenvironment command is used for defining your own environment. ewenvironment must appear (within math depmiters) before it is used. The bracketed # of arguments is omitted when there are no arguments. There must not be a command having the same name as the environment.

EXAMPLE

    
    ewenvironment{myHeartEnv}
      {color{purple}{heartsuit}kern-2.5ptcolor{green}{heartsuit}}
      {	ext{ forever}}
    
    egin{myHeartEnv}
    end{myHeartEnv}
    
    $ ewenvironment{myHeartEnv} {color{purple}{heartsuit}kern-2.5ptcolor{green}{heartsuit}} { ext{ forever}} egin{myHeartEnv} end{myHeartEnv} $

    
    ewenvironment{myHeartEnv}[2]
      {color{#1}{heartsuit}kern-2.5ptcolor{#2}{heartsuit}}
      {	ext{ forever}}
      
    egin{myHeartEnv}{red}{blue}
    end{myHeartEnv}
    
    $ ewenvironment{myHeartEnv}[2] {color{#1}{heartsuit}kern-2.5ptcolor{#2}{heartsuit}} { ext{ forever}} egin{myHeartEnv}{red}{blue} end{myHeartEnv} $

Advertisements