[tex-live] texdoc in luatex

Frank Küster frank at kuesterei.ch
Fri Jun 29 18:46:56 CEST 2007


Akira Kakuto <kakuto at fsci.fuk.kindai.ac.jp> wrote:

> Hi Frank,
>
>> Now I'm at version 0.3:
>
> Comments on texdoclua on windows:
>
>>   rmfile_command = 'del /F ';
>>   rmdir_command = 'rmdir ';
>
> Most applications on Windows support forward slash '/' as a
> directory separator, but internal commands such as
> 'del', 'rmdir', ... do not. So you have to replace forward
> slashes by backward slashes in the path if you use 'del' and 'rmdir'.

That's a misunderstanding: the '/F' is supposed to be an option (force,
remove even if the file is non-writable).  It probably doesn't make much
sense, it's there because the bash version has it, too.

> In cmd.exe (Windows' shell), '&' is a command separator
> like ';' in sh. So, the above may be rewritten as
>  
>    texdoc_viewer = { 
>       dvi  = '(start %s)',

Hm. What I want is something like (start /WAIT %s), but the whole thing
in the background.  The point is that %s is substituted not only with
the filename, but (in case of a compressed file) with 

filename .. command_sep .. rmfile_command .. tempfile .. command_sep .. rmdir .. tempdir

And I want the lua script to continue at once, but the rm stuff should
only be executed once the viewer has stopped.  I guess otherwise the rm
commands will either fail (because the file is locked by the viewer), or
the viewer might get problems if it hasn't loaded all pages by the time
the rm stuff is executed.

On Unix-like systems, this is achieved by starting a subshell with
`(...)' and putting it in the background with `&', but within the shell
the commands are executed one after the other, `;'.  How would I do that
on Windows?

> Text files may have various suffixes, so 'start' is not appropriate.
> I'm using less (less.exe is needed). If you use the standard
> Windows command 'more', you have to replace / by \ in %s.

Hm, does texdoclua show filenames with forward slashes on Windows?

> texdoclua is working on Windows. Thanks.
>
> [FYI]
> texdoc.exe in W32TeX allows an optional argument [SubStringInPath]
> in order to specify a file:
>
> texdoc manual.pdf geometry
> displays manual.pdf for the geometry package, while
>
> texdoc manual.pdf hyperref
> displays manual.pdf for the hyperref package.

Well, that's "texdoc[lua] geometry/manual" vs "texdoc[lua]
hyperref/manual".  Since one system has to face an incompatibility, I
fear it's Windows which has to suffer.  Both because it's easier to
implement and because I think it's more logical to have the directory in
front. 

Many thanks for your feedback!

Regards, Frank

-- 
Frank Küster
Single Molecule Spectroscopy, Protein Folding @ Inst. f. Biochemie, Univ. Zürich
Debian Developer (teTeX/TeXLive)


More information about the tex-live mailing list