Deactivate LaTeX Numbering, while keeping the Section in TOC

Hello everyone,

I just recently revived Scrivener for a larger thesis writing project that is ahead of me. As my institution requires me to comply with their “format guidelines” (provided as a .dotx template…ouch) I started to recreate the template in latex.

So far I was quite successful the only thing that needs to be fixed is that certain sections of my document, such as the abstract, copyright and restriction note etc. should a) not be numbered, but b) still appear in the table of contents.

Fot those sections I created files in Scrivener which on compiling are converted like this:

[code]\section{Copyright}
\label{copyright}

<>[/code]
But what I would need is this LaTeX code:

[code]\section*{Copyright}
\addcontentsline{toc}{section}{Copyright}
\label{copyright}

<>[/code]
I can’t figure out a way to manipulate the headline in a way that the latex code is added.

If I add the asterix infront of the headline and outside of the hash-tags. The following will be compiled:

*# Copyright #

Not even close to the desired result :frowning:

Is there a way to change how the brackets are put in place?

Thanks for your help :slight_smile:

I don’t think there is a simple way of modifying the header to do that, but there is a workaround:

  1. For your Copyright page turn on the ‘compile as is’ option in the Inspector. That will prevent automatic generation of the header.

  2. At the start of your document containing the copyright text insert:

<!--\section*{Copyright} \addcontentsline{toc}{section}{Copyright} \label{copyright}-->

The comments surrounding the code will result in the latex code passing through the compile process cleanly, giving you the latex section header you need.

That work around is similar to that for abstracts, which is described here with a bit more detail: viewtopic.php?f=21&t=19269#p131449

Hey,

thank you for your comment :slight_smile:

I actually did this with some of my LaTeX controls and using the Frontmatter-Feature.
In the Compile window I checked “Add Frontmatter” and seletected a file outside of the Documents Draft-Folder and compiled it “as is”. In there are included all the controls over if table of contents, list of figures and the custom title page, as well as the custom text sections for abstract, the copyright and non-disclosure parts.

The problem is that “as is” files doen’t get parsed properly from MMD -> LaTeX code from my experience.
Should it, though :question:

[code]+ List

  • List
  1. List
  2. List[/code]

Gets the following output:

  • List
  • List
  • List
  • List

With the according latex code in the tex file:

\begin{itemize} \item List \item List \item List \item List \end{itemize}

While I really like the Frontmatter feature to include the latex-code that needs my interaction during writing and it spares me from fiddeling around with the preamble, it is still not the best solution for the content sections.
It differs from the usual scrivener workflow as an important part like the abstract is somewhere burried in latex code and crammed together with other sections, such as the copyright statement.

But it gets really messy for the end of my document, as everything is not only excluded from the scrivener document by the external “footer.tex” (meta: latex footer).
As right now I use several “/includes{…}” in the footer to link to external .tex files for a bibliography, glossary the appendix and custom chapters such as the “declaration of academic honesty”, as it is easier to toggle them on and off just in the footer for typesetting.


Besides all that:
It would be great to be able to access the content of a file inside the scrivener project and include it into another.

Why would I need to do this?

I got my LaTeX controls in the Frontmatter-document and if I exclude the abstract and other content sections (copyright, etc.) from that and put it inside of the Draft-Folder, the sequence in the documents would not be as desired:

It should be:

  • Titlepage
  • Abstract
  • Copyright
  • Table of Contents
  • Table of Figures […]

But it would be more like:

  • (Frontmatter “LaTeX Controls”)
    [list][*]Titlepage
  • Table of Contents
  • Table of Figures […]
    [/:m]
    [
    ](Draft-Folder of the actual Document)
  • Abstract
  • Copyright
    [/*:m][/list:u]

If I could access and “include” the content of sections layed out inside of my Draft-Folder inside of the frontmatter, I could structure the Frontmatter as desired.
I am thinking of something like this:

[code]% Frontmatter: LaTeX Controls

[/code]


Furthermore:
There is a variable, called <$sectiontitle>, which – according to the documentation – should give back the last sectiontitle (scrivener-file title?) from the last section that had a pagebreak. But it doesn’t seem to work at all :frowning:
If I use <$sectiontitle> it just gets printed without parsing. In both, “as-is” and normally compiled files.

This would come in handy for the following:

<!--\section*{<$sectiontitle>} \addcontentsline{toc}{section}{<$sectiontitle>} \label{<$sectiontitle>}-->
Because then –besides having the snippet of commented latex-code inside the document – the title-handling wouldn’t differ from the usual ‘workflow’. :slight_smile:

Thanks in advance :slight_smile: