[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Trouble defining markup functiion
From: |
Carl Sorensen |
Subject: |
Trouble defining markup functiion |
Date: |
Thu, 17 Jan 2019 14:27:08 +0000 |
User-agent: |
Microsoft-MacOutlook/10.10.5.181209 |
I'm trying to define a markup function for establishing a common set of
formatting for a number of text markups.
%%% beginning of sample code
\version "2.19.82"
\displayScheme
\markup{\sans{\fontsize #10 "C"}} % Just used to show the scheme markup
command -- this is what I'm trying
#(define-markup-command (chord-name-markup layout props chord-name) (markup?)
"Display a chord name in the desired formatting"
(interpret-markup layout props
(make-line-markup (#:sans (#:fontsize 10 chord-name)))))
\markup \chord-name-markup "E"
%%% end of code
I've used displayScheme to get the representation of the markup function. I've
found that is uses #:line so that I have to use make-line-markup.
When I run this code, I get
Processing
`/var/folders/q5/88k2s1717qv1v7rq4tqz53k80000gn/T/frescobaldi-fmnvoopw/tmpc0ltmn4y/document.ly'
Parsing.../var/folders/q5/88k2s1717qv1v7rq4tqz53k80000gn/T/frescobaldi-fmnvoopw/tmpc0ltmn4y/document.ly:9:32:
In expression (#:fontsize 10 chord-name):
/var/folders/q5/88k2s1717qv1v7rq4tqz53k80000gn/T/frescobaldi-fmnvoopw/tmpc0ltmn4y/document.ly:9:32:
Wrong type to apply: #:fontsize
Apparently, in the context of make-line-markup I can't use #:fontsize as the
first element in a list, because it's not applyable.
How can I do this properly?
Thanks,
Carl
- Trouble defining markup functiion,
Carl Sorensen <=