# AFT rules for Lout books # COPYRIGHTS # Almost Free Text (AFT) # Todd A. Coram (todd@maplefish.com) # http://www.maplefish.com/todd/ # # Basser Lout # Jeffrey H. Kingston (jeff@cs.usyd.edu.au) # http://snark.ptc.spbu.ru/~uwe/lout/ # # THANKS # Todd Coram for modifying AFT to support Lout structure and for his # help and kindness! # # DISCLAIMER # This file's a user contribution. Neither copyrights nor # warranties. Use at your own risk --it doesn't look dangerous # though--. If you like the ease of AFT and the power of Lout feel # free to hack it and please send me your work or ideas. Enjoy! # # Abel Morabito (amorabito@funescoop.com.ar) # April, 2001 ID LOUTBOOK # Preamble and postamble ###################################################################### Preamble{ # Basser Lout Version 3.25 - Book - Output generated by AFT 5.08 @SysInclude { book } @Book @Title {%title%} @Author {%author%} @Edition {} @Publisher {} @BeforeTitlePage {} @OnTitlePage {} @AfterTitlePage {} @AtEnd {} @InitialFont { Times Base 12p } @InitialBreak { adjust 1.2fx hyphen } @InitialSpace { tex } @InitialLanguage { Spanish } @PageOrientation { Portrait } @PageHeaders { Titles } @ColumnNumber { 1 } @FirstPageNumber { 1 } @IntroFirstPageNumber { 1 } @OptimizePages { Yes } // }Preamble Postamble{ }Postamble # Pre and postfilters ###################################################################### # MANUAL FORM FEED prefilter \014 @NP # SPECIAL CHARACTERS # # Plain Literal Plain Literal # # " "\"" @ "@" # | "|" # "#" # \ "\\" } "}" # & "&" ^ "^" # ~ "~" / "/" # { "{" " " (blank space) # ## Protect backslashes, then escape quotation marks and backslashes. ## They mess each other if you don't do it this way. preFilter \\ -BSlAsH- preFilter \" \"\\\"\" preFilter -BSlAsH- \"\\\\" ## Protect targets, references and links. Escape braces and 'at'. preFilter \{\-([^\}]+)\@([^\}]+)\-\} %LeFtB%NeG$1-AtChAr-$2%NeG%RiGhTB preFilter \{\+([^\}]+)\+\} %LeFtB%PlUs$1%PlUs%RiGhTB preFilter \}\+([^\}]+)\+\{ %RiGhTB%PlUs$1%PlUs%LeFtB preFilter \{\-([^\}]+)\-\} %LeFtB%NeG$1%NeG%RiGhTB preFilter \}\-([^\}]+)\-\{ %RiGhTB%NeG$1%NeG%LeFtB preFilter [\{\}\@] \"$&\" preFilter %LeFtB { preFilter %RiGhTB } preFilter %PlUs + preFilter %NeG - preFilter -AtChAr- @ ### This is to type loutish typographic quotes directly ``like this'' ### instead of ``like this'''' --both work anyway. preFilter \`\`([^\']+)\'\'\'\' ``$1-4QuOtEs- preFilter \`\`([^\']+)\'\' ``$1-2QuOtEs- preFilter -4QuOtEs- '''' preFilter -2QuOtEs- '''' ## Escape some other special characters. preFilter [\#\&\^\/] \"$&\" ## Escape tildes not used to make small caps. Double tildes are replaced ## by single ones to get protected spaces. preFilter \~\~ -DTiLdE- postFilter \~ \"~\" postFilter -DTiLdE- ~ ### Escape vertical bars not used to make teletype. postFilter \| \"|\" # Elements ###################################################################### #REFERENCES TARGETS and URLs --no hyperlinks in lout files. URL @F {<%target%>} InternalReference %text% (p. @PageOf {%target%}) Target %text% @PageMark {%target%} # TITLE and AUTHOR: see 'Preamble' #OutputTitle #Title #Author # TABLE OF CONTENTS TOC # TOC should be made from your lout file. ## IMAGES Image \n@IncludeGraphic %image% Image-center \n@CD @IncludeGraphic %image% Image-left \n@LD @IncludeGraphic %image% Image-right \n@RightDisplay @IncludeGraphic %image% ## NUMBERED STRUCTURES * \n@Chapter @Title {%section%} @Tag {%section%} @Begin ** \n@Section @Title {%section%} @Tag {%section%} @Begin *** \n@SubSection @Title {%section%} @Tag {%section%} @Begin **** \n@SubSubSection @Title {%section%} @Tag {%section%} @Begin EndSect1 \n@End @Chapter EndSect2 \n@End @Section EndSect3 \n@End @SubSection EndSect4 \n@End @SubSubSection BeginSectLevel1 EndSectLevel1 BeginSectLevel2 \n@BeginSections EndSectLevel2 \n@EndSections BeginSectLevel3 \n@BeginSubSections EndSectLevel3 \n@EndSubSections BeginSectLevel4 \n@BeginSubSubSections EndSectLevel4 \n@EndSubSubSections # SECTIONS REFERENCING TOC are not needed in Lout # #^* #^** #^*** #^**** # MISC LineBreak \n@LLP StartParagraph \n@PP\n EndParagraph ParagraphBreak NoteRef @Sup {%ref%} Superscript @Sup {%stuff%} Subscript @Sub {%stuff%} Center \n@CD {%center%} HorizontalLine \n@D @FullWidthRule ## TABLES are not supported. Just make them in your Lout file. StartTable ######## WARNING: AFT doesn't support Lout tables yet! ######## #TableCaption #TableHeader #TableElement #TableRowStart #TableRowEnd #EndTable ## LISTS StartBulletList \n@BL BulletListElement \n@LI {\n EndBulletListElement \n} EndBulletList \n@EndList StartNamedList \n@TL NamedListElement \n@DTI {%name%} {\n EndNamedListElement \n} EndNamedList \n@EndList StartNumberedList \n@PNL NumberedListElement \n@LI {\n EndNumberedListElement \n} EndNumberedList \n@EndList ## QUOTED TEXT StartQuote \n@QD { EndQuote } ## FONT FACES ### Lout's verbatim mode doesn't process lout markup so PreFilterVerbatim? No ### Full filtering is needed mainly by AFTWEB --not by Lout, so FullFilterFilteredVerbatim? No ### Verbatim modes now StartVerbatim \n@ID @F @Verbatim { EndVerbatim } StartBlockedVerbatim \n@ID @F @Verbatim @Begin EndBlockedVerbatim \n@End @Verbatim ### Filtered verbatim is messy in Lout so StartFilteredVerbatim \n@ID @F @Verbatim @Begin EndFilteredVerbatim \n@End @Verbatim ### Remaining font faces StartTeletype @F { EndTeletype } StartSmall @S { EndSmall } StartEmphasis @I { EndEmphasis } StartStrong @B { EndStrong } ## OTHER CommentLine # %line% StrikeLine # %line% NBSPACE \" \"