mmd->latex: how change some default setting in memoir outpu

Ciao everybody.

I write in mmd and I print with: mmd to pdf (via LaTeX).
I don’t like to export a dot-tex file and work on it in texshop.

I need 2 things:

  1. to change the word ‘Chapter’ into a new term:‘Articolo’. So I can see Articolo in the header of the pdf document and in the TOC.
  2. to have more levels in the TOC.
    In example: part-articolo-sub_articolo (at least)

What should I change in the files mmd-memoir-xxxx located in texmf folder (or into the application package)?

In which of that files (mmd-memoir-something I should to work on?

What’s the mode in which scrivener compiles those files?

I think the order should be:

[1] mmd-memoir-header.tex
[2] mmd-memoir-setup.tex
[3] mmd-memoir-layout-8.5x11.tex
[4] mmd-memoir-packages.tex
[5] mmd-memoir-begin-doc.tex
[6] mmd-memoir-copyright.tex
[7] mmd-memoir-footer.tex

I don’t know what to do for obtain my 2 goals.

Thanks in advance,


Both of your first two queries of course relate to how the LaTeX preamble is set up. I would download the Memoir class documentation, which is easy to read and will thoroughly explain how various things like ToC depth and chapter titling can be manipulated. One of the nice things about Memoir is its deep level of customisation. In most cases you will be adding code to the alternative texmf files rather than changing anything, because MMD takes a fairly “vanilla” stance toward setup. So to change the chapter style for example, you don’t have to locate where the chapter style is currently configured because it isn’t—it’s just left to default and thus any chapter style coding you insert will override how it currently works.

So for all of that, there isn’t much that you would need to do in Scrivener short of setting up the meta-data to use your personal .tex preamble files instead of the stock boilerplates.

I’m not sure what you mean here, there isn’t a mode for this, it just depends on how you set up the MultiMarkdown document, how the .tex file will be assembled and ultimately the PDF. Perhaps the missing piece in the puzzle is in the LaTeX Options compile pane, where you need to set that to “None” instead of a prefab? Note here you could also use Custom and just put your entire preamble into the three provided inputs—I use that technique for some things as it can be nice to keep all of the TeX data in the compile settings.

Thank you, AmberV

Your answer is clear --for me-- in theoric line and I understand it (maybe).
I am not a LaTeX expert. I use several functions of LaTeX --in scrivener-- but I am not able to go in deep of it.

If I needed a package (quoting, babel etc) I inserted it in the mmd-memoir-usepackage.tex file (in texmf folder) and it was loaded; I can see the result with multimarkdown-pdf print option. Simply (for me).

About my questions.

Question # 1

For the problem with the word Articolo instead of Capitolo I think I have solved. If it is a correct solution.
May you tell me what do you think about it?

This is what I done:
In Compile, LaTeX Option, LaTeX document class => Custom, Header window I added \addto\captionsitalian{\renewcommand{\chaptername}{Articolo}}

here is the code, take a look to the last line

%Configure LaTeX to produce an article using the memoir class



% Use default packages for memoir setup

% Configure default metadata to avoid errors

\addto\captionsitalian{\renewcommand{\chaptername}{Articolo}}  % aggiunto da F.

This works fine. And don’t overwrite the mmd-memoir-header.tex file in the txmf folder or in the package of scrivener.
So I think it is only for the file I am working.

Question n. 2

I think I must add somewhere In the LaTeX opines this snippet:
and I’d have the TOC like I desire.
But, after several random attempts I don’t understand where I must insert it.

Could anyone help me?

Last but not least (@ AmberV or any other)

Could you tell me where I can find documentation about how to work in the compile, LaTeX option panel?
I haven’t problem to study but I don’t find documentation with any examples about to do that in scrivener.
Do you have something I could see for learn?

Probably if I see some example (that works) I can understand better and concentrate my efforts in that direction, and studying LaTeX to get what I need.

Can anyone show me some example of his set-up works?

Thanx in advance.


I’m not really a LaTeX expert either. When I made look & feel for the Scrivener documentation, I had to look every little nuance up, and it took me a while to put it all together. But the nice thing about it is that once you have a look you like you can easily apply it to new documents in the future. The Scapple documentation took me maybe a day to put together the LaTeX for, and most of that was just ironing out any MMD2 vs. MMD3/4 wrinkles. So hopefully someone more knowledgeable comes along, because I’d have to do as much research as you did to say whether or not what you did was right (though often if it works when you typeset, that’s good enough to consider it “right” even if there may be a more theoretically pure solution). :slight_smile:

I can answer a few general questions off of the top of my head:

Anywhere before the \begin{document} command (all of which is referred to in general as “the preamble”).

Head over to our support page and grab a copy of the Scapple .scriv project. You won’t be able to typeset it to PDF because I use external dependencies, but all of the mechanics of how it is put together should be easy to pick up on, and if you typeset to .tex you should at least be able to see how it outputs. Most of the heavy lifting is done in two places: the LaTeX Options compile pane, and the Replacements compile pane. All of this is explained in the README file at the top of the Binder.

Thanx a lot.

I have downloaded the guide. I’ll read it tomorrow.
Now is very late and I need to go out … I’m tired.
Only a question, so tomorrow (for me) you’ll have already answered at my back in office.

How do I prepare and load the project format? The one I see in the compile panel: Format As: Scapple User Guide.
I go in the ‘manage Compile format presets’, I see import but do not understand what should I do. How to write the preset (what is the format? dot-tex? dot-txt?) and how to load it in scrivener.
It is interesting to see in the ‘Project Preset’ window the name of the new preset and the check-box. This means I can have two or more presets for different choices?



You don’t actually need to load anything “into Scrivener”. Each project saves its compile settings implicitly, so really you don’t need to mess with presets at all. Just flip through the different compile panes to see how this particular project is set up. Like I say this will just demonstrate how you can embed a LaTeX boilerplate directly into a project’s compile settings, using the Custom tabs in the “LaTeX Options” compile pane. You can follow that route, or you can make your own boilerplate .tex files based off of MMD’s examples, and specify those using MultiMarkdown meta-data syntax. Either way works fine. I chose to embed them into the compile settings as a demonstration of that capability, so I could easily distribute a project that makes a complete .tex file on its own without any separate things to install (though like I say, if you want to actually typeset it to PDF you will need extra materials).

That aside, if you do want to make the Scapple format available to other projects, you can just copy and paste presets between tabs here in this Manage window. The Import/Export buttons are for moving presets between computers or sharing them with other users. You generally do not need to use those buttons.

You may want to skim through §24.5 (pg. 356 – 8) of the (Scrivener) user manual for further information on using presets, if all of this is new to you.

Precisely so! The checkbox just means it will be shown in the Format As menu—if you disable the checkbox it will hide it from the menu. But a project can have multiple presets stored for it.

In fact the next version of the Scapple documentation project will have two presets: one that formats the project for Mac and another that formats it for Windows. I’ll be able to just flip between the two presets to compile PDFs for respective software updates.

Thanx, AmberV.
Very clear answer.

Ok I agree, I need to re-read the scrivener manual. I’ll do it. :slight_smile:

I don’t know this method and your word makes me curious about it.
Where must I put my own boilerplate .tex files based off of MMD’s examples?
Do you have an example of it?

I know a little bit the first way you traced.

This means that if I build my own LaTeX preset I can’t print the document in pdf?

  • What are the extra materials that I need for typeset in pdf?
  • Where can I find/study it?

I searched them in the scrivener manual but I didn’t find anything (a quick search… in truth).

In other words:

  • my goal is to build by myself one or more preset that I could use for print mmd—>pdf document that must have many peculiarities (features in English?) of LaTeX without to pass to texhop or texcnicle or other.
    What do I need or what I have to do to achieve the goal?

[^note 1]: I Tried to export your scapple manual in .tex and than compile it with texshop but it didn’t work and gave me many errors.

Well, MultiMarkdown just uses the \input{…] method for bringing in boilerplate .tex files. So all you need to do is have your files somewhere in the texmf path. As for the meta-data MultiMarkdown requires, the easiest way to see how this works is to observe how Scrivener does it. Try setting the LaTeX Options pane to “Memoir” and compile to plain MultiMarkdown. At the top of the file you will see how meta-data is defined and in particular, the sequence of the .tex files that are included.

So if you wished to make a minor modification of the memoir system, you could put the copies of the .tex files that Scrivener creates when you compile to .tex into the appropriate location in your texmf folder, and edit your custom chapter stuff into them. If Scrivener detects you have your own batch of boilerplate files in ~/Library/texmf/tex/latex/mmd, then it will use those instead of using the stock vanilla files.

I suppose what I’m ultimately saying here is that you’re going to have to get your hands a bit dirty with LaTeX if you intend to use it in any way beyond the very basic vanilla output you get from the LaTeX Options pane—even if you just always compile to PDF and never .tex. If you want to customise at all you’re going to have to tear things a part a bit and see how it all fits together so you can know where to customise and where not to.

It’s possible to only use the PDF export, don’t get me wrong, but using it without knowing anything about how it got to be the way it did, and trying to modify the output, is going to be frustrating a fear. It would be easier to start at the basics, the plain MultiMarkdown file, see how that works, then see how the .tex file is created, and finally once you understand these components, you can make a streamlined PDF workflow that is customised how you want it.

For the Scapple document you would need to install the URW-Garamond font into your LaTeX system, acquire a copy of the AppleKeys style and associated PDF vector graphics for the Mac keyboard shortcut glyphs, and our company logo file. I would say it is more trouble than it is worth because you will not learn much about how to work with your document, from assembling the components needed to typeset the Scapple document. The important stuff is in the compile settings.

I would say that goal is achievable using the learning method I described above. Don’t be discouraged that the Scapple project does not compile to PDF. Even I can’t do that, and I can only typeset it in TeXShop because I’ve installed a bunch of stuff. Like I say, that’s not the important part. The important part is the method used in the Custom LaTeX Options which let you just put your custom boilerplate right into the Compiler and save it as a preset.

I think that will be the easiest way for you to learn. If you copy and paste the contents of those three tabs out and examine them, you’ll see how they form the framework of the .tex document—where the rest of the project fills in the main matter within it. Use these principles and see if they work good for you. If not you can use the external file method with MultiMarkdown meta-data. It takes a little more work to set that up—but it is also more flexible. I personally think you’ll be fine using the three tabs in the compiler.

Great answer!
I haven’t other words… (you could say that is because my english is not good enough for find them :smiley: but, really, I think your answer is very near to what I would have want to hear)
I’ll study it and re-read it step by step many times.

Thanx again.


I think (and hope) this post would (and will be) useful for many users.
Maybe the title is not so good for his contents but I don’t find another one better!
If you think it will be useful to change it then change it!

I solved the problems asked.
Added in the LaTeX option panel - Header these commands:

I found in the web a very good document MemoirChapStyles.pdf that contains code and images of many chapterstyles embedded in memoir.
I changed the default chapaterstyle (in the Begin Document of the LaTeX option panel) and chose madsen. Very beautyful.

I would try to change madsen with

  • daleif3
  • GreyNum
    I can not set these codes correctly. Pdf printing is not as it should.
    Has someone done the correct set-up of these chapterstyles?