Merge branch 'master' into math-mappings
This commit is contained in:
commit
8b124af0b6
@ -12,15 +12,21 @@ elseif b:current_syntax !=# 'tex'
|
||||
endif
|
||||
|
||||
" {{{1 Add syntax highlighting for \url and \href
|
||||
syntax match texStatement '\\url' nextgroup=texUrl
|
||||
syntax match texStatement '\\url\ze[^\ta-zA-Z]' nextgroup=texUrlVerb
|
||||
syntax match texStatement '\\url\ze\s*{' nextgroup=texUrl
|
||||
syntax match texStatement '\\href' nextgroup=texHref
|
||||
syntax region texUrl matchgroup=Delimiter start="{" end="}" contained
|
||||
syntax region texHref matchgroup=Delimiter start="{" end="}" contained
|
||||
|
||||
syntax region texUrl matchgroup=Delimiter start='{' end='}' contained
|
||||
syntax region texUrlVerb matchgroup=Delimiter
|
||||
\ start='\z([^\ta-zA-Z]\)' end='\z1' contained
|
||||
|
||||
syntax region texHref matchgroup=Delimiter start='{' end='}' contained
|
||||
\ nextgroup=texHrefLinkText
|
||||
syntax region texHrefLinkText matchgroup=Delimiter start="{" end="}" contained
|
||||
syntax region texHrefLinkText matchgroup=Delimiter start='{' end='}' contained
|
||||
\ contains=@Spell
|
||||
|
||||
highlight link texUrl Function
|
||||
highlight link texUrlVerb texUrl
|
||||
highlight link texHref texUrl
|
||||
highlight link texHrefLinkText texSectionZone
|
||||
|
||||
|
@ -384,7 +384,7 @@ function! s:latexmk_build_cmd() " {{{1
|
||||
|
||||
let cmd .= ' ' . g:vimtex_latexmk_options
|
||||
let cmd .= ' -e ' . vimtex#util#shellescape(
|
||||
\ '$pdflatex =~ s/ / -file-line-error /')
|
||||
\ '$pdflatex =~ s/^((.(?<!^internal(?=\s)))*?) /$1 -file-line-error /')
|
||||
if g:vimtex_latexmk_build_dir !=# ''
|
||||
let cmd .= ' -outdir=' . g:vimtex_latexmk_build_dir
|
||||
endif
|
||||
|
@ -428,7 +428,7 @@ function! s:parse_line_input(line, file) " {{{1
|
||||
let l:file = substitute(l:file, '\s*$', '', '')
|
||||
|
||||
" Ensure file has extension
|
||||
if l:file !~# '.tex$'
|
||||
if l:file !~# '\.tex$'
|
||||
let l:file .= '.tex'
|
||||
endif
|
||||
|
||||
|
@ -123,7 +123,7 @@ endfunction
|
||||
function! vimtex#util#shellescape(path) " {{{1
|
||||
" Blackslashes in path must be escaped to be correctly parsed by the
|
||||
" substitute() function.
|
||||
let l:path = escape(a:path, '\')
|
||||
let l:path = has('win32') ? escape(a:path, '\') : a:path
|
||||
|
||||
"
|
||||
" In a Windows environment, a path used in "cmd" only needs to be enclosed by
|
||||
@ -132,7 +132,7 @@ function! vimtex#util#shellescape(path) " {{{1
|
||||
" reports an error. Any path that goes into vimtex#util#execute() should be
|
||||
" processed through this function.
|
||||
"
|
||||
return has('win32') ? '"' . l:path . '"' : shellescape(l:path)
|
||||
return has('win32') ? '"' . l:path . '"' : shellescape(l:path, 1)
|
||||
endfunction
|
||||
|
||||
" }}}1
|
||||
|
3
test/issue-225/chapters/chapter.tex
Normal file
3
test/issue-225/chapters/chapter.tex
Normal file
@ -0,0 +1,3 @@
|
||||
\chapter{Chapter 1}
|
||||
This is chapter 1.
|
||||
|
0
test/issue-225/chapters/preamble.tex
Normal file
0
test/issue-225/chapters/preamble.tex
Normal file
0
test/issue-225/chapters/preamble_tex.tex
Normal file
0
test/issue-225/chapters/preamble_tex.tex
Normal file
0
test/issue-225/chapters/preamble_tex_.tex
Normal file
0
test/issue-225/chapters/preamble_tex_.tex
Normal file
6
test/issue-225/main.tex
Normal file
6
test/issue-225/main.tex
Normal file
@ -0,0 +1,6 @@
|
||||
\documentclass{scrbook}
|
||||
% \input{./chapters/preamble}
|
||||
\input{./chapters/preamble_tex}
|
||||
\begin{document}
|
||||
\include{./chapters/chapter}
|
||||
\end{document}
|
0
test/issue-225/main.tex.latexmain
Normal file
0
test/issue-225/main.tex.latexmain
Normal file
7
test/test-internal/latexmk.rc
Normal file
7
test/test-internal/latexmk.rc
Normal file
@ -0,0 +1,7 @@
|
||||
$pdflatex = 'internal internalexample %R %O %S';
|
||||
|
||||
sub internalexample {
|
||||
my @args = @_;
|
||||
print "This line should be printed\n";
|
||||
return system("pdflatex @args");
|
||||
}
|
17
test/test-internal/test-internal.tex
Normal file
17
test/test-internal/test-internal.tex
Normal file
@ -0,0 +1,17 @@
|
||||
\documentclass[11pt,a4paper]{article}
|
||||
|
||||
\begin{document}
|
||||
|
||||
This is just a simple example. Compiling it with the following \texttt{.latexmkrc} should print ``This line should be printed'' before starting \texttt{pdflatex}.
|
||||
|
||||
\begin{verbatim}
|
||||
$pdflatex = 'internal internalexample %R %O %S';
|
||||
|
||||
sub internalexample {
|
||||
my @args = @_;
|
||||
print "This line should be printed\n";
|
||||
return system("pdflatex @args");
|
||||
}
|
||||
\end{verbatim}
|
||||
|
||||
\end{document}
|
@ -76,4 +76,13 @@ circle of diameter $d$.
|
||||
const double pi = 3.1415926535
|
||||
\end{minted}
|
||||
|
||||
% Urls and hrep
|
||||
\url{http://www.google.com}
|
||||
\url+http://www.google.com+
|
||||
\href{http://example.com}{Title text}
|
||||
\urldef{\mysite}\url{http://example.com}
|
||||
|
||||
\end{document}
|
||||
|
||||
% vim: fdl=9
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user