\version "2.21.7" %{ Typographie française. Ajoute automatiquement les espaces appropriées autour des ponctuations (deux-points, point-virgule, point d'exclamation et point d'interrogation). Reconnaît aussi `` et '' comme guillemets. Transforme un guillet informatique simple ' en apostrophe typographique, et trois points successifs en points de suspension. %} % Reconnaître les versions avec espaces % normales pour les remplacer par des espaces % insécables. Ainsi, la typographie fonctionne % aussi bien sur "mot:" que "mot :". % La substitutions sur la plus longue partie est % systématiquement choisie par LilyPond. #(define (make-replacements string replacement) (map (lambda (search) (cons search replacement)) (list (string-append " " string " ") (string-append " " string) (string-append string " ") string))) #(define (around before string after) (make-replacements string (string-append before string after))) nothing = "" sp = " " nbsp = " " % Espace insécable nnbsp = " " % Espace fine insécable #(define (debug x) (display x) x) \paper { #(add-text-replacements! (append (around nothing "," sp) (around nothing "." sp) (around nbsp ":" sp) (around nnbsp ";" sp) (around nnbsp "!" sp) (around nnbsp "?" sp) (make-replacements "..." "… ") (make-replacements "``" (string-append sp "«" nnbsp)) (make-replacements "''" (string-append nnbsp "»" sp)) '(("'" . "’")) )) } % Tests % \markup "A,C; C'EST ; D : D: E ? F! d``G'' `` G '' ..."