Working with latex frames
|Installation • Usage • PDF issues • Imposition • Other|
This article is intended to be a compilation of operations pertaining to LaTeX frames.
|All Working with pages:|
First you have to configure the path to your latex executable. Go to File -> Preferences -> External Tools and set the pathes for the latex executable and your editor. The easiest way to do this is to click on "Rescan" and all required values are filled in automatically.
Note: Manual configuration is only required if something goes wrong or you want to do something special. First try the autoconfiguration by clicking "Rescan"! If you want to manually configure an other LaTeX executable type in the path, but make sure that the following requirement is met:
- The output must be in a format that scribus can display in an image frame. (for example PNG, JPEG, PostScript, PDF) This means that you can't use plain LaTeX, because it produces DVI output.
You can use the following placeholder in your commandline:
- %dir Temporary directory ( = the directory of the input file)
- %dpi Current dpi setting
- %file The input file (if this placeholder is not used the last parameter will automatically be the filename)
All latex documents are automatically prefixed with an preamble which you also can configure in this dialog. Normaly the predefined text should work, but you can input any valid latex source. If you want one frame not to use the globaly defined preamble then you don't have to delete it, but you can disable it on a per frame basis. (see section "Specials" for details)
Placing latex frames
Select the TODO:PLACE IMAGE HERE item from the toolbar and then draw a frame where you want your formula to be placed. After some seconds a default latex file should be rendered. This contains some sample code to make the process of creating your own code more easy.
There are some specialcodes to access scribus values from your latex document. They all look like this: $scribus_XXX$
The following variables are available:
- $scribus_noprepost$ Disable the preamble (Note: This variable is not replaced by anything so it's a good idea to place it on a comment line!)
- $scribus_width$ Frame width in pt
- $scribus_height$ Frame height in pt
- $scribus_realwidth$ Effective frame width after removing left border and applying scale in pt
- $scribus_realheight$ Effective frame height after removing top border and applying scale in pt
- $scribus_offsetX$ Left border in pt
- $scribus_offsetY$ Top border in pt
- $scribus_scaleX$ Scale factor in horizontal direction (e.g. 0.5 = 50%, 1.0 = 100%, 2.0 = 200%)
- $scribus_scaleY$ Scale factor in vertical direction
- $scribus_dpi$ The DPI setting for this frame. Only valid when the frame is processed as raster graphics (i.e. currently always)