How to Add Writing Ideas to a Document

I’m writing a world-building document and need to add creative notes outside the main text. However, comments serve other purposes, and I want these creative notes to be flexibly selectable for display in the final output document based on settings.

For placing notes outside the main body of text, there are some packages that make it easy utilize the margins. For instance:

For optionally including them in your document you can do something simple like this:

#let include-all-comments = true

#let comment(comment-body) = if include-all-comments {
  //Anything you want for formatting your comment (including using packages)
  set text(red)
  comment-body
}

//Your document where you may include as many comments as you want
#lorem(5)
#comment[Some text]
#lorem(5)

Changing include-all-comments from true to false will prevent any of the comments from rendering in the output document.

1 Like