Embedding other external tools into a TeX frame

From Scribus Wiki
Revision as of 13:24, 2 October 2007 by TomZ (talk | contribs)
Jump to navigation Jump to search


Since version 1.3.5, Scribus knows the frame type "TeX". Frames of this type are normally used to integrate a LateX document into Scribus. But with this function, it is possible to integrate the output of any external program into Scribus. Some prerequisites are necessary:

  • The external program should be a commandline program. It has to take an input file as argument and produces an output file.
  • The output has to be in a format, which is readable by a Scribus image frame. For example, PDF, SVG, JPG, and a lot of other bitmap formats are possible.

To configure Scribus to use an arbitrary external program as input for the TeX frames, open "File / Preferences" and edit the settings for "External Tools". Here, you find the entry "LateX":

  • Delete the text in "Preamble" and "End".
  • Change the command in "Name of Executable" to your needs. Here, you can use the variables "%file" which stands for the input and "%file.pdf" which represents the output file. If your file is not in PDF format and you specify in "Output file extension" an other extension, then use use that extension instead of PDF in the output variable. For example, a PNG file format is refered as "%file.png".


Here are some examples, how external programs can be embedded into Scribus:

XSLO FO with Apache FOP

Command: fop -fo %file -pdf %file.pdf

Output File Extension: .pdf

If you want to integrate XSL FO, rendered with the Apache FOP, you have to change the executable to:

This implies that the command "fop" is available in your actual path. Here is a screenshot of the preferences settings:

Graphs with GraphWiz

Command: dot -Tps %file -o %file.ps

Output File Extension: .ps

GraphViz is an application for drawing graphs, trees and similiar representations of hierarchical structured data. Beside the here used PostScript output, GraphViz is also able to produce GIF, PNG and some more formats which Scribus can't read. Using the PostScript output should work fine.

The code for the example:

digraph unix {
	edge [color ="blue"];
	"S" [color="#f94949", style=filled];
	node [shape="box", color="#6767ed", style=filled];
	"S" -> "NP";
	"S" -> "VP";	
	"NP" -> "DET";
	"NP" -> "NOUN";	
	"VP" -> "VERB";
	node [shape="box", color="#82ec80", style=filled]
	"DET" -> "Der";
	"NOUN" -> "Hund";
	"VERB" -> "bellt";