This is about the speedata Publisher. Room language is English (and perhaps German)
pgundlach on develop
Hyperlinks for images and boxes… Clean up Go source files / buil… Use golang.org/x/text/unicode/b… and 3 more (compare)
pgundlach on develop
Romannumeral Document sectioning (matters) Links to pages and 5 more (compare)
$font
looks empty to sp in <DefineFontalias existing="{$font}" alias="Font1"/>
<Value select="sd:format-string(Betrag,'%.2f' €)"/>
setlocale("de_DE")
übergeben. Wie mache ich das in speedata?
sd:format-number()
, mit der Zahlen formatiert werden können. Hilft das? (https://doc.speedata.de/publisher/de/xpathfunktionen/)
Naja, damit kann ich gerade noch so leben.
Auch eine Locale-Abhängigkeit haben die Datumsfunktionen aus Lua (os.date). Ist daran gedacht, diese (zumindest in der engl. Variante) mit den entsprechenden Formatierungsparametern zu unterstützen?
Noch eine andere Frage: Im Beispiel „runningsum“ ist die Ausgabe einer Summe in der Fußzeile einer Tabelle beschrieben. Die fertigen Summen werden aber alle direkt aus der Datei data.xml
geholt. Gibt es eine einfache Möglichkeit, die Summe direkt im zu erstellenden Dokument zu berechnen?
@jorg.l_gitlab Ich habe derzeit keine Pläne, os.date etc. zu unterstützten. Eher das, was es bei XPath in dieser Richtung gibt, wobei ich gerade da keinen Überblick habe.
Zu runningsum: klar, kann man die Daten auch dynamisch berechnen. Du musst nur die Variable _last_tr_data
zu jeder Zeile neu setzen.
<SavePages>
to create virtual pages. You can count them with sd:count-saved-pages
and write Page X of Y on the virtual pages before putting them in your final pdf with <InsertPages>
.
Thanks, that works, sorry I missed it.
On another topic, is there any way to deal with situations like the below one?
I've been searching around but can't find any starting point at least.
<para>
Please refer to the <link address="page12">Chapter 1</link> for a brief history of the <tool>hammer</tool> and more details about its usage.
</para>
As you can see <para> element has also text and XML child elements alternating.
For the <link> I would like to create a link using <A>
For the <tool> I would like to create a marker.
Is there any way to achieve this in speedata?
<data>
<para>
<val>Please refer to the </val>
<link address="page12">Chapter 1</link>
<val>for a brief history of the </val>
<tool>hammer</tool>
<val>and more details about its usage. </val>
</para>
</data>
@pgundlach That sounds quite complex, these were just some examples, but there are many many more situations, this would mean we should create a pre-processing program to adjust the XML to these requirements.
Something else I noticed, regarding the internal links to a PDF page, the attribute "link" of the <A> element can only be text.
It would be better if this attribute would allow X-path expressions. Because at the moment the link destination has to be hardcoded in the layout. In many cases you can generate the link and the destination with variables.
@MihailCosmin For the first issue: I usually use a preprocessing stage when I get input from some source that I can't control. The publisher comes with Saxon 9 and you can call it with the lua script.
The second issue is quite easy to solve: include your xpath into curly braces, such as link="{ xpath expression }"