Hi,
I'm setting up a newspaper, and I would insert the today date somewhere in the page. I didn't found any variable for that. I'm wondering if do it exist or maybe a script can work for it.
Any idea?
Thank you
Renato
don't think it does
it's experimental but maybe you could use the variable text so then you would only need to enter it once while you're editing
"variable text"?
Is it a variable? where can I find it?
Renato
variable-date.gif
Ok, I've found it and inserted into frame text, but what can I do then to replace variable with the value (i.e. "today" with 19/01/2023). I think I must "compile"or whatever action to substitute the variable name with the real value. IS it?
Renato
It is shown in the animation how it is changed from "today" to "tomorrow".
yes, it is shown on the post, but what I'm asking is: how can I swap "today" with "20 January 2024" or something in different format.
Renato
what about using your keyboard?
... or if you're a real hacker a butterfly? ...
(https://imgs.xkcd.com/comics/real_programmers.png)
but you have to hurry, otherwise "20 January 2024" will already be in the past...
yes! I will use emacs (is the editor that I use). I've done it and it works! And I will wait for a new version with the date variable.
Thank you
Renato
well, good luck inserting a date field (that you can centrally update) in emacs...
but i know nothing about emacs, so it might have a trick also for that...
Well, Scribus can render Latex code & there is \date in Latex... just kidding, variable text is proper way to do.
you mean changing the date via emacs or whatever text editor, right?
hi renato
take another look at ale's screencast. in the third text frame he replaced the entry for the mark labeled 'date' (without an external editor...)
utnik
still don't understand...
Can I replace the string "today" with a value?
Thank you
Renato
let's try with some italian... maybe the problem is with understanding english...
renato, in italiano, caso mai il problema fosse con l'inglese (la speranza è l'ultima a morire)...
invece di tradurre "tomorrow" con "domani", prova a scrivere "23 gennaio 2024" (che oggi è domani) e vedi l'effetto che fa...
e il giorno seguente, cambia il 23 in 24.
e così via fino all'eternità. (no, non cambi ogni giorno il 23 in 24, poi vengono il 25, il 26, il 27, finché non torni all'1; ma questo ormai spero l'abbiano capito anche i sassi).
perché oggi lavori al giornale di domani, e sul giornale di domani, che impagini oggi, tu vuoi che appaia la data di domani, non la data di oggi. e domani lavorerai al giornale di dopodomani.
e questo vale anche se tu, quando hai scritto "giornale" (newspaper), pensavi piuttosto ad una rivista ("magazine")... solo che, in quel caso, invece di domani avrai qualcosa come il prossimo lunedì (no, non "prossimo lunedì": "29 gennaio 2024"!).
oufh.
Is there a list of all the variables that can be added to a document this way? It would be handy.
hi admfubar
what do you mean by
Quote...all the variables that can be added to a document this way?
as there is no automatism to fill in some text, you are free to add variables as you like.
afaik there is just the name of the variable and the text which replaces it in the actual text frames.
...or did i miss something?
utnik
and how do you define this variable on the fly?
I was asking for a list of usable variables.. But you are saying that you define it as needed.
hi admfubar
Quote from: AdmFubar on January 23, 2024, 07:39:28 AMand how do you define this variable on the fly?
take a look at the first step in ale's screencast! he defined a variable as
'date' and populated it with
'today' (which he altered in a later step...)
utnik
great.. but where does "today" get its value from?
It is a text you write.
The text variable named "date" is first set to contain the text "today", then it is changed to "tomorrow".
So everywhere where you have inserted the variable named "date" first shows "today", and after the variable has been changed it shows "tomorrow".
So you can define the variable named "date" to be whatever you want. "today", "tomorrow", "23 January 2024", "Stardate 7643.5".
let me see if i have this straight..
One would name a variable in scribus, manually assign it a value. then went ever you type that variable in it shows up.
So how does one get the current date into that variable? I dont see this method as being useful for this use case. what am i missing?
hi admfubar
Quote from: AdmFubar on January 23, 2024, 09:00:27 PMSo how does one get the current date into that variable?
as i wrote before, there's no automatism. (in other words: scribus doesn't know what
'date' is used for...) you need to insert the date once manually to tell scribus how to populate every instance of the variable.
QuoteI dont see this method as being useful for this use case.
you're right. if you don't know the current date, text variables are useless. but if you do, you might use them...
utnik
i think that people have issues with the concept of variable (in computer science).
a variable is not something that changes by itself, it's a way to put a common value in a container and give it a name.
it's not called a "variable" because it changes its own content by itself, but because you're allowed to change its content (the opposite is a "constant", where you set the value once and you're not supposed to change it later).
my final world on this topic: i recognize that it would be "cool" to have some sort of dynamic field that shows the current date, but for layout purposes, i fear that such a field would be pretty useless since you almost never want to have the layout date (or time) in the layout itself.