GithubHelp home page GithubHelp logo

Comments (3)

lervag avatar lervag commented on June 8, 2024 1

First of all, thank you so much for this wonderful vim plugin! I couldn't think of writing .tex files without it.

Thanks for the kind words!

It's my first time opening a ticket on github, I hope the description will be to your liking! Please, tell me otherwise.

Yes, this is a good first ticket! Nice to see that you're using proper formatting and everything!

Two errors (E716, E116) come up when running :VimtexTocOpen (or :VimtexTocToggle) in a file containing some \label commands. The commands run smoothly in the same file without the \label.

Here is the error log:

Error detected while processing function 356[12]..361[5]..vimtex#parser#toc[13]..vimtex#parser#toc#parse[65]..509:
line    4:
E716: Key not present in Dictionary: "format, l:key, l:label), 'number' : '', 'file'   : a:context.file, 'line'   : a:context.lnum, 'level'  : a:context.max_level - a:context.level.current, 'rank'   : a:context.lnum_total, 'type'   : 'label', }"

I can't reproduce this on my end. I've made a minor patch that might fix it. Before you update and test, please read my next reply and see if you can still reproduce with an updated minimal config.

It is relatively recent, and persists even when checking-out older commits. I therefore think it's because of my system, but I can't find the reason why, nor can debug vim scripts :'(

I tried with a minimal vimrc file, no other plugins, and with a minimal.tex file as well.

1. `vim -Nu "vimrc" mimimal.tex`
2. Run `:VimtexTocOpen` ---> fails

Can you try and reproduce with vim --clean -u test.vim minimal.tex instead; where test.vim is as given here:

set nocompatible
set runtimepath^=~/.vim/plugged/vimtex
set runtimepath+=~/.vim/plugged/vimtex/after
filetype plugin indent on
syntax enable

Can you still reproduce your problem now?

System info:
  OS: Debian GNU/Linux 11 (bullseye)
  Vim version: VIM 8.2 (1-2434)
  Has clientserver: true
  Servername: undefined (vim started without --servername)

Just in case you didn't already know of it, you should read :help vimtex-clientserver.

from vimtex.

brechetp avatar brechetp commented on June 8, 2024

Hi,

Thanks you for your quick reply and your feedback!

I reproduced the steps you described, and I still got the error, but your patch fixed it! Thank you so much for your assistance, that's really wonderful.

Thanks again!

Oh thanks, I will look into the vimtex-clientserver documentation, I'm not sure what it is.

I went ahead and closed the ticket, is this OK?

Cheers

from vimtex.

lervag avatar lervag commented on June 8, 2024

Thanks you for your quick reply and your feedback!

I reproduced the steps you described, and I still got the error, but your patch fixed it! Thank you so much for your assistance, that's really wonderful.

Thanks again!

Glad to hear it! It is still surprising to me that you could reproduce the problem, but let's not spend more energy on it if it works now :)

I went ahead and closed the ticket, is this OK?

Yes, perfect. And feel free to open new issues if you have other questions or problems.

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.