fimblethwicke(1)        FreeBSD General Commands Manual       fimblethwicke(1)

NAME
     fimblethwicke - Manuscript Formatter for FreeBSD and Mac OS X

SYNOPSIS
     fimblethwicke [-n] [-r] [-s] [-c | -x | -t] [<infile> [<outfile>]]

DESCRIPTION
     Fimblethwicke converts a text document marked up as a fiction manuscript
     with Tree Structure Markup Language into a Rich Text Format (RTF)
     document or a Portable Document Format document (PDF).

     Fimblethwicke reads from stdin or from a single file specified on the
     command line and writes to stdout or to another file specified on the
     command line.  To specify an output file without an input file, specify
     an input file of '-'.  If the input document is malformed, fimblethwicke
     exits without explanation.

     Fimblethwicke supports a restricted subset of UTF-8 in input text.  The
     printable characters of the Basic Latin range (ASCII) and the Latin
     Supplement range are recognized.  UTF-8 sequences representing
     typographical single and double quotes and em-dashes are converted into
     their typewriter equivalents.  Fimblethwicke strips out other bytes with
     their high order bits set.

     Fimblethwicke embeds the Open Source Courier Prime typeface into PDFs.

     Fimblethwicke produces output for US Letter size paper (8.5in x 11in).
     There is no mechanism to change the paper size.  When invoked without
     option arguments, fimblethwicke reads TSML and writes formatted PDF data.

   OPTIONS
     -c    causes fimblethwicke to convert text input to TSML. The text format
           recognized is described in the section titled, TEXT INPUT.

     -n    causes 'c' headings to start on a new page.

     -r    causes 's' headings to restart chapter count.

     -s    causes fimblethwicke to embed Courier Prime Sans into PDF output
           instead of Courier Prime.

     -t    causes fimblethwicke to convert TSML input to the text format.

     -x    causes fimblethwicke to produce RTF output instead of PDF.

   TSML
     TSML is a generic markup language described in tsml(5).  TSML is designed
     to be machine-friendly rather than human-friendly.  Fimblethwicke uses a
     simple TMSL scheme to classify paragraphs by type and to define document
     metadata.

     An example TSML manuscript is included in the source distribution in the
     file document.tsml. A concise example TSML manuscript follows.

     [y[
     [m[
       [t[ TITLE 1;;TITLE 2 ]]
       [a[ Author 1; Author 2 ]]
       [c[ Contact 1; Contact 2 ]]
       [r[ Revision 1; Revision 2 ]]
       [h[ TITLE; Author ]]
     ]m]

     [s[ THIS IS SECTION $S ]]
     [c[ THIS IS CHAPTER $C ]]

     [b[
        _Lorem_ _ipsum_ _dolor_ _sit_ _amet_, consectetur adipiscing elit. Quis est
        enim, in quo sit cupiditas, quin recte cupidus dici possit? Estne, quaeso,
        inquam, sitienti in bibendo voluptas? Quasi ego id curem, quid ille aiat
        aut neget.  Illi enim inter se dissentiunt. Ne amores quidem sanctos a
        sapiente alienos esse arbitrantur. Duo Reges: constructio interrete.
     ]]
     ]y]

   ELEMENTS
     All elements have names of a single letter.  The toplevel element is
     named 'y'.  It contains one or more instances of the following child
     elements.

     'm'  Fimblethwicke extracts from the children of the 'm' element the data
          to use in the manuscript's title page, running header, and in the
          PDF Info dictionary.  To specify that the text in these elements be
          formatted into multiple lines, separate the data for each line from
          the others with a semicolon.  To insert a blank line between lines,
          insert 2 contiguous semicolons.

          [t[Title;;Subtitle]]

          't'  specifies the title of the manuscript.  Titles are formatted in
               boldface.

          'a'  specifies the authors.

          'c'  specifies contact information.

          'r'  specifies revision information.  To insert the current date,
               make one of the revision lines $D by itself.  To insert the
               word count of the document, make one of the lines $W by itself.

          'h'  specifies the content to be added to the running header of the
               manuscript.  This element should contain 2 lines.  The first
               line should be your last name.  The second line should be one
               or two words from the title of the manuscript.  Subsequent
               lines are ignored.

          The 'm' element should only appear once in a document.  If you
          provide multiple instances, each instance's data supersedes the data
          in preceding instances.  The 5 child elements should only appear
          once each inside 'm'.  If you provide multiple instances, the data
          in each instance supersedes data the data in preceding instances.
          If you do not provide the 't', 'a', 'c', 'h', or 'r' elements,
          placeholder data is used.

     's'  provides the content of a centered, boldface section title. The
          lines of the paragraph are centered on a separate page. Any
          occurrence of $S in a section is replaced with the section number.
          Sections are implicitly numbered from 1. By default, the parsing of
          a section does not chapter numbering to restart.  The -r option
          makes sections restart chapter numbers from 1.

     'c'  provides the content of a centered, boldface chapter heading
          separated from the rest of the manuscript with 2 blank lines before
          and 1 blank line after the centered line.  Any occurrence of $C in a
          chapter is replaced with the number of the chapter.  Chapters are
          implicitly numbered from 1.  To force the content of 'c' elements to
          appear at the top of new pages, include the -n option on the command
          line.

     'b'  provides the content of a body paragraph.

     'i'  indicates a break paragraph that indicates a break in the narrative
          less significant than that which a chapter indicates.  Only the
          first character of the content is used.  The paragraph is rendered
          as a single line containing the centered character.

   CONTENT
     Fimblethwicke discards data outside of terminal elements.  You can place
     comments in between terminal elements.

     Inside of terminal elements, fimblethwicke normalizes whitespace by
     converting all whitespace characters into space characters, collapsing
     multiple contiguous spaces into single spaces, and removing leading and
     trailing spaces.

     Fimblethwicke underlines words bookended with underscores.  If you want
     to underline a section of text, you must _underline_ _each_ _word_
     _individually_.  You cannot underline metadata for the title page.

     Fimblethwicke provides no means to change the font.  You cannot embolden
     text or format it in italics.  Boldface is intrusive outside of headings,
     and Courier Oblique is not oblique enough to attract the eye.  To
     emphasize words, underline them.

     To insert [, ], or \ into element content, escape each with a backslash:

     [b[He looks up. \[At what?\]]]

   TEXT INPUT
     When the -c option is invoked, fimblethwicke converts text input to TSML.
     Metadata are specified in a paragraph at the start of a manuscript:

     Title: FIMBLETHWICKE TEST DOCUMENT
     Author: Carnaby Fimblethwicke
     Contact:
       C. Fimblethwicke
       123 Ocean View Terrace
       Coastal City
       Nowhere, Noplace
       555 ZZZ

       fimblethwicke@nowhere.net
     Revision:
       $W
       $D
     Header:
       Fimblethwicke
       Test

     To specify multiple lines for a keyword, leave the line after the keyword
     blank and place the content on lines following the keyword line.  Start
     the content lines with whitespace.  A content line of only whitespace
     will be replaced with a blank line in the output.

     To insert editorial content that is not included in the formatted output,
     wrap paragraphs in '[[' and ']]'.  Multiple paragraphs of text may be
     embedded in a single note "paragraph":

     [[Multi-paragraph note.

     Second paragraph of note.]]

     To specify a section paragraph, start the paragraph with an equals sign:

     =SECTION $S

     To specify a chapter paragraph, start the paragraph with a period:

     .CHAPTER $C

     To indicate a break paragraph, put '#' by itself in the paragraph:

     This is the paragraph before the break.

     #

     This is the paragraph after the break.

     All other paragraphs are body paragraphs.

     Separate paragraphs with blank lines.

     Line breaks are ignored in paragraphs.  Paragraphs are reflowed by
     fimblethwicke to fill the output page.

     The process of producing a PDF or RTF file from a text file can be
     automated with a Makefile:

     all: view

     .PHONY: view
     view: manuscript.pdf
        open -a Preview.app manuscript.pdf

     manuscript.pdf: manuscript.tsml
        fimblethwicke manuscript.tsml manuscript.pdf

     manuscript.tsml: manuscript.txt
        fimblethwicke -c manuscript.txt manuscript.tsml

AUTHORS
     James Bailie <jimmy@mammothcheese.ca>
     http://www.mammothcheese.ca

                               Tue Jul 17, 2018