Re: [tex4ht] Output directory
On 18/02/11 5:05 AM, Karl Berry wrote: > \Needs{"mkdir -p mytmp"} > \Needs{"mv \jobname.{4ct,4tc,aux,css,dvi,idv,html,lg,log,xref} mytmp"} > > Sure, as long as \write18 is enabled, that's another way. If you're > only using tex4ht on your own documents, that's ok, but it's much too > dangerous to enable by default. Makefile is by far the elegant solution. I depend too much on make which is a fairy godmother for me. :) Karl, do we need shell-escape enabled to execute commands embedded in \Needs{...}? I am not sure about it, as I always run TeX with shell-escape enabled by default. However, \Needs command writes the contents to a file called \jobname.lg, which is read by 't4ht' binary that creates the \jobname.css and executes system commands in \jobname.lg. That is how validation of the xml/html output is done with a parser. \write18 may not be helpful in this matter, since during the compilation process, we don't have the outputs available. Seems like \Needs is a safe command for system related operations. Best -- Radhakrishnan
Re: [tex4ht] Output directory
\Needs{"mkdir -p mytmp"} \Needs{"mv \jobname.{4ct,4tc,aux,css,dvi,idv,html,lg,log,xref} mytmp"} Sure, as long as \write18 is enabled, that's another way. If you're only using tex4ht on your own documents, that's ok, but it's much too dangerous to enable by default. Best, k
Re: [tex4ht] Output directory
On 17/02/11 6:19 AM, Karl Berry wrote: [...] > I'm not aware of any such "tidy" option :(. It would be nice, but it's > not exactly simple to implement (nothing is :(). > > I appreciate that this isn't a general solution, but FWIW, what I do is > run everything using a Makefile and rm the stuff afterwards. As in: > > htlatex whatever.tex > rm -f *.4ct *.4tc *.aux *.dvi *.idv *.lg *.log *.tmp *.trc *.xref > rm -f *.4es *.png tmp > > (Of course one may not to actually delete all such files every time, etc...) Sorry for late reply. I think, we can make use of \Needs command in an effective manner. Please see the following example: %> Begin <- \documentclass[a4paper]{article} \begin{document} \title{Title} \author{Author} \maketitle \section{Section One} This is a test for moving all files to another directory. \Needs{"mkdir -p mytmp"} \Needs{"mv \jobname.{4ct,4tc,aux,css,dvi,idv,html,lg,log,xref} mytmp"} \end{document} %--> End <-- You might prefer to use the system commands specific to your operating system. Best regards -- Radhakrishnan
Re: [tex4ht] Output directory
Hi Christian, -dwww/ works fine Good. and right, only the .html and .css output files are copied to the subdirectory after the conversion. At least we're seeing the same behavior. Is there an option / a way that all the "temporary" files which remain in the current directory could be deleted automatically? I'm not aware of any such "tidy" option :(. It would be nice, but it's not exactly simple to implement (nothing is :(). I appreciate that this isn't a general solution, but FWIW, what I do is run everything using a Makefile and rm the stuff afterwards. As in: htlatex whatever.tex rm -f *.4ct *.4tc *.aux *.dvi *.idv *.lg *.log *.tmp *.trc *.xref rm -f *.4es *.png tmp (Of course one may not to actually delete all such files every time, etc...) Best, karl
Re: [tex4ht] Output directory
htlatex texfile "html" "" "-d/www/" 1) How about -dwww/ rather than /www/? The latter looks like it's trying to write into a root directory. 2) The directory has to exist; htlatex probably won't create it. 3) It appears to me that only the .html and .css output files are written to the subdirectory. All the intermediate and log files are written to the current directory as usual. Best, Karl
[tex4ht] Output directory
Hi list, I would like to define an output directory, where the files are put when converting in html. The output dir "www" should be just a sub dir of the tex file. For now, I tried htlatex texfile "html" "" "-d/www/" Unfortunately, the resulting files go directly into the same folder as the tex files sits and nit in the sub folder "www". How could I properly define an output dir? Thanks, -- Christian -Spam will be a thing of the past in two years' time.- Bill Gates, Jan 2004