-%% DO NOT EDIT this file manually; it is automatically
-%% generated from LSR http://lsr.dsi.unimi.it
-%% Make any changes in LSR itself, or in Documentation/snippets/new/ ,
-%% and then run scripts/auxiliar/makelsr.py
-%%
-%% This file is in the public domain.
-\version "2.14.2"
+% DO NOT EDIT this file manually; it is automatically
+% generated from Documentation/snippets/new
+% Make any changes in Documentation/snippets/new/
+% and then run scripts/auxiliar/makelsr.py
+%
+% This file is in the public domain.
+%% Note: this file works from version 2.18.0
+\version "2.18.0"
\header {
-%% Translation of GIT committish: d5307870fe0ad47904daba73792c7e17b813737f
- texidocfr = "
-Voici comment construire une commande de @emph{markup} chargée
-d'agrémenter du texte ou autre annotation, d'une bordure sur trois
-côtés.
-
-"
- doctitlefr = "Encadrement sur trois côtés"
-
- lsrtags = "rhythms, text, scheme-language"
+ lsrtags = "rhythms, scheme-language, text"
texidoc = "
This example shows how to add a markup command to get a three sided box
doctitle = "Three-sided box"
} % begin verbatim
-
% New command to add a three sided box, with sides north, west and south
% Based on the box-stencil command defined in scm/stencil.scm
% Note that ";;" is used to comment a line in Scheme
% The corresponding markup command, based on the \box command defined
% in scm/define-markup-commands.scm
#(define-markup-command (NWS-box layout props arg) (markup?)
+ #:properties ((thickness 0.1) (font-size 0) (box-padding 0.2))
"Draw a box round @var{arg}. Looks at @code{thickness},
@code{box-padding} and @code{font-size} properties to determine line
thickness and padding around the markup."
- (let* ((th (chain-assoc-get 'thickness props 0.1))
- (size (chain-assoc-get 'font-size props 0))
- (pad (* (magstep size)
- (chain-assoc-get 'box-padding props 0.2)))
- (m (interpret-markup layout props arg)))
- (NWS-box-stencil m th pad)))
+ (let ((pad (* (magstep font-size) box-padding))
+ (m (interpret-markup layout props arg)))
+ (NWS-box-stencil m thickness pad)))
% Test it:
c1^\markup { \NWS-box ABCD }
c1^\markup { \NWS-box \note #"4" #1.0 }
}
-