[texworks] customizing the previewer

Stefan Löffler st.loeffler at gmail.com
Sun Jul 1 17:27:07 CEST 2012


Hi,

On 2012-05-20 19:53, Alin M Elena wrote:
> I work on a latex document, a multifile one. I use as a build system cmake and 
> UseLatex.cmake...
>
> now what I would love to be able to do... is to make the previewer to 
> open/update the generated pdf.... Is there any why of doing this?

Yes. The preferred way is to set the root file (see
http://code.google.com/p/texworks/wiki/TipsAndTricks#Defining_a_root_file)
in the files you run the typesetting from. Normally, this would point to
the main file that is passed to LaTeX. TeXworks will automatically take
this, substitute the ending by ".pdf", and open that file in the
previewer (if it exists). I guess you could even let the root file point
to a non-existent file for the issue at hand, as long as the path and
filename allow to derive the path to the pdf.

Alternatively, you could probably extend your build system to launch the
pdf in TeXworks. Since it is a single-instance app, only a new window
should be opened.

BTW: The pdf preview should refresh automatically when the pdf file
changes on the disk, IIRC.

> also... is there any chance to get klatexformula into texworks?

There are no current plans for that, but...
... you can always add it as an enhancement request to the issue list
... it should be fairly easy to write a script that launches
klatexformula, possibly with the content of the math environment the
cursor is in at the moment as the initial content; there just is no way
that I know of to get the data back into TeXworks (other than manual
copy and paste, of course).

HTH
Stefan



More information about the texworks mailing list