#Laidout 0.09 File Formats # This file describes: # 1. Project files, which contain almost all of the possible Laidout elements # 2. a Laidout Image List file. # The laidoutrc file in ~/.laidout/(version)/laidoutrc documents itself. # Throughout this file format, data is grouped according to how much it is indented, # reminiscent of python, and the yaml file format. The format here is kind of a simplified # yaml. Here, there are basically a name and value (together called an attribute), plus any number # of subattributes. A value can be on the same line as the name, or it can span several lines. # If you write "thename \" on one line, then the next several lines that are more indented # than the name line contain the value. Always remember to use spaces for # indents. NEVER tabs, because they cause too much confusion. Comments begin with a '#' # character, and go until the end of the line. If you have a value that has such a character # in it, then simply put double quotes around the value. Finally, everything is case sensitive. #----------------- Laidout Project files ------------------ # The broadest file of a Laidout document is a Project file, # which contains 0 or more Document files, plus other resources. # For a project, the first line of the file will be (including the '#'): #Laidout 0.09 Project # followed by all the project attributes. A stand alone Document file will start: #Laidout 0.09 Document # followed by Document attributes. This pattern follows for most fragments of # Laidout elements, so for instance, a stand alone Laidout palette file will start: # "#Laidout 0.09 Palette" and will then continue with only palette attributes. Many resources, including # palettes, and window arrangements, can appear at the Project level or the Document level. # Without further ado, here are the actual elements, starting at the Project level: #----------------- (starts on next line) ------------ #Laidout 0.09 Project #You can specify any number of scratch spaces (limbo) that can be attached to views. limbo IdOfLimbo object ... #each limbo is really just a Group of objects #You can contain any number of text objects, maybe used elsewhere as scripts. textobject name filename fname #the text can be in this file, text \ #or you can have the text right here ... #You can have any number of extra paper groups for special occasions. papergroup "Name of paper group" (papergroup attributes) # Documents can be included in the project file itself, or # merely referenced, which is usually the more convenient way. # If merely referenced, the line will look like: Document blah.doc #and the file, if relative pathname is given, is relative to the project file itself. #Any other paths used by objects in the document, if they are within or under the #project directory (the directory containing the project file), then the paths #are written out as being relative to that project directory. #If the document is embedded, it follows the normal Document format, as follows: Document name Some name for the doc #any random name you care to give the document saveas /path/to/filename.doc #The path previously saved as, which #is currently ignored when reading in again. #A document has only 1 of the following impositions attached to it. #These are all the impositions currently installed: imposition Singles #insets are regions of a paper not taken up by the page insetl 0 #The left inset from the side of a paper insetr 0 #The right inset from the side of a paper insett 0 #The top inset from the side of a paper insetb 0 #The bottom inset from the side of a paper tilex 1 #number of times to tile the page horizontally tiley 1 #number of times to tile the page vertically numpages 3 #number of pages in the document. This is ignored on readin defaultpapers #default paper group name somename #a string id. no whitespace Name Descriptive Name #human readable name paper #there can be 0 or more paper sections matrix 1 0 0 1 0 0 #transform for the paper to limbo space name Letter #the name of the paper width 8.5 #in inches height 11 #in inches dpi 360 #default dpi for the paper landscape #could be portrait (the default) instead defaultpagestyle #default page style marginl 0 #amount in from the left or outside for a margin marginr 0 #amount in from the right or inside for a margin margint 0 #amount in from the top for a margin marginb 0 #amount in from the bottom for a margin toppage #page is tagged as being on the top in a spread bottompage #page is tagged as being on the bottom in a spread leftpage #page is tagged as being on the left in a spread rightpage #page is tagged as being on the right in a spread lrtb #tag that page has left, right, top, and bottom margins iotb #tag that page has inside, outside, top, and bottom margins lrio #tag that page has left, right, inside, and outside margins imposition Double Sided Singles #insets are regions of a paper not taken up by the page insetl 0 #The left inset from the side of a paper insetr 0 #The right inset from the side of a paper insett 0 #The top inset from the side of a paper insetb 0 #The bottom inset from the side of a paper tilex 1 #number of times to tile the page horizontally tiley 1 #number of times to tile the page vertically numpages 3 #number of pages in the document. This is ignored on readin defaultpapers #default paper group name somename #a string id. no whitespace Name Descriptive Name #human readable name paper #there can be 0 or more paper sections matrix 1 0 0 1 0 0 #transform for the paper to limbo space name Letter #the name of the paper width 8.5 #in inches height 11 #in inches dpi 360 #default dpi for the paper landscape #could be portrait (the default) instead defaultpagestyle #default page style marginl 0 #amount in from the left or outside for a margin marginr 0 #amount in from the right or inside for a margin margint 0 #amount in from the top for a margin marginb 0 #amount in from the bottom for a margin toppage #page is tagged as being on the top in a spread bottompage #page is tagged as being on the bottom in a spread leftpage #page is tagged as being on the left in a spread rightpage #page is tagged as being on the right in a spread lrtb #tag that page has left, right, top, and bottom margins iotb #tag that page has inside, outside, top, and bottom margins lrio #tag that page has left, right, inside, and outside margins defaultpagestyler #default right or bottom page style #(same kinds of attributes as the defaultpagestyle) isvertical #whether the fold is up/down or the default left/right isleft #whether page 0 is to be displayed by itself or to the left of page 1 istop #like isleft, but for isvertical impositioning imposition Booklet #insets are regions of a paper not taken up by the page insetl 0 #The left inset from the side of a paper insetr 0 #The right inset from the side of a paper insett 0 #The top inset from the side of a paper insetb 0 #The bottom inset from the side of a paper tilex 1 #number of times to tile the page horizontally tiley 1 #number of times to tile the page vertically numpages 3 #number of pages in the document. This is ignored on readin defaultpapers #default paper group name somename #a string id. no whitespace Name Descriptive Name #human readable name paper #there can be 0 or more paper sections matrix 1 0 0 1 0 0 #transform for the paper to limbo space name Letter #the name of the paper width 8.5 #in inches height 11 #in inches dpi 360 #default dpi for the paper landscape #could be portrait (the default) instead defaultpagestyle #default page style marginl 0 #amount in from the left or outside for a margin marginr 0 #amount in from the right or inside for a margin margint 0 #amount in from the top for a margin marginb 0 #amount in from the bottom for a margin toppage #page is tagged as being on the top in a spread bottompage #page is tagged as being on the bottom in a spread leftpage #page is tagged as being on the left in a spread rightpage #page is tagged as being on the right in a spread lrtb #tag that page has left, right, top, and bottom margins iotb #tag that page has inside, outside, top, and bottom margins lrio #tag that page has left, right, inside, and outside margins defaultpagestyler #default right or bottom page style #(same kinds of attributes as the defaultpagestyle) isvertical #whether the pages fold up/down or the default left/right creep 0 #(todo) how much creep is introduced by the fold when all pages are folded over bodycolor 0xffffff #(todo)8bit rgb color of the pages covercolor 0xffffff #(todo)8bit rgb color of the pages imposition Net numpages 3 #number of pages in the document. This is ignored on readin printnet yes #whether the net lines get printed out with the page data simplenet #this is the same as using: abstractnet simple #It is a basic net definition roughly equivalent to an OFF file scalingfromnet 1 #any final scaling to apply to a net before mapping # onto a spread abstractnet type #type can be "file" or "Polyhedron" or "simple". abstractnet file #this block demonstrates abstract nets based on files. filename /path/to/it #This is used when the abstract net has not been #modified since being loaded from the file. abstractnet Polyhedron #this block demonstrates Polyhedron abstract nets. net NetType #There can be none or more nets. If there is no abstractnet, then #there must be one or more nets. Nets are usually different arrangements #of an abstract net. name Bent Square #this is just any name you give the net matrix 1 0 0 1 0 0 # transform to map the net to a paper basenet #the base abstract net info 333 #general integer info about the net active #present if the net is supposed to be somehow active. # the exacte meaning of active is application dependent. tabs no #(***TODO) whether to put tabs on face edges face #there can be any number of laid out faces original 3 #the face index in the abstract net corresponding to this face back #this face is actual the mirror image of the abstract net face matrix 1 0 0 1 0 0 #transform that places points in net space potential #this face might be, but is not necessarily in the net actual #this face IS in the net edge #this is a typical edge for a laidout net toface 4.6 #connects to net face index 4, edge index number 6 tooriginal 3 #connects to original face 3 potential #link is to a potential net face actual #link is to an actual net face facetaken #link is to an actual face that is somehow connected elsewhere svalue .5 #for bezier edges, the point of contact with adjacent edge, 0 to 1 points \ #point list for this edge. First point must be a vertex point -.5 -.5 # that is actually on the line. following points can be either c -.5 1.5 # polyline points or bezier control points c 1.5 1.5 v 2 2 # the edge's path can be a bezier line of any length, but c 1.5 3.6 # remember to leave out the final vertex point. That point is c 1.8 3.6 # listed in the following edge's point list. edge #here's a typical edge for a basic abstract net tooriginal 2.1 #connects to original face 2 at edge 1 d M-.5 -.5 L-.5 1.5 L1.5 1.5 L1.5 -.5 #alternate specification of points with svg line #there can be any number of extra lines tag 3 #tag number for the line. Might be used as class of line points \ #svg style defined line M-.5 -.5 L-.5 1.5 L1.5 1.5 L1.5 -.5 linestyle #style of line color 0 0 65535 65535 capstyle 1 joinstyle 0 dotdash 32617 function 816496600 mask 2054 #The page labels for a document are defined within zero or more page ranges. #If no page range blocks are given, then the default numbering 0,1,2... is assumed. pagerange name Blah #optional name of the range impositiongroup 0 #(unimplemented) start 0 #the starting page index for the range offset 2 #amount to add to the index of each page #labelbase is a template used to construct labels: labelbase "#" #(default) would make normal numbers: 0,1,2,3,... #labelbase "###" #would make labels with 0 padding: 000,001,...100,...999,1000,... #labelbase "A-#" #would make: A-0,A-1,A-2,A-3,... decreasing #make the range count down rather than up labeltype default #this can instead be one of the following: # arabic -> 1,2,3,... # roman -> i,ii,iii,iv,... # roman_capitals -> I,II,III,... # abc -> a,b,c,... # ABC -> A,B,C,... #The pages of a document are currently just a collection #of layers containing drawing objects. #The order of the pages in the document is the same as the order listed in the file, #regardless of any label after "Page". page #Pages contain layers which contain drawable objects. #Layers are really just a group whose parent is a page. layer id #the name of a group. There can be no whitespace in the id locked #indicates that this group cannot be modified visible #no indicates that this group cannot be seen on screen nor printed out prints #no indicates that this group can be seen on screen, but cannot be printed matrix 1 0 0 1 0 0 #affine transform to apply to the whole group #Groups contain any number of drawable objects. Here are all the possible such #objects currently installed: object Group #...a subgroup... object ImageData filename /path/to/file previewfile /path/to/preview/file #if not absolute, is relative to filename width 100 #in pixels, overriden by the actual dimensions of the image when read in. height 100 #If the file is not found or broken, then these dimensions are used. matrix 1 0 0 1 0 0 #affine transform to apply to the image description "Text description, such as for captions" object ImagePatchData matrix 1 0 0 1 0 0 #the affine matrix affecting the patch griddivisions 10 #number of grid lines to display xsize 4 #number of points in the x direction ysize 4 #number of points in the y direction style smooth #when dragging controls do it so patch is still smooth controls full #can also be linear, coons, or border points \ #all xsize*ysize points, a list by rows of: x y 1.0 1.0 2.0 1.0 1.0 2.0 2.0 2.0 #etc... there are 16 points in the smallest patch filename whicheverfile.jpg #name of the image used iwidth 100 #width of the image in pixels for a preview sampling iheight 100 #iheight of the image in pixels for a preview sampling object PathsData matrix 1 0 0 1 0 0 defaultlinestyle color 0 0 65535 65535 capstyle 1 joinstyle 0 dotdash 0 function 0 mask 4607182418800017408 style 1 object GradientData #Gradients lie on the x axis from p1 to p2 matrix 1 0 0 1 0 0 #the affine transform affecting this gradient p1 0 #the starting x coordinate p2 1 #the ending x coordinate r1 0 #the starting radius (radial) or the +y extent (linear) r2 0 #the ending radius (radial) or the -y extent (linear) radial #Specifies a radial gradient linear #Specifies a linear gradient spot #There will be at least two gradient data spots, such as this: t 1 #the spot on the x axis to place the color, customarily the spots will #cover the whole range [0..1] but that is not mandatory rgba 0 255 65535 65535 #the red, green, blue, and alpha components, values from 0 to 65535 object ColorPatchData matrix 1 0 0 1 0 0 #the affine matrix affecting the patch griddivisions 10 #number of grid lines to display when not rendering colors xsize 4 #number of points in the x direction ysize 4 #number of points in the y direction style smooth #when dragging controls do it so patch is still smooth controls full #can also be linear, coons, or border points \ #all xsize*ysize points, a list by rows of: x y r g b a 1.0 1.0 0 65535 65535 65535 #patch corners, not control points 2.0 1.0 #have colors assigned to them, with 1.0 2.0 #values that range from 0 to 65535 2.0 2.0 65535 0 65535 65535 #etc... there are 16 points in the smallest patch object EpsData filename /path/to/file previewfile /path/to/preview/file #if not absolute, is relative to filename minx 50 #the bounding box, which should be same as the %%BoundingBox comment in the EPS miny 50 maxx 100 maxy 200 matrix 1 0 0 1 0 0 #affine transform to apply to the eps description "Blah blah" #a description of the eps object MysteryData importer Passepartout #the name of the importer that created this data name Raster x.jpg #some name that the importer gave this data maxx 100 #width of the data maxy 200 #height of the data matrix 1 0 0 1 0 0 #affine transform to apply to the data attributes #the imported hints for this data ... # what these are depend on the importer iohints #When files are imported, sometimes data that is not recognized by laidout .... #can still be remembered in case you export to the same format. iohints .... #contains the document level data of that kind. metadata #Whatever general metadata is attached to the document. .... #This might be author, copyright, etc. #Window arrangements can be dumped out. These can be project attributes or Document #attributes. If you are working on a project, not just a single Document, #then the window attributes in a Document file are ignored when the project is loaded, #and forgotten when the document is next saved.. #If there are no window blocks, then a default window with a view is created. window xywh 0 0 500 500 #The x,y,width,height of the window on the screen #windows contain 1 or more panes, which contain a subwindow #It is dangerous to try to construct panes yourself, because #the borders must touch without gaps. The programming does not currently #recover well when the panes have improper metrics. #What follows is one pane for each of the installed subwindow types. pane xyxy 0 0 500 500 #xmin,ymin, and xmax,ymax of the pane window ViewWindow singlelayout #put the view mode to singles #pagelayout #put the view mode to page spreads #paperlayout #put the view mode to paper spreads #layout Single #see individual impositions for layout types spread 1 #the index of the spread for the acting imposition page 0 #the document page index of the page to set context to matrix 1 0 0 1 0 0 #transform between screen and real space xbounds -20 20 #what distance a horizontal scrollbar represents ybounds -20 20 #what distance a vertical scrollbar represents limbo name #limbo name, or subattributes with objects (optional) pane xyxy 0 0 500 500 #xmin,ymin, and xmax,ymax of the pane window SpreadEditor matrix 1 0 0 1 0 0 #transform between screen and real space centerlabels 0 #0=center, 1=bottom, 2=left, 3=top, 4=right drawthumbnails #whether to use page thumbnails rather than a blank page outline arrangetype 0 #*** this is in flux, check back later pane xyxy 0 0 500 500 #xmin,ymin, and xmax,ymax of the pane window HelpWindow win_x "0" win_y "0" win_w "500" win_h "600" pane xyxy 0 0 500 500 #xmin,ymin, and xmax,ymax of the pane window CommandWindow win_x "0" win_y "0" win_w "0" win_h "0" pane xyxy 0 0 500 500 #xmin,ymin, and xmax,ymax of the pane window ButtonBox win_x "0" win_y "0" win_w "0" win_h "0" pane xyxy 0 0 500 500 #xmin,ymin, and xmax,ymax of the pane window PaletteWindow win_x "0" win_y "0" win_w "0" win_h "0" pane xyxy 0 0 500 500 #xmin,ymin, and xmax,ymax of the pane window PlainTextWindow win_x "0" win_y "0" win_w "0" win_h "0" #----------------- a Laidout Image List file ------------------ #Laidout 0.09 Image List path /blah1/blah2 #any subsequent "./file" becomes "/blah1/blah2/file" dpi 600 # default dpi, overridable per image perPage asWillFit # same as -1, put as many as will fit on each page #perPage allOnOnePage # same as -2, put all on the same page, may make them fall off the edges #perPage 5 # >0 == exactly that many per page page 3 # change current page to page index 3 (not page label 3) dir:///path/to/a/directory #(TODO!) dumps all in dir, no previews, always same dpi # Note that file and preview fields must begin with "/", "./", "../", or "file://". # File listings are file, then preview, then description. If the preview field doesn't # start with the above, then it is assumed that everything after the file is the description. # The preview and description fields are optional. file:///aoeuaoen /path/to/preview/ Description "/file/file with spaces" ./relative/file ../another/relative/file file:///path/to/preview/ description /some/file /path/to/preview/ description file:///aoeuaoen dpi 300 #overrides the current dpi for this file xywh 0 0 2 2 #fit image in this box, in page coordinates. # overrides dpi if that dpi would make it too big for the box preview /path/to/preview/ #preview and description fields can also be given description \ #as subattributes of the file Blah blah blah blah blah pagebreak # no more pictures for this page, goes to page 4