Re: Using strings and other types to return markup

2016-05-12 Thread Phil Holmes
- Original Message - 
From: "Johan Vromans" <jvrom...@squirrel.nl>

To: <lilypond-user@gnu.org>
Sent: Wednesday, May 11, 2016 10:50 PM
Subject: Re: Using strings and other types to return markup



On Wed, 11 May 2016 17:58:52 +0100
"Phil Holmes" <m...@philholmes.net> wrote:


Attached is my LilyPond approximation of that
section of the madrigal.


Regarding the ye versus Þe -- it seems wrong to me to simulate the
appearance of a handwritten glyph (thorn, but looking like y) with the 
wrong

glyph.

This is a generic problem when typesetting hand-written texts. For 
example,

some people like to write a z with a tail ('long zett' IIRC). When
transcribing, should this be simulated with e.g. an ezh? Or just use a z
since that is the meaning of the glyph?



The original I'm using is not hand-written - it's printed - and the 
character used in it is an actual y.


--
Phil Holmes 



___
lilypond-user mailing list
lilypond-user@gnu.org
https://lists.gnu.org/mailman/listinfo/lilypond-user


Re: [OT] Scribal abbreviations (Was: Re: Using strings and other types to return markup)

2016-05-11 Thread Andrew Bernard
Hi Graham and Phil,

On 12/05/2016, 3:28 AM, "lilypond-user on behalf of Graham King" 
 wrote:

  
Strictly speaking, I think we're talking about a macron, rather than a tilda.  
It's not just macrons of course: Phil is dabbling in the wonderful world of 
scribal abbreviations. 

I agree. I think it’s a macron indicating an elided n or m that Phil has got.

An introduction to scribal abbreviations, a very fascinating rabbit hole:

https://en.wikipedia.org/wiki/Scribal_abbreviation

Andrew



___
lilypond-user mailing list
lilypond-user@gnu.org
https://lists.gnu.org/mailman/listinfo/lilypond-user


Re: Using strings and other types to return markup

2016-05-11 Thread Johan Vromans
On Wed, 11 May 2016 17:58:52 +0100
"Phil Holmes"  wrote:

> Attached is my LilyPond approximation of that
> section of the madrigal.

Regarding the ye versus Þe -- it seems wrong to me to simulate the
appearance of a handwritten glyph (thorn, but looking like y) with the wrong
glyph.

This is a generic problem when typesetting hand-written texts. For example,
some people like to write a z with a tail ('long zett' IIRC). When
transcribing, should this be simulated with e.g. an ezh? Or just use a z
since that is the meaning of the glyph?




___
lilypond-user mailing list
lilypond-user@gnu.org
https://lists.gnu.org/mailman/listinfo/lilypond-user


[OT] Scribal abbreviations (Was: Re: Using strings and other types to return markup)

2016-05-11 Thread Graham King
Strictly speaking, I think we're talking about a macron, rather than a
tilda.  It's not just macrons of course: Phil is dabbling in the
wonderful world of scribal abbreviations.  Most people are interested in
expanding (rather than reproducing) the abbreviations, and for anyone
trying to do so the following reference might be helpful (particularly
if you're dealing with facsimiles of manuscript, rather than early
printed sources):

"The elements of abbreviation in medieval Latin paleography" by Adriano
Capelli, translated by David Heimann & Richard Kay[1] 

Unicode support for these glyphs is described at the Medieval Unicode
Font Initiative [2].

The whole subject is a bit of a rabbit-hole, and can easily lead to an
entire evening spent translating the attached image to the word
"jocundissima" ... :)

[1] https://kuscholarworks.ku.edu/handle/1808/1821
[2] http://folk.uib.no/hnooh/mufi/specs/index.html

Hope this is helpful and not too far off-topic.

-- Graham

___
lilypond-user mailing list
lilypond-user@gnu.org
https://lists.gnu.org/mailman/listinfo/lilypond-user


Re: Using strings and other types to return markup

2016-05-11 Thread Christopher R. Maden

On 05/11/2016 11:58 AM, Phil Holmes wrote:

I didn't think it was really a tilde either, but it just seemed to
make a close approximation.  Attached is my LilyPond approximation of
that section of the madrigal.


It is a tilde; the tilde derives precisely from the scriptural 
abbreviation for elided characters (not always n).


At https://en.wikipedia.org/wiki/Tilde > you can find a list of 
the Unicode precomposed characters (copy and paste them if you don’t 
feel like figuring out how to type them).


The Unicode character “combining tilde” can be used to put a tilde over 
arbitrary preceding characters; for example, c◌̃ may show as c-with-tilde 
in your mail.


You can enter arbitrary Unicode characters in LilyPond with e.g.

\char ##x0303

for the combining tilde.

~Chris
--
Chris Maden, text nerd  http://crism.maden.org/ >
“If you’ve been a man o’ action, though you’re lying there in traction,
 You will gain some satisfaction thinkin’, ‘Jesus, at least I tried.’”
  — Andy M. Stewart (1952–2015), “Ramblin’ Rover”

___
lilypond-user mailing list
lilypond-user@gnu.org
https://lists.gnu.org/mailman/listinfo/lilypond-user


Re: Using strings and other types to return markup

2016-05-11 Thread Phil Holmes
- Original Message - 
From: Andrew Bernard

To: Phil Holmes ; lilypond-user@gnu.org
Sent: Wednesday, May 11, 2016 4:45 PM
Subject: Re: Using strings and other types to return markup


[Sorry plain texters this is just not able to be shown in 7 bit ASCII]


Manually back to text :-)

As to the mark above the a as an elided n, I think it’s a type of slant 
accent – this is what I recall seeing also in 18c Enlgish works. Not 
really a tilde.


I didn't think it was really a tilde either, but it just seemed to make a 
close approximation.  Attached is my LilyPond approximation of that section 
of the madrigal.


--
Phil Holmes


___
lilypond-user mailing list
lilypond-user@gnu.org
https://lists.gnu.org/mailman/listinfo/lilypond-user


Re: Using strings and other types to return markup

2016-05-11 Thread Andrew Bernard
Hi Phil,

On 12/05/2016, 1:04 AM, "Phil Holmes"  wrote:

Here we go - late C16 (1597 to be precise).  Note also the abbreviated 
"ye" - I think this is a tiny "e" above the "y".




Yes, ‘ye' is interesting.

>From the good wikipedia article on Ye:

https://en.wikipedia.org/wiki/Ye_(pronoun)

Confusion with definite article[edit]
"Ye" is also sometimes used to represent an Early Modern English form of the 
word "the" (traditionally pronounced /ðiː/), such as in "Ye Olde Shoppe". "Ye" 
was often written "" (here the "e" is written above the other letter to save 
space but it could also be written on the line). The lower letter is thorn, 
commonly written þ but which in handwritten scripts could resemble a "y" as 
shown. "Thorn" is is the predecessor to the modern digraph "th". The wordThe 
was thus written Þe and never as Ye. Medieval printing presses did not contain 
the letter thorn so the letter y was substituted owing to its similarity with 
some medieval scripts, especially later ones. This substituted orthography 
leads most speakers of Modern English to always pronounce "ye" as /ji:/even 
when "ye" is not intended as a pronoun but as as the definite article and the 
pronunciation is /ðiː/ or i/ðə/.



[Sorry plain texters this is just not able to be shown in 7 bit ASCII]



So it’s a y with a small e, but it should be a thorn, but, as the article says, 
they often did not have thorn in the font case.



As to the mark above the a as an elided n, I think it’s a type of slant accent 
– this is what I recall seeing also in 18c Enlgish works. Not really a tilde.



Andrew





___
lilypond-user mailing list
lilypond-user@gnu.org
https://lists.gnu.org/mailman/listinfo/lilypond-user


Re: Using strings and other types to return markup

2016-05-11 Thread Phil Holmes
- Original Message - 
From: "Andrew Bernard" <andrew.bern...@gmail.com>

To: <lilypond-user@gnu.org>
Sent: Wednesday, May 11, 2016 2:04 PM
Subject: Re: Using strings and other types to return markup



Hi Phil,

On 11/05/2016, 9:12 PM, "lilypond-user on behalf of Phil Holmes" 
<lilypond-user-bounces+andrew.bernard=gmail@gnu.org on behalf of 
m...@philholmes.net> wrote:


2.  It's a bit more complicated, though.  16th century printers have a 
habit

of eliding an n from a word and instead putting what looks like (but might
not be) a tiny tilde above the previous letter to show this.


I was also wondering why you were not using Unicode. Anyway, do you have 
any images showing examples of this 16c practice? I would be interested to 
have a look. This is, as you say, a different requirement to using a fixed 
unicode glyph from a font. I think I have seen similar practice in 18c 
English printed text, but I don’t think the wiggles that I have seen are 
tildes as such. You are reaLly after something for text glyphs that is 
similar to an ornament on a note glyph.


Now that I come to think of it, there is a vast typographic tradition of 
putting symbols on top of letters to mean various abbreviations, for 
example the old No. with a bar over the o to mean the abbreviation for 
number. A really interesting topic. The scheme code is definitely worth 
having in hand.



Here we go - late C16 (1597 to be precise).  Note also the abbreviated 
"ye" - I think this is a tiny "e" above the "y".


--
Phil Holmes 
___
lilypond-user mailing list
lilypond-user@gnu.org
https://lists.gnu.org/mailman/listinfo/lilypond-user


Re: Using strings and other types to return markup

2016-05-11 Thread Andrew Bernard
Hi Phil,

On 11/05/2016, 9:12 PM, "lilypond-user on behalf of Phil Holmes" 
 wrote:

>2.  It's a bit more complicated, though.  16th century printers have a habit 
>of eliding an n from a word and instead putting what looks like (but might 
>not be) a tiny tilde above the previous letter to show this.

I was also wondering why you were not using Unicode. Anyway, do you have any 
images showing examples of this 16c practice? I would be interested to have a 
look. This is, as you say, a different requirement to using a fixed unicode 
glyph from a font. I think I have seen similar practice in 18c English printed 
text, but I don’t think the wiggles that I have seen are tildes as such. You 
are reaLly after something for text glyphs that is similar to an ornament on a 
note glyph.

Now that I come to think of it, there is a vast typographic tradition of 
putting symbols on top of letters to mean various abbreviations, for example 
the old No. with a bar over the o to mean the abbreviation for number. A really 
interesting topic. The scheme code is definitely worth having in hand.

Andrew






___
lilypond-user mailing list
lilypond-user@gnu.org
https://lists.gnu.org/mailman/listinfo/lilypond-user


Re: Using strings and other types to return markup

2016-05-11 Thread Brian Barker

At 12:12 11/05/2016 +0100, Phil Holmes wrote:

... (if I had a list of unicode characters with tildes over them to hand) ...


See
https://en.wikipedia.org/wiki/Tilde#Precomposed_Unicode_characters .

Brian Barker  



___
lilypond-user mailing list
lilypond-user@gnu.org
https://lists.gnu.org/mailman/listinfo/lilypond-user


Re: Using strings and other types to return markup

2016-05-11 Thread Phil Holmes
- Original Message - 
From: "Johan Vromans" <jvrom...@squirrel.nl>

To: <lilypond-user@gnu.org>
Sent: Wednesday, May 11, 2016 11:19 AM
Subject: Re: Using strings and other types to return markup



On Wed, 11 May 2016 09:31:28 + (UTC)
Phil Holmes <m...@philholmes.net> wrote:


I want to create a function in scheme that will take a string argument
something like "san~t" and return a markup which will place the tilde
above the n.


Why not just write sañt ? Lilypond understands unicode.



1.  I didn't know that character existed.
2.  It's a bit more complicated, though.  16th century printers have a habit 
of eliding an n from a word and instead putting what looks like (but might 
not be) a tiny tilde above the previous letter to show this.  So I want the 
tilde to be (a) much smaller than the letter, and (b) to be able to be 
placed over any other letter.  I would assume your solution would answer (b) 
(if I had a list of unicode characters with tildes over them to hand) but 
probably not (a).  It would, however, have saved me about 5 hours of 
tinkering with scheme :-o


\markup { "sant ->" \concat {  \combine a \translate #'(0.2 . 1.1) 
\fontsize #-6 ~ t } }



--
Phil Holmes 



___
lilypond-user mailing list
lilypond-user@gnu.org
https://lists.gnu.org/mailman/listinfo/lilypond-user


Re: Using strings and other types to return markup

2016-05-11 Thread Johan Vromans
On Wed, 11 May 2016 09:31:28 + (UTC)
Phil Holmes  wrote:

> I want to create a function in scheme that will take a string argument 
> something like "san~t" and return a markup which will place the tilde 
> above the n.

Why not just write sañt ? Lilypond understands unicode.

___
lilypond-user mailing list
lilypond-user@gnu.org
https://lists.gnu.org/mailman/listinfo/lilypond-user


Re: Using strings and other types to return markup

2016-05-11 Thread Phil Holmes
Thanks both.  I was sure I'd tried that as one of my variants, but clearly 
not.  I think if I had tried it, I was incorrectly calling the procedure 
with a string without the # before it.  FWIW I'd copied the syntax from the 
(markup (number->string newval) in 
http://lsr.di.unimi.it/LSR/Snippet?id=543 and Urs's explanation makes it 
clear that this is a function and so has (), whereas my attempt isn't, and 
so shouldn't.


--
Phil Holmes


- Original Message - 
From: "Urs Liska" <u...@openlilylib.org>

To: <lilypond-user@gnu.org>
Sent: Wednesday, May 11, 2016 10:46 AM
Subject: Re: Using strings and other types to return markup





Am 11.05.2016 um 11:43 schrieb Jan-Peter Voigt:

Hi Phil,

you just need to remove the parens around 'theText'. Also inside
(markup ...) everything is interpreted as a parameter for the function
(macro or whatever) 'markup' and evaluated as a scheme-expression for
thet purpose.


To clarify that more:

(theText)

tries to invoke a procedure 'theText', while

theText

represents the variable as passed into the function as an argument.

HTH
Urs



HTH
Jan-Peter

#(define-markup-command (do-tilde layout props theText) (string?)
  (interpret-markup layout props
(markup theText )
))


Am 11.05.2016 um 11:31 schrieb Phil Holmes:

I'm not top posting


I want to create a function in scheme that will take a string argument
something like "san~t" and return a markup which will place the tilde
above the n.  I know how to create the markup using markup functions
like
combine and translate, but I want to make this easier by using a scheme
function.  I'm struggling to work out how to take a string argument and
use it to return markup.  My test function is:

#(define-markup-command (do-tilde layout props theText) (string?)
   (interpret-markup layout props
 (markup (theText) )
))

I call it with:

mel = \relative c'' { c4  }
lyr = \lyricmode { \markup { \do-tilde #"Testing" } }
<<
\new Voice = melody \mel
\new Lyrics \lyricsto melody \lyr




I get the error

In expression (theText):
LyricTest.ly:13:17: Wrong type to apply: "Testing"

Can anyone point out to me what I'm doing wrong (or how to do this
correctly?)

TIA


___
lilypond-user mailing list
lilypond-user@gnu.org
https://lists.gnu.org/mailman/listinfo/lilypond-user




___
lilypond-user mailing list
lilypond-user@gnu.org
https://lists.gnu.org/mailman/listinfo/lilypond-user



___
lilypond-user mailing list
lilypond-user@gnu.org
https://lists.gnu.org/mailman/listinfo/lilypond-user




___
lilypond-user mailing list
lilypond-user@gnu.org
https://lists.gnu.org/mailman/listinfo/lilypond-user


Re: Using strings and other types to return markup

2016-05-11 Thread Urs Liska


Am 11.05.2016 um 11:43 schrieb Jan-Peter Voigt:
> Hi Phil,
>
> you just need to remove the parens around 'theText'. Also inside
> (markup ...) everything is interpreted as a parameter for the function
> (macro or whatever) 'markup' and evaluated as a scheme-expression for
> thet purpose.

To clarify that more:

(theText)

tries to invoke a procedure 'theText', while

theText

represents the variable as passed into the function as an argument.

HTH
Urs

>
> HTH
> Jan-Peter
>
> #(define-markup-command (do-tilde layout props theText) (string?)
>   (interpret-markup layout props
> (markup theText )
> ))
>
>
> Am 11.05.2016 um 11:31 schrieb Phil Holmes:
>>> I'm not top posting
>>
>> I want to create a function in scheme that will take a string argument
>> something like "san~t" and return a markup which will place the tilde
>> above the n.  I know how to create the markup using markup functions
>> like
>> combine and translate, but I want to make this easier by using a scheme
>> function.  I'm struggling to work out how to take a string argument and
>> use it to return markup.  My test function is:
>>
>> #(define-markup-command (do-tilde layout props theText) (string?)
>>(interpret-markup layout props
>>  (markup (theText) )
>> ))
>>
>> I call it with:
>>
>> mel = \relative c'' { c4  }
>> lyr = \lyricmode { \markup { \do-tilde #"Testing" } }
>> <<
>> \new Voice = melody \mel
>> \new Lyrics \lyricsto melody \lyr

>>
>> I get the error
>>
>> In expression (theText):
>> LyricTest.ly:13:17: Wrong type to apply: "Testing"
>>
>> Can anyone point out to me what I'm doing wrong (or how to do this
>> correctly?)
>>
>> TIA
>>
>>
>> ___
>> lilypond-user mailing list
>> lilypond-user@gnu.org
>> https://lists.gnu.org/mailman/listinfo/lilypond-user
>>
>
>
> ___
> lilypond-user mailing list
> lilypond-user@gnu.org
> https://lists.gnu.org/mailman/listinfo/lilypond-user


___
lilypond-user mailing list
lilypond-user@gnu.org
https://lists.gnu.org/mailman/listinfo/lilypond-user


Re: Using strings and other types to return markup

2016-05-11 Thread Jan-Peter Voigt

Hi Phil,

you just need to remove the parens around 'theText'. Also inside (markup 
...) everything is interpreted as a parameter for the function (macro or 
whatever) 'markup' and evaluated as a scheme-expression for thet purpose.


HTH
Jan-Peter

#(define-markup-command (do-tilde layout props theText) (string?)
  (interpret-markup layout props
(markup theText )
))


Am 11.05.2016 um 11:31 schrieb Phil Holmes:

I'm not top posting


I want to create a function in scheme that will take a string argument
something like "san~t" and return a markup which will place the tilde
above the n.  I know how to create the markup using markup functions like
combine and translate, but I want to make this easier by using a scheme
function.  I'm struggling to work out how to take a string argument and
use it to return markup.  My test function is:

#(define-markup-command (do-tilde layout props theText) (string?)
   (interpret-markup layout props
 (markup (theText) )
))

I call it with:

mel = \relative c'' { c4  }
lyr = \lyricmode { \markup { \do-tilde #"Testing" } }
<<
\new Voice = melody \mel
\new Lyrics \lyricsto melody \lyr




I get the error

In expression (theText):
LyricTest.ly:13:17: Wrong type to apply: "Testing"

Can anyone point out to me what I'm doing wrong (or how to do this
correctly?)

TIA


___
lilypond-user mailing list
lilypond-user@gnu.org
https://lists.gnu.org/mailman/listinfo/lilypond-user




___
lilypond-user mailing list
lilypond-user@gnu.org
https://lists.gnu.org/mailman/listinfo/lilypond-user