Am Montag, 17. Dezember 2007 06:47:34 schrieb Bo Peng:
> It is difficult to write tikz figures for beamer slides because it is
> easy to make grammar mistakes, and it is difficult to preview the
> figure.
I am writing such figures in separate, \input'ed .tikz files that I preview
externally (see attached posting).
> Actually, previewing ERT has been requested several times,
> which makes me wonder if it is desired to have a 'preview selection'
> feature. Basically, the source code of the selected text is extracted
> (via the same method as view source), put to a latex file and compile
> (similar to instant preview). The result can be displayed in a special
> panel (tabbed with view source?) or a separate windows.
I see the need for something like this (e.g. my above script will disrespect
the preamble from the main .tex/.lyx file, so the output may not be
accurate). It would be very nice to have fast, proper preview, but...
> On the GUI side, this can be made to a 'view dvi' (or additionally
> 'view pdf') button to the view-source dialog...
..I do not think what the GUI should look like. The above does not sound
right yet (a general "selection preview" sounds fragile and not very
user-friendly to me). Maybe one could explicitly wrap such figure code as
external material and preview as such.
--
Ciao, / /
/--/
/ / ANS
--- Begin Message ---
Hi again,
I just thought I could/should post my small script for previewing TikZ
pictures:
http://kogs-www.informatik.uni-hamburg.de/~meine/software/scripts/tikz2pdf
I am using it as follows:
- write (/program) your .tikz picture in a separate file (let's call it
foo.tikz)
- start "tikz2pdf foo.tikz &"
- open tikz2pdf_temp.pdf in a PDF viewer with auto-reload feature
(I am using kpdf)
- now continue editing foo.tikz; as soon as you save the file, it will be
conveniently redisplayed
Shortcomings of the script:
- the fixed .tex/.pdf basename of "tikz2pdf_temp"
- you have to manually delete the temp files with "rm tikz2pdf_temp.*"
afterwards
- includes a fixed preamble; maybe you need to add your own latex \usepackage
stuff there (should probably be using a ~/.tikz2pdfrc instead)
- could possibly start the viewer on its own
- needs python 2.4+ (depends on the subprocess module)
Would be interested in any kind of feedback. :-)
--
Ciao, / /
/--/
/ / ANS
-------------------------------------------------------------------------
This SF.net email is sponsored by: Microsoft
Defy all challenges. Microsoft(R) Visual Studio 2005.
http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/
_______________________________________________
pgf-users mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/pgf-users
--- End Message ---