# maple.ini (DOS) or .mapleinit (UNIX)
# to be copied to subdirectory /maplev4/lib 

# some macros:
# by typing "macros" in a Maple session you get all macros displayed 
# that have been assigned. 

macros :=         
   [bi  = binomial,
    eb  = evalb,   
    ef  = evalf,      
    inf = infinity,    
    lim = limit,       
    new = restart,
    sc  = 'scaling=constrained',
    si  = simplify,
    sv  = solve]:
for i to nops(macros) do
   macro(macros[i])
od:
i := 'i':                     # unassign variable i

# -----------------------------------------------------------------------------

# Define Euler's constant E=2.7182818... like in R3

alias(E=exp(1)):
constants := constants, E:    # append E to constants (like in R3)

# -----------------------------------------------------------------------------

# Set some defaults for package geometry and for function solve

_EnvHorizontalName := x:      # name of ascissa
_EnvVerticalName   := y:      # name of ordinate

_EnvAllSolutions   := true:   # return a general solution with 
                              # transcendental functions

# -----------------------------------------------------------------------------

# Extend libname so that Maple V can find user-defined packages and/or
# documentations

libname := 
   `c:/maplev4/math`,         # math package
   `c:/maplev4/joe_riel`,     # Joe Riel's Administering Maple V Release 4
   `c:/maplev4/geom3d`,       # geom3d for Release 4
   `c:/maplev4/mv4ext`,       # Patch for Invfunc
   libname:                   # original default value of libname after
                              # startup

# -----------------------------------------------------------------------------

# load short forms for two packages (math and plots)

with(math):
with(plots, display):

# -----------------------------------------------------------------------------

# Set some options for plots functions (plot fonts now mostly like in R3)

plots[setoptions](
   titlefont = [HELVETICA, BOLD, 12],
   axesfont  = [HELVETICA, 11],
   labelfont = [HELVETICA, 11],
   font      = [HELVETICA, 11]):

# -----------------------------------------------------------------------------

# readlib-define some not readlib-defined Library functions,
# this avoids having to load the code of these functions with readlib

unprotect('evalr', 'iscont', 'discont', 'isolate', 'profile'):
evalr   := 'readlib('evalr')':
iscont  := 'readlib('iscont')':
discont := 'readlib('discont')':
isolate := 'readlib('isolate')':
profile := 'readlib('profile')':
protect('evalr', 'iscont', 'discont', 'isolate', 'profile'):

# -----------------------------------------------------------------------------
# some useful hacker functions

unprotect('pp'):
pp := proc(n::nonnegint):
   if n < 3 then 
      interface(prettyprint=n)
   else
      ERROR(`Argument must be less than 3`)
   fi
end:
protect('pp'):

unprotect('vp'):
vp :=  proc(n::nonnegint):
   if n <= 3 then 
      interface(verboseproc=n)
   else
      ERROR(`Argument must be less than 4`)
   fi
end:
protect('vp'):

unprotect('pl'):
pl := proc(n::nonnegint):
   printlevel := n;
   NULL
end:
protect('pl'):


back