Linking Render Frames

Previous topic - Next topic

nanoflow

Hi together,
is it possible to link render frames as you would link normal text frames? It would be great to design the pages of a magazine with Scribus but to use the typesetting capability of LaTex. But as I see it, I would have to divide the source code of a two ore more page article into multiple render frames.
All the best,
Florian

a.l.e

hi florian

the render frames are not only for latex... and not all the "formats" supported are compatible with linking.

but in the case of the latex frames i agree that it could be possible to make them linked... but there is some work to be done!
it's not much and i'm sure that -- if you're a latex user -- you could do some if not almost all of the work necessary for it!

sadly, i'm not sure that it is a future proof solution*.
so, i'm not sure that slightly enhancing them by adding the linking is a good idea...

ciao
a.l.e


* as far as i know, render frames are just image frames and are included as the original pdf when you enable the "experimental" pdf-embedding: but, then, you lose all the color management on that part of the pdf.

eudoxos

Hi Florian,

it is not directly possible, but you can use a workaround... I just used it. One problem to watch for is that the pseudo-linked frames (which will display pages of the LaTeX document) must have exactly the same size. Of course direct support for this in scribus would be excellent, but... you know. Do like this:

Create same-sized render frames (anywhere in the scribus doc) with the following content for the render code:

\def\scrPageNumber{1} % change to 2, 3, ... in every render frame
\def\scrPaperWd{$scribus_width_inch$in}
\def\scrPaperHt{$scribus_heigh_inch$in}
% you have to use absolute path (latex is run in a temp dir), see https://bugs.scribus.net/view.php?id=15332
\input /absolute/path/to/document/latex-content.tex


Create latex-content.tex (call it whatever is suitable) like this (it will be included after \scrPageNumber, \scrPageHt, \scrPageWd will have been defined by each frame)

\documentclass[...]{article}
% PAPER SIZE: set same as the render frame, leave 1mm on each side for protrusion, see https://bugs.scribus.net/view.php?id=14873
\usepackage[margin=1mm,papersize={\scrPaperWd,\drPaperHt}{geometry}
% PAGE SELECTION: output one page per frame only!!!
\usepackage[\scrPageNumber]{pagesel}
\usepackage{atbegshi} % avoid warning from atbegshi, include after pagesel: https://tex.stackexchange.com/questions/219255/atbegshi-warnings-printed-as-part-of-output
%% COLORS: if you use colored text, make sure to include luacolor (and run w/ lualatex) otherwise you end up with bad color on pages after the first page
%% see https://tex.stackexchange.com/questions/431090/how-to-discard-pages-from-pdf-output-without-affecting-text-color
\usepackage{xcolor}
\usepackage{luacolor}
% FONT AND OTHER PACKAGES
\usepackage{fontspec}
\setmainfont[...]{...}

% DOCUMENT BODY

\begin{document}
   \color[cmyk]{.4,0,0,.6}
   your text here
   which can span several pages
   where each page goes to its respective
   render frame
\end{document}


Now if you want to test your document outside of scribus, create another main file, like latex-main.tex:
\def\scrPageNumber{-} % output all pages
% use some values for testing
\def\scrPaperWd{48mm}
\def\scrPaperHt{151mm}
\input latex-content.tex


HTH, Vaclav