-
Notifications
You must be signed in to change notification settings - Fork 407
Multi-line section titles may lead to empty TOC entries #2364
Copy link
Copy link
Closed
Labels
Description
Description
Hi,
I noticed that sometimes vimtex's table of content (TOC) contains empty entries. The issue arises with multi-line section titles like these:
\section{%
This is a really long section title which is hard-wrapped
after 80 characters or so to keep the source code readable
}When opening the TOC using \lt, the corresponding section number will be displayed, but the rest of the line stays blank. The comment symbol % following the opening brace does not seem to make any difference.
Thanks for your help!
Steps to reproduce
I can't attach the tex file, here is the content of, minimal.vim:
\documentclass{article}
\begin{document}
\section{%
This is a really long section title which is hard-wrapped
after 80 characters or so to keep the source code readable
}
\end{document}Steps:
- Compile
- Open the TOC, by default this is done with
\lt.
Expected behavior
Expected behaviour would be to display the full title or the first n non-whitespace characters.
Actual behavior
When opening the TOC using \lt, the corresponding section number will be displayed, but the rest of the line stays blank.
Do you use a latexmkrc file?
no
VimtexInfo
23 System info:
22 OS: Fedora release 33 (Thirty Three)
21 Vim version: NVIM v0.4.4
20 Has clientserver: true
19 Servername: /tmp/nvimR51SGy/0
18
17 VimTeX project: minimal_empty_toc_line
16 base: minimal_empty_toc_line.tex
15 root: /homes/foo/Desktop/minimal
14 tex: /homes/foo/Desktop/minimal/minimal_empty_toc_line.tex
13 main parser: current file verified
12 document class: article
11 compiler: latexmk
10 engine: -pdf
9 options:
8 -verbose
7 -file-line-error
6 -synctex=1
5 -interaction=nonstopmode
4 callback: 1
3 continuous: 1
2 executable: latexmk
1 viewer: General
24 qf method: LaTeX logfile
~
~Reactions are currently unavailable