GithubHelp home page GithubHelp logo

Comments (13)

lervag avatar lervag commented on May 18, 2024

Yes, this sounds like a good idea. I'll look into it.

from vimtex.

lervag avatar lervag commented on May 18, 2024

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.

petobens avatar petobens commented on May 18, 2024

Excellent. I have one more example (I'll open a new issue soon) but I think it might be difficult to implement.

from vimtex.

lervag avatar lervag commented on May 18, 2024

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.

petobens avatar petobens commented on May 18, 2024

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).

screenshot-18-07-2014_20-18-25
screenshot-18-07-2014_20-18-30

from vimtex.

lervag avatar lervag commented on May 18, 2024
  1. 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...

  2. 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.

petobens avatar petobens commented on May 18, 2024

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.

lervag avatar lervag commented on May 18, 2024

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.

petobens avatar petobens commented on May 18, 2024

Okay! It's your plugin and I'm sure whatever you choose will be perfect. Thanks

from vimtex.

petobens avatar petobens commented on May 18, 2024

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.

lervag avatar lervag commented on May 18, 2024

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.

petobens avatar petobens commented on May 18, 2024

Excellent. It works very nice. Thanks

from vimtex.

lervag avatar lervag commented on May 18, 2024

No problem! :)

from vimtex.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.