Plain-text versions of TeX2page output

 (included in TeX2page version

 Dorai Sitaram 



The Vim [5] scripts hisfir.vim and hoyve.vim can be used for converting a related set of TeX2page-generated [6] HTML files into Info and Vim help files respectively.

Info [2] files are suitable for viewing inside Info-capable text editors such as Emacs [1] or standalone Info browsers. They can also be browsed from the Vim editor, using the info.vim plugin [3]. Vim help files are tagged text files that can be viewed inside Vim.

Info and Vim help files will not have the formatting, fonts, and style of HTML as viewed in a graphical Web-browser, but they have the advantage of being readily readable from your text-editor.

The input to these scripts is a set of HTML files created by TeX2page [6] from plain-TeX or LaTeX source. Thus from a single TeX source, we can get

Conversion to Info files

To convert the mainfile.html (which may have auxiliary files alongside it in its directory) into Info files, issue the command

vim -e -S wherever/it/is/hisfir.vim \ 
    -c Hisfir\ wherever/it/is/mainfile.html -c q 

where wherever/it/is/f stands for the relative or full pathname of f.

You can use a shell script or bat file suited to your operating system to avoid typing anything but the .html filename. E.g., a following Unix script hisfir with contents

vim -e -S wherever/it/is/hisfir.vim -c Hisfir\ $1 -c q 

allows you to simply say

hisfir wherever/it/is/mainfile.html 

You may also find it convenient to call Hisfir from the Vim command-line. Put hisfir.vim in one of your Vim plugin directories, or explicitly source it in your .vimrc. Then call

:Hisfir wherever/it/is/mainfile.html 

Filename completion can be used to enter the argument.

However you start the conversion, a mainfile.info file is created in the same directory as the mainfile.html file.

Hisfir probably stands for ``Html Into Something For Info Readers''.

Conversion to Vim help files

To convert mainfile.html and its related HTML files in a directory into Vim help files, issue the command

vim -e -S wherever/it/is/hoyve.vim \ 
    -c Hoyve\ wherever/it/is/mainfile.html -c q 

where wherever/it/is/f stands for the relative or full pathname of f.

You can use a shell script or bat file suited to your operating system to avoid typing anything but the .html filename. E.g., the following Unix script hoyve

vim -e -S wherever/it/is/hoyve.vim -c Hoyve\ $1 -c q 

allows you to simply say

% hoyve wherever/it/is/mainfile.html 

You may also find it convenient to call Hoyve from the Vim command-line. Put hoyve.vim in one of your Vim plugin directories, or explicitly source it in your ~/.vimrc. Then call

:Hoyve wherever/it/is/mainfile.html 

Filename completion can be used to enter the argument.

However you start the conversion, a bunch of .txt files is created in the same directory as the .html files, one .txt per .html file. In addition, a mainfile.tags file is also created.

You may now view any of the .txt files in Vim. Using any of Vim's several tag-search commands you can navigate through the .txt files, in much the same way as you browse Vim's help files.

You may use the same .txt files (generated by the Vim script) with the Emacs editor; however, you need to make an Emacs-specific tags file. One way is the following Ctags [4] call:

ctags -e --language-force=help \ 
  --regex-help="/\*([^ \t]+)\*\1/" \ 
  -f mainfile.tags 
  mainfile*.txt 

Hoyve stands for ``Html On Your Vi-like Editor'' (and not for any exclamation its output might elicit).

References

[1]  

FSF. GNU Emacs.

[2]  

FSF. Texinfo: The GNU Documentation System.

[3]  

Slavik Gorbanyov. info.vim: GNU info documentation browser.

[4]  

Darren Hiebert. Exuberant Ctags: A multilanguage implementation of Ctags.

[5]  

Bram Moolenaar. The VIM (Vi IMproved) Home Page.

[6]  

Dorai Sitaram. TeX2page.

Last modified: Sat, May 31, 2003, 6:02 %P EDT
HTML conversion by TeX2page 2003-05-31