Hi!
I would like to be able to do this in TM
1. select a .tex-file 2. run a macro that 2.1 selects all text 2.2 runs that text through a "tex-compiler" wich listens to stdin 2.3 pipe the results from the "tex-compiler" to the preview-app (can this too listen to stdin?) which show me a nice pdf
And if I like the results I can save the .tex-file otherwise not. The main point here is that I which to see the pdf without having to save my .tex-file.
Would someone help me with this? I have an idea on how this is supposed to be done...
1. record a macro (alt-cmd-m) 2. select all text (cmd-a) 3. filter through command (shift-alt-r) 3.1 input: selection 3.2 output: ? discard? 3.3 command: ??? something like "<build pdf> | open -a /Applications/Preview.app"
I just read that "open" cannot read from stdin so I guess it has to be some other way around. Please, I'm really lousy at this stuff. Help would be much appreciated!
Kindest Regards Ivar
On 30-12-2004 12:14, Ivar Åsell wrote:
I just read that "open" cannot read from stdin so I guess it has to be some other way around. Please, I'm really lousy at this stuff. Help would be much appreciated!
You could make shellscript and use the command 'tempfile' to create a temporary filename, store that in a variable, use Preview to open that file and then copy it over to your current file or delete it if it's not satisfactory.
Jeroen.
On Dec 30, 2004, at 12:14, Ivar Åsell wrote:
[...] The main point here is that I which to see the pdf without having to save my .tex-file.
Would someone help me with this?
You can do this as a command. TeX can't write to stdout nor can Preview load from stdin, but you can do this command(s):
rm /tmp/texput.pdf pdflatex -output-directory /tmp [ -f /tmp/texput.pdf ] && open -a Preview.app /tmp/texput.pdf
Standard in: Entire document Standard out: Discard
This should show your document as tex/pdf w/o requiring it to be asved. You may also want to use the '-file-line-error' option and use the separate window to parse the errors so that you can jump directly to the erroneous line -- I haven't experimented with it myself yet, since it has been a while since I last wrote a longer report in LaTeX ;)