mmd print pdf

Fr
Frix
Posts: 24
Joined: Thu Feb 07, 2013 11:34 am
Platform: Mac
Location: Italy

Thu Feb 07, 2013 3:37 pm Post

Ciao Everybodies,

I use 'compile' --> MultiMarkdown --> PDF. It is very usefull.
I am not able to use LaTex … yet.
I need to have -in the compiled pdf (memoir class)- the words: Part/Chapter/Contents/Table not in English but in another language. How can I do that?

Thanks in advance

Frix

User avatar
AmberV
Posts: 24332
Joined: Sun Jun 18, 2006 4:30 am
Platform: Mac + Linux
Location: Ourense, Galiza
Contact:

Thu Feb 07, 2013 9:47 pm Post

I'm not precisely sure what steps are necessary from the LaTeX side of things, to do this, but surely everything can be done somewhere in the preamble, and the best way to get about that would be to set the LaTeX Options panel to "Custom" and paste in the desired preamble. There are three tabs, basically you want top level stuff in the header tab. MMD inserts your meta-data after that file, so anything that needs meta-data like the title page, should come in the Begin Document tab. Then content of your work will appear, and finally the footer tab is where all environments are closed out.

If you need some examples to start from, you could try compiling to LaTeX and examining the files that Scrivener produces. But that is how you customise the output. If you require further optimisation or customisation beyond what can be done in the preamble, you may wish to consider switching over to the LaTeX workflow. The PDF output is there as a convenient tool, but it isn't intended to be anything more flexible than a quick proofing system.
.:.
Ioa Petra'ka
“Whole sight, or all the rest is desolation.” —John Fowles

Mr
MrGruff
Posts: 208
Joined: Tue Jun 05, 2007 4:22 pm
Location: UK
Contact:

Fri Feb 08, 2013 8:29 am Post

The basic command to turn all that automatic text into Italian is very simple:

Code: Select all

\usepackage[italian]{babel}


Once that is put in the right place you should get things like Figura 2.1, sezione 4.2 and CAPITOL O4.

As to where that goes in Scrivener, I'd follow Ioa's recommendation and put it in the Begin document tab.

When you find you need to go beyond the simple PDF method and start to customise more (and it is when, not if), then the command needs to go in one of the MMD help files. I'd suggest MMD-memoir-packages.tex which sets up all the packages used in typesetting.

There's more on internationalisation here: http://en.wikibooks.org/wiki/LaTeX/Internationalization

Fr
Frix
Posts: 24
Joined: Thu Feb 07, 2013 11:34 am
Platform: Mac
Location: Italy

Fri Feb 08, 2013 3:50 pm Post

thank you all, guys,

tomorrow I'll try your solutions.

@ MrGruff
for LaTeX/Scrivener/mmd I think that 'when' is ...... next weeks :D
but I needed a solution for 'now'.

thanks again

Frix

Fr
Frix
Posts: 24
Joined: Thu Feb 07, 2013 11:34 am
Platform: Mac
Location: Italy

Sat Feb 09, 2013 10:10 am Post

Hi,
I have done what you tell me (thanks again) but i think there is something that i don't understand and that I don't Know (mea culpa).
So, now I have a document in Italian but it don't has the division in part/parte - chapter/capitolo and so on.

The tables are ok but the index is not ok. I have only a word called <Indice> (Index in english) that is (also) replicates in every header of every page (at the top where i see the page numbers).

Ok, I Know it, I need to study LaTeX (and I think I'll like to do it).

But for now can someone tell me how to find examples (if there are somewhere) of documents setting (header + begin + footer) for scrivener so i can start to study with a real application of the correct typesettings?

I have read ScMLGuide.pdf (thanks Huw Evans).
Someone think if it would be possible for me to find the settings (LaTeX commands) for that document?

I found in the web a <.plist> file -its name is: <MMD to latex> - and imported it in scrivener but it seems to have old commands (this is what Tex Shop tells me) and is too many complex for me (now).

Thanks in advance

Frix
Last edited by Frix on Sun Feb 10, 2013 7:44 am, edited 1 time in total.

Fr
Frix
Posts: 24
Joined: Thu Feb 07, 2013 11:34 am
Platform: Mac
Location: Italy

Sat Feb 09, 2013 11:50 am Post

Sorry, I apologize.

I had, in the compile\Contents, every documents with: <As-Is> selected! :(
So my document section was disabled.

----
For the rest...

I think I have solved my original problem:

- in application folder I have explored the scrivener contents package (right clic on the icon), found MacOS\MultiMarkdown\latex-support folder, and chosen <mmd-memoir-packages.tex> file,
- (saved an original copy on the desktop, for security) opened the file and inserted <\usepackage[italian]{babel}> under <\usepackage[utf8]{inputenc}>;
- came back in scrivener, compiled with option: MultiMarkdown -> PDF .... and <voilà> my document was ready in a beautiful pdf.

It was very simply like MrGruff said!

Next weeks it'll be time I'll start to study LaTeX and his integration with scrivener.

Thank you very much!

Frix

User avatar
AmberV
Posts: 24332
Joined: Sun Jun 18, 2006 4:30 am
Platform: Mac + Linux
Location: Ourense, Galiza
Contact:

Mon Feb 11, 2013 12:09 am Post

Ah yes, "As-Is" when using MMD means that no title will be output. This can be very useful if there is one section in your binder that is not really a visible division in the book, and just there for your benefit.
.:.
Ioa Petra'ka
“Whole sight, or all the rest is desolation.” —John Fowles

Fr
Frix
Posts: 24
Joined: Thu Feb 07, 2013 11:34 am
Platform: Mac
Location: Italy

Mon Feb 11, 2013 9:26 am Post

Hi
1) I think that -maybe- for the correct LaTeX sintax, the right position for <\usepackage[language]{babel}> (into the scrivener package) would be directly under the 'class declaration'.
2) In my solution it is necessary to make a copy (a simply backup) of the new '.tex' files in the scrivener package (those I had modified), in case of an update (of the app.) that might change MultiMardown folder;
3) Is it possible that [peg-multimarkdown] would be -already- the content of the scrivener package (the MultiMarkdown folder in Contents\MacOs)? If Yes, would it be necessary to update those files that are newer in the GitHub repository? [I had installed MacTeX but now I did not found any 'texmf' folder in my mac]

What do you think about?

F.

Mr
MrGruff
Posts: 208
Joined: Tue Jun 05, 2007 4:22 pm
Location: UK
Contact:

Mon Feb 11, 2013 2:33 pm Post

Glad to hear you got it working. Your suggestion about where to put the language declaration seems reasonable.

If you are going to start customising your setup then you will probably find it easier to have your own installation of MMD outside of the Scrivener package. You will need to install MMD and the latex support, and also the tex files. You can then keep that up to date yourself. Scrivener is configured to use an external installation of MMD in preference to its internal installation.

You will have to create the nested folders for the mmd .tex files by hand as none of the applications involved create them.

User avatar
AmberV
Posts: 24332
Joined: Sun Jun 18, 2006 4:30 am
Platform: Mac + Linux
Location: Ourense, Galiza
Contact:

Mon Feb 11, 2013 11:42 pm Post

You can get by with just installing the LaTeX boilerplate files in a position that your distribution will locate. With TeXLive for the Mac, for instance, this is in the `~/Library/texmf/tex/latex/mmd` folder. Scrivener does a brief check in that location for the presence of those files, and if they are discovered, it won't even export them to the compile location, as LaTeX can pick them up right where they are already.
.:.
Ioa Petra'ka
“Whole sight, or all the rest is desolation.” —John Fowles

Fr
Frix
Posts: 24
Joined: Thu Feb 07, 2013 11:34 am
Platform: Mac
Location: Italy

Tue Feb 12, 2013 8:50 am Post

thank you, guys, for your usefull posts.

I think that, for the early 'trip' in LaTeX, Scrivener and his direct compile 'mmd to pdf' is a very interesting option. It is easy and fast. And don't need to go too deep in the LateX sintax.

But I'll try to go ahead -deep in LaTeX- following your interesting tips.

User avatar
AmberV
Posts: 24332
Joined: Sun Jun 18, 2006 4:30 am
Platform: Mac + Linux
Location: Ourense, Galiza
Contact:

Tue Feb 12, 2013 8:56 am Post

You really don't have to dig too deep into it to make a few important changes. And the Memoir class, which is the base that Scrivener's boilerplates use, is almost another macro language on top of LaTeX. It is often easier to read the documentation for memoir to make some pretty cool overall changes to the way the work looks. It is an extremely comprehensive class with a lot of features. And all of these can be made in such a way that direct to PDF can still be used. The cases where PDF will not be as useful is when further post-processing is done, such as assembling a glossary or bibliography. For most simple documents it really can be tweaked to do almost whatever you want, it's just a matter of reading up on a it a bit here and there as you need to.
.:.
Ioa Petra'ka
“Whole sight, or all the rest is desolation.” —John Fowles

Fr
Frix
Posts: 24
Joined: Thu Feb 07, 2013 11:34 am
Platform: Mac
Location: Italy

Tue Feb 12, 2013 1:54 pm Post

I agree.

Now I am writing few technical reports: buildings evaluation and preliminary city-planning documents with a lot of tables, internal cross-reference and external links.
Scrivener-MMD-LaTeX is the right choice for these kind of works (in my opinion).

But in the next months -for the advanced phases of some of those works- I'll need more and it'll be time to go deep in LaTeX, i.e. with bibliography and glossary, like Amber said, and with reference/citations/quotes and, last but not least, I should need (or best .... I should like) to write notes in the margin of the text (not only footnotes).

I use scrivener since many years but mmd (and LaTeX functions) since few time. This was a very usefull and fascinating discovered.

I started to reading (not studying ... yet) some documents to learn 'How-to' with LaTeX..
In Italy there is a highly competent community about it.
But LaTeX, in himself, is a little bit different (and more difficult) than Scrivener-MMD-LaTeX. is.
So I think the second is the best choice for me.

My next step will be to learn how to do -in scrivener- the things I need in the advanced phases of my work (see above). And if it will not be possible in the Scrivener process I shall learn how to do it in LaTeX.
I am not interested in to change 'memoir' or 'article' settings like margins or other typesettings rules.
These classes are ok for me (now).

This is my road-map.
I hope I shall be able to do it.

User avatar
AmberV
Posts: 24332
Joined: Sun Jun 18, 2006 4:30 am
Platform: Mac + Linux
Location: Ourense, Galiza
Contact:

Tue Feb 12, 2013 10:23 pm Post

If you poke around in this section of the forum you should find some useful tricks to extend the usefulness of Scrivener, and by extension, MMD beyond where they probably could feasibly be taken by themselves. The ability to inject raw LaTeX into the document with HTML comments gives you a lot of extra power, and in turn Scrivener's ability to replace one text with another while compiling makes that easier for you to key in. You can make up your own little private syntax that is converted to full code when you compile. There are other little hooks throughout the compile setting system that can be useful. For example in the inline annotation section, you can specify custom enclosing markers around an annotation text (if it is left in). Hence, you could type "<!--\sidebar{" into the left one, and "}-->" into the right one, and there are your margin notes. Inline annotations would look like this, "<!--\sidebar{This is the content of the note}-->", but only when compiled. You just see the note content in a pretty bubble.

Image
(Sorry for the confusing screenshot; that is Scrivener in the background despite looking as though it is embedded in our forum page. I keep a very minimal window. :))

As you can see, the \sidebar environment is meant for true sidebar annotation, not the pretty call-out margin boxes that appear within the text block area. If that is what you meant you may have to poke around for an add-on style you can use to enhance the document; Memoir does not have a built-in structure for that.
.:.
Ioa Petra'ka
“Whole sight, or all the rest is desolation.” —John Fowles

Fr
Frix
Posts: 24
Joined: Thu Feb 07, 2013 11:34 am
Platform: Mac
Location: Italy

Thu Feb 14, 2013 7:08 am Post

Thank you AmberV,
the ones you have shown are interesting suggestions!

I like Scrivener every day more...

I'll wonder why Literature&Latte don't write a Guide to show these kind of features. These things give a very interesting power to our application, and, in general, to our work.
Now that I have discoverd 'mmd' and 'LaTeX' I ask myself as I did to live without it before.

I tried your tips and, Yes, memoir don't gave me any possibility to do margin notes.

I found 'ClassicThesis' might do it.

My target is to use 'mmd print LaTeX' directly without any compile in TeXShop (if it would be possible).

So I should learn how to insert this new class in scrivener for get to do that