Error generating manual.tex from website

Hi,
I decided to download the Scrivener source of the User manual (the old and new testament…[url]https://forum.literatureandlatte.com/t/placeholder-tags-numbering/35718/2]. Following instructions I installed Mactex distribution, I extracted the render_folder_mmd directory and compiled only the introduction. I got this message:
2019-02-08_19-11-16.jpg.
INside the folder there is the manual.md but the tex file is empty.
I searched in the script and I found that probably the problem is this:

[code]# Generate a LaTeX file and continue processing using the output

mmd_proc = IO.popen(’/usr/local/bin/mmd2tex’, ‘w+’)
[/code]
I’m sorry but I’m a total newbie about latex.

Yup, that’s a problem of blindspots—thanks for posting it!

I have MMD installed on my machine, and the path in that line of code is pointing to one of the helper scripts it installs. So for me it has always worked fine. I’ve changed the script so that it first checks for a local installation first, and then if that fails, attempts to use the copy stored inside Scrivener itself.

It will be a little while before I update the project on the site, but the problem is easily remedied by installing MultiMarkdown on your system. It can be a useful tool to have around if you’re thinking of venturing into this way of building LaTeX files.

Alternatively, if you’d rather not install anything, then you could fix the script in your copy. Change the line you posted to:

mmd_proc = IO.popen('/Applications/Scrivener.app/Contents/Resources/MultiMarkdown/bin/multimarkdown -t latex', 'w+')

I wouldn’t consider debugging a custom post-processing script a typically necessary task. :slight_smile: In most cases just setting Scrivener to compile MMD → LaTeX is good enough. I’m inclined toward using any *NIX laying around, though, so that’s how this particular project gets the final .tex file assembled. But, good to know it can, if you’re inclined toward that kind of automation and fine-tuning as well.

Sorry sorry, I haven’t installed MMD6 yet :mrgreen: . After installation .tex file is created but…I typeset this file using xelatex in texshop and I got …this2019-02-09_00-10-37.jpg

I ran into this very problem a while back, in an earlier version of TeXLive-2018. I had to implement a workaround, but then in a later update I found the old method worked again. So, if you haven’t run the updater in a while, I suggest doing so.

It could be it’s broken again and I’m the one that is out of date though. If that is the case, open the ioa-lnlman-header.tex file to line 42. Comment out line 42 and remove the comment status on line 47.

I should look into this one again. It’s a configuration line for setting the amount of left indent in the table of contents lists that follow major chapters. I have a feeling I may be using an old deprecated method of doing so.

Worst case you could comment out 42 and 47 both. The ToC lists would just be a little off-design.

I updated mactex distribution. In spite of recent download there was a lot of new files to download.
I ran again the compile process (I decided to select tje writing chapter. I selected xelated in texshop and clicked on typeset.
Sadly I got a new problem:

Definitevely I can’t compile nothing from the user manual. :unamused:
2019-02-09_15-22-51.png

Hmm, it’s acting as though it doesn’t recognise some of the PDF output settings for some reason. Did you install with the full MacTeX download (~3.5gb) or the compact download?

Well since my own preamble files have changed since I put that set together, I’ve attached what I’m currently using. For myself, I can unzip this folder into a brand new blank Mac account, open the .tex file and typeset it. I tested on 10.12.6 (with TeXLive 2016) and 10.14.3 (TeXLive 2018). The latter is slightly out of date, so I’ll give it all another test once it is.

I’d be curious if this folder works. I should also note it has a sample “snippet.tex” file that I compiled from the latest version of the manual that you can test with, along with any files you compile.
render_folder_mmd.zip (269 KB)

I installed the large Mactex (3,5 giga).
The error message also with this tex file is the same

With no tex files I can get pdf.

ioa-lnlman-copyright.png

A little addendum:
I tried also to compile latex through “pandocomatic+scrivomatic” method.
I tested two project:

  1. the first one was the sample workflow.scriv keeping the same pandocomatic settings
  2. my sample project using Ian’s pandocomatic.yaml (I downloaded the whole directory). The only problem was to modify fonts in latex template in consideration that I haven’t them installed.
    No problem in typesetting using xelatex in both of them.
    Then I don’t believe that something in my installation is wrong.

The individual .tex files wouldn’t typeset on their own, so that would be expected.

What looks like it might be the problem is that not all of the files are being included as they should, but it’s also weird that you’re still getting \hypersetup commands in your log file output, since I removed all of those in the .zip file above. Are you sure you removed the older rendering folder and targeted the correct one with compile?

I would think it is okay as well, I just use a default installation myself. But as for using a different system successfully, it’s probably pretty vanilla in terms of which LaTeX packages are being used and such. The user manual has a lot of customisation that required a bit of a balancing act to get it all working together.

Hi, I am also trying to replicate the manual from the project file (- really great that it’s available! -), in order to learn how to make Scrivener generate a workable LaTeX ouput. So far it’s working fine but I get a fairly plain looking PDF (with a grey background, weirdly enough), see screenshot of ToC below. Is that how it’s supposed to be ? Is that just because all the design features (images, fonts, etc.) are stripped away for copyright reasons ?

I really love the style and look of the manual so I was hoping to be able to create something like it… If you can point to any place where I may get similar fonts for instance I’d be really grateful. And on another note I was wondering how difficult you think it is to learn how to set up Scrivener so that it will generate a workable tex file via MMD/Pandoc. I have worked with LaTeX (though i’m very far from proficient - i’ve typeset an MA thesis but often don’t understand what’s going on at all and don’t have any kind of programming background) and I’m completely new to MMD/Pandoc. Would much appreciate your advice

My guess is that you have a generic compile Format selected in the left sidebar, rather than the one indicated in the instructions for setting this up? Not sure about the grey background, that is a little odd, but the overall look of this definitely is stock Memoir (which as you can see is tuned more for proofreading than final output). I’m actually surprised that works at all! It looks like, with the exception of one custom command you can skip over, the project is overall decently abstracted from its particulars.

By the way, have you gone through the readme at the top of the binder yet? You can skip straight to the compiling subsection if you are less interested in the project design theory stuff. I mainly wondered if you have because you ask about fonts and images—two things specifically itemised at the very top of the instructions. :slight_smile:

Oops ! Thanks for pointing that out, my bad… Now I managed to replicate the user manual in the correct formatting (the console stopped a few times, and I hit enter, but it worked in the end.

I did read the part on fonts and images in the binder of the manual project but didn’t fully understand it. It says: “Consequently the copy you will be working from will reference system fonts that nonetheless reflect the character of the original PDF”. Does that mean it substitutes the copyrighted fonts with similar ones? In the front matter of the manual there’s a few of them listed (Effra, Bauer Bodini,Calluna). So I am guessing my copy uses different ones that are akin to these? Does it say which ones they are?

Finally I’d like to know whether it’s okay to work with the user manual settings and project format for one’s own projects. And would you recommend doing that, i.e. starting from these and modifying them, or would you recommend setting up everything myself ? As mentioned I don’t have a background in MMD or Pandoc and I’m still new to Scrivener. I don’t need any maths, special characters, etc. but I don’t see a good alternative at the moment ( as from what I understand Scrivener doesn’t take care of the typesetting and Word isn’t really an option) and I do appreciate professional typesetting. I’ve worked with LaTeX before (but not proficient).

The fonts listed on the copyright page were ones we purchased the rights to use, but not to distribute (that is way more expensive!). You can find the full system font listing in the ‘ioa-lnlman-fonts-distrib.tex’ file, and that is where you would make adjustements. But the main ones are Avenir Next for headings, Palatino for body text and Bodini 72 for chapter/part pages.

As for adapting this for your own use:

  • MultiMarkdown is more the engine used to turn basic Markdown into LaTeX, it is a shortcut to getting to that point. If you’ve ever used Markdown in any context before then you know the basics of how it is typically used to generate HTML; it’s the same idea. MMD is an extension of that concept into several different file types, LaTeX among them. It has a nice learning curve in that you don’t need to learn much to make an effective document with it, and what you do learn can be used to make all kinds of documents.
  • So, like a Markdown file, that all by itself has almost nothing to do with what a document looks like. I leave the asterisks in here to emphasise the point: that’s all it looks like and that’s all it says: that the word ‘nothing’ should be emphasised. So it’s a bit like LaTeX itself in that regard, where with LaTeX it would be \emph{nothing} (again, rather than what it looks like in the end, with fonts and italics).
  • I could in theory skip MMD entirely and have Scrivener generate all of the LaTeX itself. That is a concept demonstrated in the “General Non-Fiction (LaTeX)” project template that you’ll find in the Nonfiction section when creating a new project. I prefer using an agent in the middle though, in part because Scrivener is a great platform for generating and automating MMD anyway, and also because I prefer to use as little word processing type formatting as possible, so if I’m going to be typing markup, I’d rather type in Markdown than LaTeX.
  • So for the design of the document itself, that is 100% LaTeX. I suppose the key thing is that with a Markdown approach you are not bound to that choice. If that’s what works for you, it is there, but it also works with formats that route through traditional desktop publishing as well.

At a very basic level it is dirt simple. Create a new blank project, type in “Hello World!”, use File ▸ Compile…, select MultiMarkdown → LaTeX, pick the “Modern (Custom LaTeX)” format and hit the compile button (no need to assign layouts unless you really want to). It’s not even any more steps than you’d take making an RTF file with Scrivener.

I suggest that “modern” Format as a starting point, because it demonstrates how you can embed a document design right into the compile format. Check out §24.12, LaTeX Options for further information.

Basic “hello world” demonstrations aside, I’d start with chapter 21 of course. If you need a primer on Markdown or the MMD dialect itself, there are links to that in the introductory portion of that chapter. It mainly focusses on how to apply that to Scrivener, and what to expect of the latter in how it can help take care of some of the more manual-labour aspects of it (like organising images and linking to them).

Being new to Scrivener as well—well if you’re going about learning it through the user manual project it may be a bit of a learning wall. I don’t know to be honest, but I suspect it would be given how I make use of just about every nook and cranny in the compiler and a good amount of what the project window itself provides as a writing platform. None of it was designed with the concept of providing an easy learning gradient from zero, is what I mean to say. But if you’re like me, sometimes that can be the best way to learn, I like tearing into large working examples.

The specific look as a whole is ours and one we reserve as distinctive for our materials. But please feel free to use pieces of it as starting points for your own designs. We don’t care at all if you use the call-out box implementation for your own—it’s more a matter of taking the whole colour palette and so forth as presented and applying that to your own project.

Thanks so much -that’s very helpful advice!