Comments (13)
Yes, this sounds like a good idea. I'll look into it.
from vimtex.
I've updated the TOC test, which you can find in test/advanced.tocs
. It should include most of your example and some more. I'll begin to look at it some time later.
from vimtex.
Excellent. I have one more example (I'll open a new issue soon) but I think it might be difficult to implement.
from vimtex.
I've just pushed my first attempt at solving this issue. There are probably still some quirky details that are not done right. Let me know what you think!
from vimtex.
Thanks, this is awesome. I have two questions: i) why do you number the chapters in the front matter with roman numerals? ii) the bibiliography (and the Alphabetical Index which I don't include in this particlar example) are still contained in the last chapter (you can see this in the images below comparing an unfolded and a folded toc) I think it is better if they are shown separately (the same way the preamble or table of contents).
from vimtex.
-
I was not really sure how to treat the frontmatter. I decided to use roman numerals, but perhaps it is better to remove the numbers altogether? I've probably mixed page numbering and section numbering...
-
I've not noticed the fold issue you mention here. I'd appreciate if you could open a new issue about this, because it is somewhat more general.
from vimtex.
Personally I think it is better to remove the numbers altogether (this is what the frontmatter command does besides forcing roman numerals on page numbers).
I also think that one problem that will appear when removing the roman numerals is that an unnumbered chapter in the frontmatter will have the same highlight group as the "Preamble" or "Table of Contents" i.e TocSec
rather than the one corresponding to a (numbered) chapter: TocSec1
.
I don't know if that can be fixed (maybe TocSec
can specifically match "Preamble", "Table of contents" and (given #34) "Bibliography" and "Alphabetical index" and reserve TocSec1
specifically for numbered and unnumbered chapters). Or, given this problem, you might prefer to keep the roman numbers.
from vimtex.
Ok, I'll fix it. And yes, I'm aware of the highlighting issue. I think a solution to this is to write the section number at the far right of the TOC title lines, at column 60+, where they will not be visible, and then use this information for the syntax highlighting.
I think I want the preamble (TocSec) to have the same highlighting as the "highest order" section (TocSec1).
from vimtex.
Okay! It's your plugin and I'm sure whatever you choose will be perfect. Thanks
from vimtex.
There is one thing that I don't know I understood properly but if the TOC numbers are shown at the far right that is not consistent with the standard latec TOC that is generally of the form: "[number] [section title]". Maybe you could consider that.
from vimtex.
I can understand how my description was not understandable. However, the last commits should show exactly what I mean. I've added a level
identifier to the end of each TOC line. I've also ensured that each line has a rather long length, such that this identifier is not visible. The identifier is then used by the syntax file to decide which syntax group to use.
I've also removed the roman numbering on the frontmatter.
from vimtex.
Excellent. It works very nice. Thanks
from vimtex.
No problem! :)
from vimtex.
Related Issues (20)
- VimtexInverseSearch can be run but doesn't do anything HOT 8
- inverse search in zathura opens an extra gvim window HOT 6
- What can we do to improve the output parsing/visuals of pdflatex? HOT 1
- Vimtex very slow on basic navigations HOT 3
- Compile with Okular in Windows 10 HOT 1
- Push some files to vim runtime? HOT 9
- Detect "Overfull vbox" warning messages in log file HOT 1
- Vimtex is not working with packer.nvim HOT 2
- Calling :VimtexInverseSearch crashes Neovim HOT 1
- Please don't force user to select a main file! HOT 4
- How to use asyncomplete.vim as autocompletion? HOT 1
- Escaped left brace in \phantom breaks highlighting HOT 3
- Comment about minimum version of vim/neovim HOT 10
- VimtexCountWords inaccurate on range (apa7 document class) HOT 5
- Command to return main file path HOT 3
- Option to turn chktex off HOT 5
- commands starting with \if break indentation HOT 3
- synctex preview of labels for navigation/completion HOT 1
- Question: Is it possible to disable the conceal only for `\\`? HOT 4
- VimTeX: Viewer cannot find Zathura window ID! HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from vimtex.