Extracting text from markup: Difference between revisions
Appearance
Import snippet from LSR |
m New category Tags: Mobile edit Mobile web edit |
||
| (2 intermediate revisions by 2 users not shown) | |||
| Line 1: | Line 1: | ||
This scheme function extracts a string from markup, removing any formatting information. | This scheme function extracts a string from markup, removing any formatting information. | ||
<lilypond version="2.24 | <lilypond version="2.24"> | ||
%% http://lsr.di.unimi.it/LSR/Item?id=747 | %% http://lsr.di.unimi.it/LSR/Item?id=747 | ||
| Line 23: | Line 23: | ||
[[Category:Text]] | [[Category:Text]] | ||
[[Category:Scheme]] | [[Category:Scheme]] | ||
[[Category:Snippet]] | |||
Latest revision as of 23:28, 21 November 2025
This scheme function extracts a string from markup, removing any formatting information.
\version "2.24"
%% http://lsr.di.unimi.it/LSR/Item?id=747
#(define-markup-command (plain-text layout props arg)(markup?)
(interpret-markup layout props (markup (markup->string arg))))
ttt = \markup {
\normal-text { good day and \concat { hello \bold { world } } \italic { and moon } }
}
\header {
title = \ttt
subtitle = \markup { \normal-text { \italic { \plain-text \ttt } } }
}
\relative c' {
c
}