Vimtex: Enable fakepart without a \part

Created on 4 Jul 2019  ·  5Comments  ·  Source: lervag/vimtex

I have folding, recognizing fakepart, -chapter, -section etcetera working. However, I need to introduce a \part to make % Fakepart work. Ie. if I have a structure containing only \section and below, and add a % Fakepart the latter is not recognized. If I add a \part somewhere in the document, it enables all % Fakepart as well.

In other words, fakepart does _not_ work with the following structure:

% Fakepart: Bla
blabla
\section{Bla}
blabla
\section{Bla}
% Fakepart: Bla
\section{Bla bla}
...
\subsection{Bla bla}
% Fakepart: Bla
\section
...

But all % Fakepart _does_ work with the following:

\part{Bla}
blabla
\section{Bla}
blabla
\section{Bla}
% Fakepart: Bla
\section{Bla bla}
...
\subsection{Bla bla}
% Fakepart: Bla
\section
...

The only change being the first % Fakepart having been changed to a proper \part. Indeed, the change is instantaneous. Removing \part disables all % Fakepart; adding it enables them.

Is this a bug, a feature, and/or something I can adjust with some setting or another?

I would like to be able to use % Fakepart without introducing \part in the document.

bug

All 5 comments

The idea was that adding fake parts when there were no real parts seemed to make little sense. At least it did to me when I implemented it. It is not difficult to change this, though, and when I think about it now I don't quite see that it could make any harm to allow this. If I don't work with parts I don't use them, but there is no point in blocking the use of % Fakepart regardless.

Just to give some context to the scenario where % Fakepart’s without \part’s made sense to me. I’m currently working in a journal’s template. There are three clear “parts”, where the first is a kind of preamble (title, keywords, abstract, etcetera), the second is the main content, and the third is a kind of epilogue, with acknowledgments, references, author bio, etcetera. There are no true \part‘s in the template’s structure, but I found it handy to add % Fakepart’s to divide the aforementioned three ... er parts, to structure it whilst writing, generally focusing on the main content.

Yes, that does sound quite useful. I've pushed a fix for this now.

Much appreciated! Working as expected. 👍

Great, happy to hear it!

Was this page helpful?
0 / 5 - 0 ratings