File tree Expand file tree Collapse file tree 2 files changed +48
-0
lines changed
Expand file tree Collapse file tree 2 files changed +48
-0
lines changed Original file line number Diff line number Diff line change 1+ " VimTeX - LaTeX plugin for Vim
2+ "
3+ " Maintainer: Karl Yngve Lervåg
4+ " Email: karl.yngve@gmail.com
5+ "
6+
7+ function ! vimtex#syntax#p#zref_clever#load (cfg) abort " {{{1
8+ syntax match texCmdZRef " \v\\ zc?ref>"
9+ \ skipwhite skipnl
10+ \ nextgroup= texZRefArg
11+
12+ syntax match texCmdZRef " \\ zlabel\> "
13+ \ skipwhite skipnl
14+ \ nextgroup= texZRefOpt,texRefArg
15+
16+ call vimtex#syntax#core#new_arg (' texZRefArg' , {
17+ \ ' contains' : ' texComment,@NoSpell' ,
18+ \} )
19+ call vimtex#syntax#core#new_opt (' texZRefOpt' , {
20+ \ ' next' : ' texRefArg' ,
21+ \ ' opts' : ' oneline' ,
22+ \} )
23+
24+ highlight def link texZRefArg texRefArg
25+ highlight def link texZRefOpt texRefOpt
26+ highlight def link texCmdZRef texCmdRef
27+ endfunction
28+
29+ " }}}1
Original file line number Diff line number Diff line change 1+ \documentclass {scrartcl }
2+ \usepackage {amsmath }
3+ \usepackage {hyperref }
4+ \usepackage {zref-user }
5+ \usepackage {zref-clever }
6+
7+ \begin {document }
8+
9+ \section {sub3 with spaces }\zlabel {sec:sub3 with spaces}
10+
11+ \begin {equation }
12+ f(x) = 42
13+ \label {eq:sub3 with spaces }
14+ \end {equation }
15+
16+ This is \zcref {sec:sub3 with spaces }, and \zcref {eq:sub3 with spaces } is up top.
17+ The same here, but without anything clever done to it: \zref {eq:sub3 with spaces }.
18+
19+ \end {document }
You can’t perform that action at this time.
0 commit comments