Postprocessing of log file

The official TeXShop Support Forum.

Postprocessing of log file

Postby matze » Fri Mar 02, 2012 7:27 pm

Hi guys,

is there a way to post-process the log file after typesetting. I'm looking for a way to display warnings, overfull and underfull boxes written into the log file after each typesetting.

The most convenient way for me would be to show those information in the console. Does there exists already something in this direction?

Otherwise, I could think of a bash script that is executed after each typesetting whose output is parsed into the console...

Do you have any recommendation?

Thank you
Matze
matze
 
Posts: 4
Joined: Fri Mar 02, 2012 7:16 pm

Re: Postprocessing of log file

Postby Herbert Schulz » Sat Mar 03, 2012 12:35 pm

Howdy,

Not built-in at this time but if you have, or can find, a bash script to do that sort of thing you could build and engine that includes the running of the script.

The Console output window is Searchable but you must first select (i.e., Click in) the Console Pane in that window.
Good Luck,
Herb Schulz
Herbert Schulz
 
Posts: 1489
Joined: Thu May 12, 2005 2:31 pm

Re: Postprocessing of log file

Postby matze » Sat Mar 03, 2012 6:21 pm

That's good enough for me. I tried to create my custom search engine. I put the file containing

#!/bin/tcsh

BASENAME = 'basename $1 .tex'

grep -e Warning -e Overfull -e Underfull $(BASENAME).log



into ~/Library/Engines/

and made it executable (744). However, it does not show up after restart under the typesetting menu in TeXShop. Do you have a hint?

I'm using Mac Os X 10.7.3 and TexShop 3.04.


Thx
Matze
matze
 
Posts: 4
Joined: Fri Mar 02, 2012 7:16 pm

Re: Postprocessing of log file

Postby Herbert Schulz » Sat Mar 03, 2012 7:04 pm

Howdy,

What did you call it? It must have a .engine extension.

Do you use any other engines? If so you might simply add those lines to the bottom of those engines.

Wait.... It won't show up in the Typeset MENU but only in the popup menu. That's why I suggest just adding it to an engine that already exists that you use for processing.

Also, is $(...) correct? I've always used ${...} but maybe either works.
Good Luck,
Herb Schulz
Herbert Schulz
 
Posts: 1489
Joined: Thu May 12, 2005 2:31 pm

Re: Postprocessing of log file

Postby matze » Sat Mar 03, 2012 7:42 pm

Hi,

the engine was already there in the popup menu. The correct script is (at least it works for me):

---- begin of file ---
#!/bin/bash

BASENAME=$(basename $1 .tex)

grep --color -e Warning -e Overfull -e Underfull $BASENAME.log
---- end of file ---

I usually use an external editor. Is there a way to associate a keyboard shortcut with the new engine or ``append'' it to the LaTeX engine?

Thx for all your help!
Matze
matze
 
Posts: 4
Joined: Fri Mar 02, 2012 7:16 pm

Re: Postprocessing of log file

Postby Herbert Schulz » Sat Mar 03, 2012 8:21 pm

Howdy,

Do you really need to use tex->dvi->ps->pdf processing or will pdflatex work for you?

No good way to make the old, built-in (pdf)latex engine but you can try the latexmk engines. These may be activated by moving the .engine files from ~/Library/Engines/Inactive/Latexmk/ up two directories, to ~/Library/Engines/, and restart TeXShop. To use the latexmk engine (for dvi style processing) put the line

% !TEX TS-program = latexmk

at the top of the file. Replace latexmk with pdflatexmk to use pdflatex processing. I believe all these work with External Editors and TeXShop processing and previewing.

Oh, these engines will also take care of all necessary bibtex/makeindex processing and resolving cross-references.

If those work for you try to add your post-processing commands to the bottom of the .engine file.
Good Luck,
Herb Schulz
Herbert Schulz
 
Posts: 1489
Joined: Thu May 12, 2005 2:31 pm

Re: Postprocessing of log file

Postby matze » Sat Mar 03, 2012 8:42 pm

Thank you! I will try your recommendations...

--
Matze
matze
 
Posts: 4
Joined: Fri Mar 02, 2012 7:16 pm


Return to TeXShop (engl.)

Who is online

Users browsing this forum: EddieGar, Oscar095 and 1 guest

cron