That’s correct, the yellow box is a paragraph style that goes around the whole call-out. I use the feature that draws a yellow box on the styled text—that doesn’t exist as formatting, it’s just a semantic cue for myself. The box heading is then a character style within that paragraph style.
The mdframed package doesn’t require a box to have a heading, it’s just a convention I like to use so that one can skip over boxes that do not pertain to them. There is another variation of box in the manual that contains tips for those upgrading from Scrivener 2. In those I don’t have a heading in the editor, because they all use the same heading. I just use the paragraph box (a different style, to generate a different box code in LaTeX) in that case and the heading itself is hard-wired to that box style.
I did leave those out since the syntax itself is currently in flux. The method you mention is what you’d use in MMD5 and lower, but in MMD6 you’ll need to use a code spans or fence blocks. The full prefix is:
`\begin{callouttip}`{=latex}
LaTeX blocks, if you’re curious, are:
```{=latex}
Blah blah...
```
Even though at the moment Scrivener has MMD5 integrated, I would recommend using MMD6 notation at this point. The 3.0.3 upgrade will be using the latest version of MMD, and it will be out in a matter of days. If you need to start testing output right now, you can install MMD6 yourself; Scrivener will use an external installation over its own copy.
In my opinion that very problem is solved elegantly by this particular way of working, in conjunction with Scrivener’s compile Format system. There is no LaTeX in the editor at all for this call-out box—just the styles. Everything that makes this text become LaTeX code is in the compile format and nowhere else. Hence, if we switch to a format designed to generate an ePub, we can do something entirely different in the prefix/suffix fields for these styles, like this for the style prefix/suffix:
<div class="callout"> ... </div>
For the style’s paragraph prefix/suffix (this goes around each line within the styled range:
<p> ... </p>
The heading character style’s prefix/suffix:
<span class="callout-heading"> ... </span>
And the rest would be handed by CSS naturally. The resulting output from Scrivener would be:
<div class="callout">
<p><span class="callout-heading">The Heading of the Box</span></p>
<p>The first paragraph of the call-out</p>
<p>Second paragraph...</p>
</div>
You can have raw LaTeX in the editor as well—I do in fact in the user manual, as there are sometimes one-off things I need to do. So I have a “Raw LaTeX” character style that I use to mark those bits of text. That character style wraps the text in MMD’s above syntax for passing it through.
When I finish making the ePub generator for the user manual, I’ll be checking the Delete text of this style option in the Styles compile format pane. I could conversely have a “Raw HTML” style that was excluded from the LaTeX compile format if I wanted, and so on.
The answer is “yes”.
- For simpler preambles you could go into the LaTeX Options compile format pane and set the document class to “Custom”. Now you have full control. Refer to §24.12, LaTeX Options in the user manual for info; pg. 635. That’s nice as it keeps the entire design in the compile Format itself. Easy to share with others or copy to other machines.
- For the user manual—there are around 600 lines of preamble to achieve this look—I want to keep a complex setup like that on the file system so that I can easily edit it in my text editor. You should make use of the “LaTeX Leader”, “LaTeX Begin” and “LaTeX Footer” MMD metadata tags to refer to .tex files. Those files should either be in your compile output folder, or somewhere in your texmf path.