Ornamental Breaks

Yes, and in fact there are two applied examples of this with the Tufte compile-format and the “Modern (Custom LaTeX)” format, both of which you’ll find when you switch to MMD→LaTeX / PDF.

The latter is probably going to be of more interest to you, as the Tufte class comes with its own baked-in stuff for separators, which I’m simply tapping into via the Separators compile format pane. Some of this may be stuff you are already doing, and may find you don’t need to adjust much to get things working. To check it out:

  1. Double-click the “Modern (Custom LaTeX)” format to duplicate and edit it.

  2. First go into the Separators pane and select the “Text Section” layout. You might need to copy and paste the custom separator text field out to a text editor to fully see it, as it has carriage returns. You’ll note this isn’t really LaTeX syntax, just some placeholder syntax.

  3. You’ll need to view the Replacements pane to see where that gets converted to LaTeX code. The reason for doing things this way is that it allows for an easier approach for those that prefer to put breaks in the main editor rather than split up the binder outline. It’s easier to read and type in “@ Section Break @” on its own line, than what it gets converted to. It also keeps the implementation more portable as the “front end” is rather agnostic to what class setup you are using, and indeed even file type, as we could convert @ Section Break @ to HTML or whatever else we needed.

    If that’s not an approach that interests you, the Separator setting could be simplified to just insert the LaTeX code directly.

  4. You’ll see it is using a \sectionbreak macro. To see where that command is declared, click on the LaTeX Options tab, and scroll to the bottom of the Header tab.

  5. I throw two different methods in, depending on whether one is using pdflatex (which you’ll get if you use the straight-to-PDF setting) or xelatex. With the later we can include a Unicode glyph using a system font (declared above). We’re using the \fancybreak command for this, via Memoir as well.

If you’re like me though, you may not want Scrivener exporting all of these .tex files when you compile, and rather have a repository of preamble and footer files in your texmf folder. That’s more of an MMD-specific question, as to how to set that up, but it’s relatively straight-forward if you follow MMD’s naming conventions for your .tex files:

  • mmd6-name_of_template-leader.tex
  • mmd6-name_of_template-begin.tex
  • mmd6-name_of_template-footer.tex

And now all you need to do is set the LaTeX Options pane to “None (use Metadata)”, and then add a metadata field called “LaTeX Config”, with the value being “name_of_template”. MMD will handle inserting the \input commands for these three files for you.

That’s the basic idea, let me know if there are any more specifics you need to get things working.