Table of Contents
SF Code Syntax
There is a proper spacing style, but the parser only cares whether or not some amount of space is present at the beginning of any given line. Here's the breakdown:
Script Title
SCRIPT TITLE ------ -----
A Script Title is the first item on the Title Page of a script. It should be indented with at least one whitespace. The following line should consist of some white space followed by only hyphens (any number of them and white space, but the intention is to underline the title.) After this pattern has been completed, the parser is in Title Page Context, but additional lines of the Script Title may be present, each of which needs a corresponding hyphen line underneath it.
Subtitle
SCRIPT TITLE ------ ----- Subtitle Line 1 Additional Subtitle Line
Subtitle lines are any indented lines following the Script Title, and may begin with or include between them single blank lines. Once two or more blank lines in a row are encountered, the total number of blank lines becomes temporary value X, the parser switches to Title Page Credit Context.
Title Page Credit
In the following example, blank lines are counted in parenthesis.
(1 blank) (2 blanks minimum) (x=3 blanks) Written by (1 blank) (y=2 blanks) Jeff Day (z=1 blank) & (1 blank) Patrick Neil (1 blank) (2 blanks) (3 blanks) Directed by (z=1 blank) Jeff Day (1 blank) (2 blank) (3 blank) (4 blank, >Y and >Z, end!)
The first non-blank line in the Title Page Credit context is indented and contains the description of the role. It is followed by any number of blank lines, which are counted and become temporary value Y.
Next are credited names assigned to the role. There may also be throw-away lines containing “&” or “and” the amount of blank lines between each credited name (or throw-away line) may be less than or equal to “Y”, and if non-zero, the highest such value should become temporary value Z.
If Y=Z, once the blank line counter is greater than Y, the next non-blank indented line begins a new Title Page Credit.
If Z has been established, and Y < Z, and the blank line counter is greater OR EQUAL to Y, the next non-blank indented line begins a new Title Page Credit. If the blank line counter becomes greater than X and greater than Y, the context switches to Title Page Footer.
Title Page Footer
FIRST DRAFT Jan 8, 2025 (C) 2025 Jeffrey R. Day.
Any amount of additional indented or unindented text, including single or double blank lines, and including lines beginning with parenthesis, become the Title Page Footer. Indented lines will be treated as right-aligned (such as the name and date of a particular script edition or draft.) Unindented lines will be treated as left aligned (such as copyright and legal notices.)
End of Title Page
* End of Title Page
The first line, whether indented or not, that begins with a non-parenthesis, non-ampersand, and non-alphanumeric symbol, and optionally containing other material, is the final line of the Title Page.
Left Margin (Scene Numbers or Labels)
Any text on the left margin is considered a Scene Number or Scene Label. A scene number or label ends with a period. Any special context (such as Dialogue Context) that was previously active is suspended as soon as a new Scene Number or Label is encountered.
In proper indentation, this is at column zero.
1. EXT. COURTHOUSE
Indented Content
All regular content has at least one space of indentation preceding it.
Page Number
2.
A number, higher than 1, with a period. Any special context (such as Dialogue Context) that was previously active is suspended as soon as a new Scene Number or Label is encountered.
In proper indentation, this is at column 65 or higher (right-aligned.)
Scene Heading, Sub-Header, or Shot
1. EXT. COURTHOUSE
ALL UPPERCASE. Can continue onto additional space-indented lines if needed, as long as it remains in ALL UPPERCASE, and whether one or more than one line, may optionally terminate with a colon or period to move into a jointly-expressed action (see Action.)
Once specified, the Scene Heading, Sub-Header, or Shot, including the optional jointly-expressed action, is always followed by a blank line.
If the text begins with either INT. or EXT, or INT/EXT. or EXT/INT.. it is a Scene Heading, otherwise it is a Sub-Header or Shot:
HALLWAY
Sub-Headers and Shots are used for moving between locations, camera angles, or points of view, in the same scene.
In proper indentation, this is at column 10.
Action
The room is dimly lit with only a flickering candle.
Mixed case. When not jointly expressed with a Scene Heading, Sub-Header, or Shot, it always follows after a blank line.
In proper indentation, this is at column 10.
When combined with a Section Heading, there is no blank line before it, and it looks like this:
1. EXT. COURTHOUSE - NIGHT: Rain is falling.
As this continues after a Scene Heading, there is no associated indentation.
Character
PHILIP MARLOWE (V.O.) (speaking in a whisper)
Always follows after a blank line. Uppercase, but may optionally be followed by an extension in parenthesis. The following line will never be blank, which is what differentiates this from a Sub-header or Shot designator. Once a Character has been specified, we are in Dialogue Context up until the next blank line or page number.
In proper indentation, this is at column 30.
Parenthetical
PHILIP MARLOWE (V.O.) (speaking in a whisper)
Part of the Dialogue Context only. May cross multiple lines, but always begins with an open parenthesis as the first non-space character on the line.
In proper indentation, this is at column 25.
Dialogue
PHILIP MARLOWE Of all the office doors in all the back alleys of all of west L. A., what makes a broad like you come waltzing into mine?
Part of the Dialogue Context only. May cross multiple lines. Mixed case.
In proper indentation, this is at column 20. Dialogue should be a maximum of about 32 characters per line.
Introduction of Quoted Material
Any mixed-case line ending in a colon. After this, we may optionally have blank lines or a page break and page number, but if the next substantive line begins with a quotation mark we then enter Quoted Material Context.
The sign reads: "Philip Marlowe,
In proper indentation, this introduction is at column 10,
Quoted Material
While in Quoted Material Context, all lines are considered part of the Quoted Material.
Quoted Material Context remains open until a line ends with a colon, or ends with punctuation including a colon, unless suspended by a page break (or another page break), or by a Scene Number or Label.
"Philip Marlowe, Private Investigator."
In proper indentation, the quoted content is indented, usually at least as much as Dialogue, but may be centered or aligned as appropriate for the quoted content itself.
Transition
All uppercase followed by a colon, such as “CUT TO:”, or all uppercase enclosed in parenthesis, such as “(CONTINUED)”. This is allowed within or outside of Dialogue Context or Quoted Material Context.
(CONTINUED)
In proper indentation, this is at column 55.
Intercut
There are two ways of specifying an intercut. The first is simply a Scene-Heading, Sub-Header, or Shot which includes the word INTERCUT or INTERCUT BETWEEN in it. When this is done, a slash is often used to designate who or what is being Intercut between.
INTERCUT PHILIP MARLOWE / MOTEL OWNER
Intercut may also be achieved as a Transition reading “INTERCUT” or “INTERCUT WITH” followed by a colon, and having the the new SHOT or subject specified on the following line(s). The INTERCUT transition will be indented as a transition, and the SCENE HEADING, SUB-HEADER, SHOT or CHARACTER will be indented as usual (column 20 for CHARACTER introducing a Dialogue Context and 10 for all others.)
Outlying Concerns
Mixed caps: A THING. (followed by blank line)
In the above case, “A THING.” is just considered part of the described action.
Mixed caps. A THING: (continues parsing as a normal transition)
Mixed caps: A THING: (continues parsing as a normal transition)
Mixed caps. (A THING) (continues parsing as a normal transition)
Mixed caps: (A THING) (continues parsing as a normal transition)
In the above four cases, “A THING:” becomes a Transition. As long as the last non-whitespace character on the line is a colon, or the entire ending phrase of the line was an UPPERCASE in parenthesis, parsing continues as if it was a stand-alone transition on a line by itself.