[Tuglist] Expanding \input{files}

Asokan K tuglist@tug.org.in
13 Apr 2002 12:44:35 -0000



>On Thu, 11 Apr 2002, H.S.Rai wrote:
>
> >
> > Is there any tool or way (other than "insert file")
to
> > expand files included by \input.  For example if
master.tex
> > has following statements:
> >


If easier switching between files is what desired,

the following script may be usefull with "vi editor"
++++++++++++++++++++++++++++++++++++
set nocompatible
set autowrite
set ruler
set laststatus=2
set filetype=tex
syntax on
set tw=75
map<F2> <Esc>:w<CR>
map <F3> <Esc> w:<CR> :!latex run.tex <CR>
"map <F3> <Esc>:!latex run.tex && dvips run.dvi -o
run.ps <CR>
map <F4> <Esc>:split run.log <CR>
map <F5> <Esc>:!xdvi run.dvi 2>dvi.log & <CR>
map <F6> <Esc>:!gv run.ps 2>ps.log & <CR>
map <F9> <Esc>:n <CR>
map <F10> <Esc>:N <CR>
++++++++++++++++++++++++++++++++++++++++++
save this in a file ,say vimtex.
Put all the tex files along with the above file in a
directory. The name of the master file is 'run.tex'

start vim with
$vim *.tex -u vimtex

now the function key <F2> saves the current file, <F3>
saves the current file and compiles the master file,
<F4> shows the log file in a split window, <F5> shows
the dvi file etc.(all in command mode)
Also, <F9> and <F10> navigates through the various tex
files.
the script can be modified suitably for running
pdflatex,viewing ps file etc.

Asokan K