Re: file path problems with pdf output
David Kastrup <[email protected]>
| Newsgroups | gmane.emacs.auc-tex |
|---|---|
| Message-ID | <[email protected]> |
Ralf Angeli <[email protected]> writes: > * Björn Pedersen (2005-01-22) writes: > >> Following scenario: >> >> testdir_top: >> dirtest.tex > [...] >> testdir_top/subdir: >> subdirtest.tex: > [...] >> In pdf-mode, when trying to view from the subdirtest.tex buffer, >> it prompts for xpdf ../dirtest.pdf, but executes xpdf in testdir_top, >> so xpdf cannot find the pdf file. Manually removing ../ in the minibuffer >> works. Specifing an absoulte path for TeX-master works correctly, too. > [...] >> It thems, the the %o expansion should not use the path part, or expand >> to the absolute path of the master file. > > The %o expander calls `TeX-view-output-file' which subsequently calls > `TeX-active-master'. Your former suggestion can be achieved by > wrapping the call to `TeX-active-master' in `expand-file-name'. The > latter suggestion by extending the definition of `TeX-active-master' > by a parameter for specifying if the output should include the > directory or not. That parameter will get passed to `TeX-region-file' > or `TeX-master-file' respectively. > > Currently I tend to the latter solution because the shorter file > specifier doesn't clutter the minibuffer as much as a full path. In > addition it would be in line with what the user gets in the DVI case > (%d expander). The drawback is that it might look strange to get the > bare file name when the command is invoked in a subdirectory not > containing the output file. TeX-current-file-name-master-relative seems to be appropriate here. -- David Kastrup, Kriemhildstr. 15, 44793 Bochum