|
Reference
xsw Reference# This is a comment # image_path: "myimages/photos" template: NAME - [commands...] - CUSTOM_COMMAND: [text_parameters] slide: [template] - "my string" [text_parameters] - text: "my string" [text_parameters] - image: "image_path.jpg" [image_parameters] - background: "image_path.jpg" [background_parameters] - [CUSTOM_COMMAND]: "my string" Every minus sign (-) is a new command to be executed. A plus sign (+) in a text command means the parameters will be copied from the previous command - this can be used to write multiple lines of text. A source file must be written using UTF-8 encoding. Commands and ParameterscommentsEverything that starts with a "#" is considered a comment and is ignored by the program. Comments can start in the middle of the line. image_pathGives xsw a image path, where it'll look for images. For example, image_path: "~/myimages" slide: - image: "test.jpg" will look for test.jpg in the current directory. If not found, it'll look in ~/myimages. text (or nothing)The text command writes a text on the screen. The parameters are:
The keyword "text" is not necessary. image (or img)The image command pastes a image on the screen. The parameters are:
background (or bg)Similar to the image command, but automatically scale the image to the screen size. The parameters are:
The background can also be used to display a color, such as background: pink. The default background is black. In this case, the following parameters can be used:
See Colors for more information. TemplatesTemplates can be used to write a slide layout that is used by many slides in the presentation. It's similar to what !MS PowerPoint calls "master slide". Example: template: mytemplate - background: "mylogo.jpg" slide: mytemplate - text: "Title" In this case, the slide will be created with the mylogo.jpg background. Any number of templates can be created and used on any number of slides. A template can also contain a custom command. This can be used to create a text that'll have the same properties in all slides. Example: template: mytemplate - title: x:50 y:10 align:center slide: mytemplate - title: "My Title" In this case, a "title" command is created containing some parameters (but not a text). The text is referenced in the first slide. A template can also be referenced from another slide, such as this: template: mycompany - background: "logo.png" template: cover mycompany - title: x:50 y:10 align:center slide: cover - title: "My Company" Running the programThe program can be run as: $ xsw mypresentation.xsw A -l option opens the presentation in the last slide. This can be used to speed up development, as usually the user is editing the last slide. The following keys can be used during the presentation:
Generating a PDFA PDF of the presentation can be generated like this: $ xsw2pdf mypresentation.xsw The xsw2jpeg and xsw2png tools can be used to generate jpeg and png images from the presentation. | ||||||||||||||||||||||||||||||||||||||||||||||