Liebe Lilys!
Es geht um text-verarbeitung. Ich will, so wie man im Word kennt, das Text rechts haben. Dabei sollte die Absätze auch so Enden, dass die "Lücke" links ist nicht rechts. right-align, right-column, hilft mir alles nichts. Was fehlt mir??
\version "2.12.3"
myText = \markup {
\override #'(line-width . 50)
\wordwrap {
blah blah blah blah blah blah blah blah blah blah blah blah blah blah
blah blah blah blah blah blah blah blah blah blah blah blah blah blah
blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah
blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah
blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah
blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah
}
}
\markup {
\fill-line { "" "" \myText }
}
Dank und Gruß!
Kil
ok vielleicht habe ich das nicht so gut erklärt..... Hier ist ein PDF das ich mit OpenOffice gemacht habe. Alles "Rechtsbündig". Ich könnte die Spielanweisungen natürlich auch in OpenOffice schreiben, aber ich will für alles doch Lilypond benutzen ;D
Ideen?
Danke!
LG
kill
Hallo Kilgore,
ich kenne leider nichts um das von Dir gewünschte Ergebnis zu erreichen aber in der lilypond-eigenen Datei
define-markup-commands.scm
wird wordwrap genauso wie auch justify, right-column und right-aligned definiert. Theoretisch sollte es möglich sein das zu verändern, aber dazu reichen meine Kenntnisse nicht aus.
Gruß
Harm
Ja mit justify sollte es auch gehen. Ich bin so weit gekommen jetzt....es sieht fast richtig aus, nur sind die Worte in der falschen Reihenfolge!!
\version "2.12.3"
myText = \markup {
\override #'(line-width . 50)
\override #'(text-direction . -1 )
\justify {
Die Worte sind in der falschen Reihenfolge blah blah blah blah blah blah blah blah
blah blah blah blah blah blah blah blah blah blah blah blah blah blah
blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah
blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah
blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah
blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah
blah blah
}
}
\markup {
\fill-line { "" "" \myText }
}
???
Ich suche und suche durch die Doks und finde gar nichts dazu. Ganz komisch....sogar hier im Forum kann man mit einem einfachen Knopfdruck alles "rechtsbündig" kriegen. Gibts echt kein Befehl dafür?
Falls Du's noch brauchst:
\version "2.12.3"
#(define (general-column align-dir baseline mols)
(let* ((aligned-mols (map (lambda (x) (ly:stencil-aligned-to x X align-dir)) mols)))
(stack-lines -1 0.0 baseline aligned-mols)))
#(define-markup-command (wordwrapRight layout props args)
(markup-list?)
(general-column RIGHT 3 (wordwrap-internal-markup-list layout props #f args)))
% Beispiel:
\markup { \fill-line {
" "
\override #'(line-width . 70) \wordwrapRight {
Dieses Text bleibt auch beim Zeilenbruch RECHTS. Dieses Text bleibt auch beim Zeilenbruch
RECHTS. Dieses Text bleibt auch beim Zeilenbruch RECHTS. Dieses Text bleibt auch beim
Zeilenbruch RECHTS. Dieses Text bleibt auch beim Zeilenbruch RECHTS. Dieses Text bleibt auch
beim Zeilenbruch RECHTS. Dieses Text bleibt auch beim Zeilenbruch RECHTS. Dieses Text bleibt
auch beim Zeilenbruch RECHTS. Dieses Text bleibt auch beim Zeilenbruch RECHTS. Dieses Text
bleibt auch beim Zeilenbruch RECHTS. Dieses Text bleibt auch beim Zeilenbruch RECHTS.
Dieses Text bleibt auch beim Zeilenbruch RECHTS. Dieses Text bleibt auch beim Zeilenbruch
RECHTS. Dieses Text bleibt auch beim Zeilenbruch RECHTS. Dieses Text bleibt auch beim
Zeilenbruch RECHTS. Dieses Text bleibt auch beim Zeilenbruch RECHTS. Dieses Text bleibt auch
beim Zeilenbruch RECHTS.}
" "
}
}
\markup { \fill-line {
" "
\override #'(line-width . 40) \fontsize #'4 \wordwrapRight {
Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed
do eiusmod tempor incididunt ut labore et dolore magna aliqua.
Ut enim ad minim veniam, quis nostrud exercitation ullamco
laboris nisi ut aliquip ex ea commodo consequat. }
" "
}
}
%{
Anmerkung:
Die baseline-skip ist jetzt hard-coded und kann nur noch in der Definition geändert werden.
Hier ist es die 3 in:
#(define-markup-command (wordwrapRight layout props args)
(markup-list?)
(general-column RIGHT 3 (wordwrap-internal-markup-list layout props #f args)))
Das habe ich leider nicht anders hinbekommen.
%}
;D ;D ;D ;D ;D
Ich hatte fast aufgegeben! Tausend Dank harm6!!!!!!!!!!!!!!!
Hallo Harm,
coole Sache!!! Das wäre doch echt was für's LSR (http://lsr.dsi.unimi.it/LSR/html/contributing.html)!
Grüße, Robert
@kilgore:
Gern geschehn!
@RobUr:
Ist in Arbeit!
Hallo zusammen,
ein Preview ist auf http://lsr.dsi.unimi.it/LSR/Item?u=1&id=765 (http://lsr.dsi.unimi.it/LSR/Item?u=1&id=765) einsehbar.
Zusammen mit einer Definition für centered Text.
Kommentare und Verbesserungsvorschläge sind sehr willkommen (mein Englisch ist sehr schlecht)!
Grüße,
Harm
fantastic!!
:D
Hallo,
mit 2.14.0 ist es gelungen \textRight und \textCenter auch für \override #'(baseline-skip . a) zugänglich zu machen:
\version "2.14.0"
% Defines right-aligned and centered text.
% Code is taken from ./scm/define-mark-up-commands.scm and just slightly modified.
#(define (general-column align-dir baseline mols)
(let* ((aligned-mols (map (lambda (x) (ly:stencil-aligned-to x X align-dir)) mols)))
(stack-lines -1 0.0 baseline aligned-mols)))
#(define-markup-command (textRight layout props args)(markup-list?)
#:properties ((baseline-skip))
(general-column RIGHT baseline-skip (wordwrap-internal-markup-list layout props #f args)))
#(define-markup-command (textCenter layout props args)(markup-list?)
#:properties ((baseline-skip))
(general-column CENTER baseline-skip (wordwrap-internal-markup-list layout props #f args)))
% ------------------------------------------------------------------------------
% example
\markup {
\column {
\fill-line {
\null
\override #'(baseline-skip . 4)
\override #'(line-width . 40)\textRight {
Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed
do eiusmod tempor incididunt ut labore et dolore magna aliqua.
Ut enim ad minim veniam, quis nostrud exercitation ullamco
laboris nisi ut aliquip ex ea commodo consequat.}
}
\null\null\null
\fill-line {
\null
\override #'(baseline-skip . 6)
\override #'(line-width . 40)\textCenter {
Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed
do eiusmod tempor incididunt ut labore et dolore magna aliqua.
Ut enim ad minim veniam, quis nostrud exercitation ullamco
laboris nisi ut aliquip ex ea commodo consequat.}
\null
}
\null\null\null
% common wordwrap:
\fill-line {
\override #'(line-width . 40)\wordwrap {
Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed
do eiusmod tempor incididunt ut labore et dolore magna aliqua.
Ut enim ad minim veniam, quis nostrud exercitation ullamco
laboris nisi ut aliquip ex ea commodo consequat.}
\null
}
}
}
Leider kann ich das Snippet noch nicht ins LSR packen, da dort noch 2.12.2 benutzt wird.
Gruß,
Harm