From: tom s. <to...@as...> - 2004-08-26 03:35:38
|
>On Wed, 25 Aug 2004 22:09:12 -0500, Jay Belanger wrote: >> Wait a minute. I think I've been asleep. So the change, intended to >> deal with a warning (not an error), has introduced the possibility of >> an error in the default case? > No; I was terribly unclear. > No new errors (that I'm aware of) were added; I was responding to > Ralf's musings about adding other functionality. Yes, but there was a warning, when hyperlatex got to the line that read 'mv file.gif .', and now there's an error when a directory doesn't exist to store the output file. Or perhaps I'm missing something. > I don't think that Hyperlatex used to be able to deal with directories > in the image names (I just double checked --- it couldn't), it can't > now, either. My unclear, long-winded message was only meant to say I > didn't know of a good way of dealing with things like No, it didn't. TeX doesn't do so well here, either. But that's why packages like psfig.sty have a \psfigurepath command, to specify the source file. I put this in my siteinit to deal with more-or-less the same problem when I was making a psfig parallel for hyperlatex: \HlxEval{ (put 'figpath 'hyperlatex 'hyperlatex-ts-set-figurepath) (put 'figuremove 'hyperlatex 'hyperlatex-ts-figuremove) (defvar hyperlatex-ts-figurepath) (defun hyperlatex-ts-set-figurepath () (setq hyperlatex-ts-figurepath (hyperlatex-parse-required-argument))) (defun hyperlatex-ts-figuremove () (if hyperlatex-final-pass (let ((file (hyperlatex-parse-required-argument))) (let ((infile (concat hyperlatex-ts-figurepath "/" file)) (outfile (concat hyperlatex-html-directory "/" file))) (message "Copying %s to %s" infile outfile) (copy-file infile outfile t))))) } \newcommand{\figureplace}[7][\relax]{ \begin{figure}[#3] \label{#4} \begin{center}\xmlattributes{img}{border="0"} \EmptyP{#7}{\xlink{\htmlimage{#6}}{#7}}{\htmlimage{#6}} \caption{#2} \end{center} \end{figure} \figuremove{#6}} This was only to move files from the source to the html directory, but it's more or less the same problem you're dealing with. Wouldn't it be better to have an \imagepath command instead of messing with the command syntax? Plus that does away with the confusion about what the directory is supposed to mean. > \begin{image}{directory/name} > ... > \end{image} > Hyperlatex couldn't deal with that before and it can't deal with it > now. In this case, it's not really clear what the right behavior should be. That's the real hurdle. It's not possible from this syntax to tell what is intended: is this directory where the file comes from or where it's going? The meaning simply isn't clear, to a person or a sophisticated text editing program. -tom ------------------------ tomfool at as220 dot org http://sgouros.com http://whatcheer.net |