Trying to get Scapple application documentation pdf built myself as learning before going with my own - tex errors

User avatar
lollisoft
Posts: 12
Joined: Sun May 07, 2017 2:06 pm
Platform: Mac

Sun May 14, 2017 1:07 pm Post

Hi,

I think I have got all material downloaded to get the Scapple application pdf documentation build by myself. I have downloaded MacTex as suggested. (MacTeX 2016)

I have then prepared my folder where I put my generated tex files and the material (sty files and apple key images). After configuring where the included tex files are (settings->extra->additional files), I got rid of the missing tex includes.

But now I have a huge list of errors and I am a very beginner in using tex.

How can I check if the tex installation is correct (a test project / unit test)?

What are all these errors?

Thank you very much to help a text newbie :D

BTW, I am using Mac OS X Snow Leopard!

I'll just show the very first ones that I have grabbed out of the last log window from LaTeXiT:

This is pdfTeX, Version 3.14159265-2.6-1.40.17 (TeX Live 2016) (preloaded format=pdflatex)
restricted \write18 enabled.
entering extended mode
(/var/folders/jw/jwk99RaWGDe1O4NsoToSkE+++TI/-Tmp-/LaTeXiT-2.8.0/latexit-1.tex
LaTeX2e <2016/03/31>
Babel <3.9r> and hyphenation patterns for 83 language(s) loaded.
(/usr/local/texlive/2016/texmf-dist/tex/latex/base/article.cls
Document Class: article 2014/09/29 v1.4h Standard LaTeX document class
(/usr/local/texlive/2016/texmf-dist/tex/latex/base/size10.clo))
(/usr/local/texlive/2016/texmf-dist/tex/latex/graphics/color.sty
(/usr/local/texlive/2016/texmf-dist/tex/latex/graphics-cfg/color.cfg)
(/usr/local/texlive/2016/texmf-dist/tex/latex/pdftex-def/pdftex.def
(/usr/local/texlive/2016/texmf-dist/tex/generic/oberdiek/infwarerr.sty)
(/usr/local/texlive/2016/texmf-dist/tex/generic/oberdiek/ltxcmds.sty)))
(/usr/local/texlive/2016/texmf-dist/tex/latex/amsfonts/amssymb.sty
(/usr/local/texlive/2016/texmf-dist/tex/latex/amsfonts/amsfonts.sty))
(/usr/local/texlive/2016/texmf-dist/tex/latex/amsmath/amsmath.sty
For additional information on amsmath, use the `?' option.
(/usr/local/texlive/2016/texmf-dist/tex/latex/amsmath/amstext.sty
(/usr/local/texlive/2016/texmf-dist/tex/latex/amsmath/amsgen.sty))
(/usr/local/texlive/2016/texmf-dist/tex/latex/amsmath/amsbsy.sty)
(/usr/local/texlive/2016/texmf-dist/tex/latex/amsmath/amsopn.sty))
(/usr/local/texlive/2016/texmf-dist/tex/latex/base/inputenc.sty
(/usr/local/texlive/2016/texmf-dist/tex/latex/base/utf8.def
(/usr/local/texlive/2016/texmf-dist/tex/latex/base/t1enc.dfu)
(/usr/local/texlive/2016/texmf-dist/tex/latex/base/ot1enc.dfu)
(/usr/local/texlive/2016/texmf-dist/tex/latex/base/omsenc.dfu)))
No file latexit-1.aux.
(/usr/local/texlive/2016/texmf-dist/tex/context/base/mkii/supp-pdf.mkii
[Loading MPS to PDF converter (version 2006.09.02).]
) (/usr/local/texlive/2016/texmf-dist/tex/latex/amsfonts/umsa.fd)
(/usr/local/texlive/2016/texmf-dist/tex/latex/amsfonts/umsb.fd)
(./mmd-scrivcustom-header.tex

./mmd-scrivcustom-header.tex:1: LaTeX Error: Can be used only in preamble.

See the LaTeX manual or LaTeX Companion for explanation.
Type H <return> for immediate help.
...

l.1 \documentclass
[12pt]{memoir}

./mmd-scrivcustom-header.tex:2: LaTeX Error: Can be used only in preamble.

See the LaTeX manual or LaTeX Companion for explanation.
Type H <return> for immediate help.
...

l.2 \usepackage
{layouts}[2001/04/29]

./mmd-scrivcustom-header.tex:3: LaTeX Error: Can be used only in preamble.

See the LaTeX manual or LaTeX Companion for explanation.
Type H <return> for immediate help.
...

l.3 \makeglossary


./mmd-scrivcustom-header.tex:4: LaTeX Error: Can be used only in preamble.

See the LaTeX manual or LaTeX Companion for explanation.
Type H <return> for immediate help.
...

l.4 \usepackage
{makeidx}

./mmd-scrivcustom-header.tex:5: LaTeX Error: Can be used only in preamble.

See the LaTeX manual or LaTeX Companion for explanation.
Type H <return> for immediate help.
...

l.5 \makeindex


./mmd-scrivcustom-header.tex:6: LaTeX Error: Can be used only in preamble.

See the LaTeX manual or LaTeX Companion for explanation.
Type H <return> for immediate help.
...

l.6 \usepackage
{etoolbox}

./mmd-scrivcustom-header.tex:7: LaTeX Error: Can be used only in preamble.

See the LaTeX manual or LaTeX Companion for explanation.
Type H <return> for immediate help.
...

l.7 \usepackage
{tipa}
./mmd-scrivcustom-header.tex:8: Missing $ inserted.
<inserted text>
$
l.8

User avatar
lollisoft
Posts: 12
Joined: Sun May 07, 2017 2:06 pm
Platform: Mac

Sun May 14, 2017 1:52 pm Post

Ha, I got it. Just trying out TexShop. With that application I was able to typeset the PDF document.

Some questions are now arising:

How to automate the typesetting without opening the GUI?

How to automatically step over the questionmarks in the console, as they mostly seem to be optional?

I like to change the font to one I am using on my website (for the headlines and all stuff that is no normal text except code examples).
Therefore I have found only one font declaration within the header definition:

\usepackage[urw-garamond]{mathdesign}

How do I declare two or three fonts and refer to it at places where it makes sense (headlines, normal text and code examples)?

Thank you very much

User avatar
nontroppo
Posts: 749
Joined: Mon Mar 05, 2007 5:22 pm
Platform: Mac
Location: Airstrip One

Sun May 14, 2017 2:51 pm Post

Hm, welcome to the baroque world of LaTeX. For fonts I make sure I use the XeLaTeX engine which provides full unicode and opentype support, then specify the fonts in the Scrivener front matter document as YAML metadata. This requires using Pandoc instead of MMD, for example: https://github.com/iandol/scrivomatic/b ... ic.yaml#L3 — sets the LaTeX engine, font families, paper size, document class, language, line height etc. As this is a template, in fact I can write several variants and choose which to employ at compile time from Scrivener front matter. Pandoc handles the LaTeX compile. You can also use Pandoc to generate TeX then run either xelatex or latexmk from the command line to ditch the GUI.

If you want to customise the layout, good luck! Some things are easy in LaTeX, others much tougher. The document class is the magic sauce, check out using the memoir class or Komascript as alternatives, they each have hefty manuals of their own. ConTexT is a variant of LaTeX which is supposed to be a bit more elegant. In general as soon as you want to customise LaTeX you end up having to use lots of raw LaTeX in Scrivener, which isn't ideal. This is why I prefer other layout systems.

User avatar
AmberV
Posts: 20608
Joined: Sun Jun 18, 2006 4:30 am
Platform: Mac + Linux
Location: Santiago de Compostela, Galiza
Contact:

Sun May 14, 2017 3:50 pm Post

The LaTeX system is a command-line level utility, so automation is fairly trivial, and you can run it with arguments that suppress warnings. I tend to prefer a text editor to handle that aspect however, as I can more easily make tweaks to the source if I see any “badness” warnings. Inserting a line break after a word or a hyphen hint can make an ugly line something nobody will notice.

Atom, with the with language-latex and latex packages make for a good combination (I link to them for reference, but Atom has a built-in package manager). I find that unless the document has major errors, that setup is good for “one shot” PDF output.

Now as for fonts, and well just being more modern in general with the text source (UTF–8 input): XeLaTeX is a good way to go, and the fontspec package is what I use for setting up fonts. For example you can override the main font and then define some utility fonts like so:

Code: Select all

\setmainfont{Calluna-Regular.otf}[
    Path = /Users/username/Library/Fonts/,
    BoldFont = Calluna-Bold.otf,
    ItalicFont = Calluna-It.otf,
    BoldItalicFont = Calluna-BoldIt.otf,
]

\setsansfont{AvenirNext-Regular.ttf}[
    Path = /Users/username/Library/Fonts/,
    BoldFont = AvenirNext-Medium.ttf,
    ItalicFont = AvenirNext-Italic.ttf,
    BoldItalicFont = AvenirNext-MediumItalic.ttf,
]

\setmonofont{Inconsolata XL.otf}[
    Path = /Users/username/Library/Fonts/,
    BoldFont = Inconsolata XL Bold.otf,
    Scale = 0.8,
]

\newfontfamily\callunalight{Calluna-Light.otf}[
    Path = /Users/username/Library/Fonts/,
    Ligatures = Rare,
]


So the first three override the main, sans and fixed-width fonts throughout the document, and the latter gives me a macro I can use whenever I need a light variant, with \callunalight{The text in light font.}. I don’t really use it that way though, I use it for headings and such:

Code: Select all

\setsecheadstyle{\huge\callunalight\raggedright}


nontroppo wrote:In general as soon as you want to customise LaTeX you end up having to use lots of raw LaTeX in Scrivener, which isn’t ideal. This is why I prefer other layout systems.

Well, yes and no. You can take the approach of using raw code in the source text, but I prefer keeping the generation of that stuff in the compiler preset, meaning another preset could be built that outputs different code as necessary for other formats---same principle as Markdown in general, but applied to Scrivener. Replacements are a good tool for adding a sort of “domain-specific language” to a document.
.:.
Ioa Petra'ka
“Whole sight, or all the rest is desolation.” —John Fowles

User avatar
lollisoft
Posts: 12
Joined: Sun May 07, 2017 2:06 pm
Platform: Mac

Sun May 14, 2017 7:41 pm Post

For the font issue I would stick to the urw-garamond for a while. Until I have found a good font that I can actually use on my Snow Leopard. Since the XeLaTeX seems to require a more recent Mac OS X version.

Otherwhise I would be happy to get suggested one that is similar, BUT free to use (LGPL) that I also could use commercially :D

I have tried my Harabara font that also is a ttf font, but this also needs a XeLaTeX. The Harabara font contains a woff and eot version, but I haven't tried that yet. Selecting the matching font for my text may be a later issue.

Thank you for your help.