1. Home
  2. Docs
  3. Writing in Beat
  4. Advanced Fountain
  5. Macros

Macros

You can define macros to automate some parts of your screenplay. There are four types of macros: textdateserial and panel.

Macros are defined using curly brackets: {{macroType macroName = value}}.

NOTE: The macro gets printed out immediately when it’s first encountered. If you want to define the values first and use the macros later, you can put the first definitions in a boneyard at the beginning of your screenplay.

Text Macro

Text macros print out a simple text value.

INT. MY HOME – {{city = Helsinki}} We see the silhouette of {{city}} in the distance through a window.

Date Macro

The easiest way to include the output date in your document. {{date}} prints out the current date in ISO format unless you explicitly provide a custom format. For example:

Draft date: {{date d.M.Y}}

Result:

Draft date:

Serial Macro

If you need a number that increments every time it is encountered, you can define a serial macro using {{ serial yourVariable = 1 }}

{{serial yourVariable = 1}}, {{yourVariable}}, {{yourVariable}}

Result:

1, 2, 3

Use .sub modifier to add sub-serials:

PAGE {{serial num = 1}} Panel {{num.sub}} Panel {{num.sub}} PAGE {{num}} Panel {{num.sub}} Panel {{num.sub}}

Result:

PAGE 1 Panel 1 Panel 2 PAGE 3 Panel 1 Panel 2

Panel

{{panel}} is a global serial number for comic book panels which automatically gets back to zero after a top-level section. It’s very similar to {{serial}} but it’s an automatic and global singular value, so you can’t have multiple panel variables.

.PANEL {{panel}} .PANEL {{panel}} # New section .PANEL {{panel}}

Result:

PANEL 1 PANEL 2 New Section PANEL 1