Since \hspace creates an invisible stencil, any following markup is
effectively spaced at a distance of (hspace-amount + word-space).
* scm/define-markup-commands.scm (hspace):
subtract word-space from amount
(define-markup-command (hspace layout props amount)
(number?)
#:category align
+ #:properties ((word-space))
"
@cindex creating horizontal spaces in text
three
}
@end lilypond"
- (if (> amount 0)
- (ly:make-stencil "" (cons 0 amount) '(0 . 0))
- (ly:make-stencil "" (cons amount amount) '(0 . 0))))
+ (let ((corrected-space (- amount word-space)))
+ (if (> corrected-space 0)
+ (ly:make-stencil "" (cons 0 corrected-space) '(0 . 0))
+ (ly:make-stencil "" (cons corrected-space corrected-space) '(0 . 0)))))
;; todo: fix negative space
(define-markup-command (vspace layout props amount)