next | previous | forward | backward | up | top | index | toc | home
Macaulay2Doc > how Macaulay 2 finds its files > LAYOUT

LAYOUT -- relative locations of Macaulay 2 files

Description

The hash table LAYOUT is a translation table from symbolic names to directory paths, which are to interpreted relative to the path stored in prefixDirectory. Some of the entries are strings: these provide paths to various types of files associated with the main Macaulay 2 system. The remaining entries are functions. These provide paths to various types of files associated with packages, and accept a string containing the name of the package as argument. Finally, for convenience, many Macaulay 2 files are regarded as being associated with a special package called Core, and the corresponding documentation files are part of the package Macaulay2.

i1 : LAYOUT

o1 = HashTable{bin => bin/                                                }
               cache => lib/Macaulay2/Core/cache/
               data => share/
               datam2 => share/Macaulay2/
               doc => share/doc/
               docm2 => share/doc/Macaulay2/
               docm2rel => share/doc/Macaulay2/Core/
               docpackages => share/doc/Macaulay2/
               emacs => share/emacs/site-lisp/
               emacsdoc => share/doc/Macaulay2/Core/emacs/
               images => share/doc/Macaulay2/Core/images/
               info => share/info/
               lib => lib/
               libm2 => lib/Macaulay2/Core/
               libraries => lib/Macaulay2/Core/
               m2 => share/Macaulay2/Core/m2/
               man => share/man/
               man1 => share/man/man1/
               man3 => share/man/man3/
               packagecache => {*Function[layout.m2:24:36-24:67]*}
               packagedoc => {*Function[layout.m2:20:34-20:71]*}
               packageexampleoutput => {*Function[layout.m2:25:44-25:81]*}
               packagehtml => {*Function[layout.m2:23:35-23:72]*}
               packageimages => {*Function[layout.m2:21:37-21:74]*}
               packages => share/Macaulay2/
               packagesrc => {*Function[layout.m2:19:34-19:67]*}
               packagetests => {*Function[layout.m2:22:36-22:73]*}
               share => share/Macaulay2/Core/
               style => share/doc/Macaulay2/Core/style/

o1 : HashTable

Let's apply the functions above to the name of a fictional package named "FOO" to see what paths are returned.

i2 : applyValues (LAYOUT, f -> if instance(f,Function) then f "FOO" else f)

o2 = HashTable{bin => bin/                                                    }
               cache => lib/Macaulay2/Core/cache/
               data => share/
               datam2 => share/Macaulay2/
               doc => share/doc/
               docm2 => share/doc/Macaulay2/
               docm2rel => share/doc/Macaulay2/Core/
               docpackages => share/doc/Macaulay2/
               emacs => share/emacs/site-lisp/
               emacsdoc => share/doc/Macaulay2/Core/emacs/
               images => share/doc/Macaulay2/Core/images/
               info => share/info/
               lib => lib/
               libm2 => lib/Macaulay2/Core/
               libraries => lib/Macaulay2/Core/
               m2 => share/Macaulay2/Core/m2/
               man => share/man/
               man1 => share/man/man1/
               man3 => share/man/man3/
               packagecache => lib/Macaulay2/FOO/cache/
               packagedoc => share/doc/Macaulay2/FOO/
               packageexampleoutput => share/doc/Macaulay2/FOO/example-output/
               packagehtml => share/doc/Macaulay2/FOO/html/
               packageimages => share/doc/Macaulay2/FOO/images/
               packages => share/Macaulay2/
               packagesrc => share/Macaulay2/FOO/
               packagetests => share/doc/Macaulay2/FOO/tests/
               share => share/Macaulay2/Core/
               style => share/doc/Macaulay2/Core/style/

o2 : HashTable
Here are the meanings of the keys used in LAYOUT. Some of these entries may not be in use.
  • "bin" : executable files (M2)
  • "cache" : cached data files (used by dumpdata and loaddata)
  • "data" : machine independent data files, not just for Macaulay 2
  • "datam2" : Macaulay 2 source files (*.m2) for Macaulay 2; this directory appears on the path
  • "doc" : documentation, not just for Macaulay 2
  • "docm2" : documentation for Macaulay 2 and its packages
  • "docm2rel" : documentation for Macaulay 2 itself (the Core package)
  • "docpackages" : documentation for Macaulay 2 packages
  • "emacs" : emacs source files (*.el, *.elc)
  • "emacsdoc" : documentation for using Macaulay 2 itself with emacs
  • "images" : images for Macaulay 2 itself
  • "info" : documentation in info form, not just for Macaulay 2
  • "lib" : machine dependent data and executable files, not just for Macaulay 2
  • "libm2" : machine dependent data and executable files for Macaulay 2 itself
  • "m2" : source files for Macaulay 2 itself (the Core package: *.m2)
  • "man" : man pages
  • "man1" : man pages, section 1
  • "man3" : man pages, section 3
  • "libraries" : files associated with third party libraries linked with Macaulay 2
  • "packagecache" : cached data files for the Macaulay 2 package FOO
  • "packagedoc" : documentation for the Macaulay 2 package FOO
  • "packageexampleoutput" : example output files for the Macaulay 2 package FOO
  • "packagehtml" : html documentation for the Macaulay 2 package FOO (*.html)
  • "packageimages" : images for the Macaulay 2 package FOO (*.jpg)
  • "packages" : source files for Macaulay 2 packages; this directory appears on the path
  • "packagesrc" : additional source files for the Macaulay 2 package FOO
  • "packagetests" : test files for the Macaulay 2 package FOO
  • "share" : machine independent files for Macaulay 2 itself
  • "style" : style files for Macaulay 2 itself

For the programmer

The object LAYOUT is a hash table.