[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: concatenating/converting string variables ?
From: |
Jan-Peter Voigt |
Subject: |
Re: concatenating/converting string variables ? |
Date: |
Fri, 17 May 2013 09:57:31 +0200 |
User-agent: |
Mozilla/5.0 (X11; Linux i686; rv:17.0) Gecko/20130510 Thunderbird/17.0.6 |
Hi Paul,
Am 17.05.2013 09:45, schrieb Paul Malcolm:
excuse me, just a trivial question, but I cannot seem to find the answer.
I want to add the date variable to one element of text in my title.
I have this in the preamble
date = #(strftime "%d-%m-%Y" (localtime (current-time)))
What I want to do is somehow add/concatenate this to a text string
for the name of person doing the arranging, which appears in the
header block, i.e.
arranger = "Arr. Maestro Smithington-Smythe"
How do I do this so I finally see
Arr. Maestro Smithington-Smythe, 17/May/2013
?
to concatenate strings you can use
#(string-append "Arr. Maestro Smithington-Smythe" ", " (strftime
"%d-%m-%Y" (localtime (current-time))) )
or
#(format "~A, ~A" arranger date)
(if arranger and date are variables with the desired strings)
To use this in a headerblock, you can use a construct like this:
\header {
arrangername = "Arr. Maestro Smithington-Smythe"
arrangerdate = #(strftime "%d-%m-%Y" (localtime (current-time)))
arranger = #(string-append arrangername ", " arrangerdate)
}
HTH
Best, Jan-Peter