2016-12-01 04:01:15 -05:00
|
|
|
Execute (Find correct main file from subfiles):
|
2016-12-01 04:14:22 -05:00
|
|
|
call writefile([
|
|
|
|
\ '\documentclass{article}',
|
|
|
|
\ '\usepackage{subfiles}',
|
|
|
|
\ '\begin{document}',
|
|
|
|
\ '\end{document}',
|
|
|
|
\ '\subfile{test.tex}',
|
|
|
|
\], 'main.tex')
|
2016-12-01 04:01:15 -05:00
|
|
|
call writefile([
|
|
|
|
\ '\documentclass[main.tex]{subfiles}',
|
|
|
|
\ '\begin{document}',
|
|
|
|
\ '\end{document}',
|
|
|
|
\], 'subfile.tex')
|
|
|
|
edit subfile.tex
|
|
|
|
AssertEqual 'main.tex', fnamemodify(b:vimtex.tex, ':t')
|
|
|
|
bdelete!
|
|
|
|
|
|
|
|
Execute (Clean up):
|
|
|
|
call system('rm -f main.tex subfile.tex')
|
|
|
|
|