Menu

#4766 Patch: new markup command `\with-dimensions-from`

Verified
Enhancement
2016-03-02
2016-02-07
No

This command acts as a front-end to \with-dimensions, taking the new dimensions from a markup object instead of having them explicitly given.

https://codereview.appspot.com/281710043/

:::TeX
\version "2.19.36"

\paper { #(set-paper-size "a10") indent = 0 }
#(ly:set-option 'point-and-click #f)
\header { tagline = ##f }

#(define-markup-command (with-dimensions-from layout props arg1 arg2)
  (markup? markup?)
  #:category other
  "
Print @var{arg2} with the dimensions of @var{arg1}."
  (let* ((stil1 (interpret-markup layout props arg1))
         (x (ly:stencil-extent stil1 0))
         (y (ly:stencil-extent stil1 1)))
    (interpret-markup layout props (markup #:with-dimensions x y arg2))))

\markup {
  \pattern #5 #Y #0 "x"
  \pattern #5 #Y #0 \with-dimensions-from "x" "f"
  \pattern #5 #Y #0 \with-dimensions-from "x" "g"
  \override #'(baseline-skip . 2)
  \column {
    \pattern #5 #X #0 "n"
    \pattern #5 #X #0 \with-dimensions-from "n" "m"
    \pattern #5 #X #0 \with-dimensions-from "n" "!"
  }
}
1 Attachments

Discussion

  • Anonymous

    Anonymous - 2016-02-07

    Passes make, make check and a full make doc

     
  • Anonymous

    Anonymous - 2016-02-08
    • Patch: new --> review
     
  • Anonymous

    Anonymous - 2016-02-12
    • Patch: review --> countdown
     
  • Anonymous

    Anonymous - 2016-02-12

    Patch on countdown for Feb 15th

     
  • Anonymous

    Anonymous - 2016-02-15
    • Patch: countdown --> push
     
  • Anonymous

    Anonymous - 2016-02-15

    Patch counted down please push.

     
  • Anonymous

    Anonymous - 2016-02-16
    • labels: --> FIxed_2_19_37
    • status: Started --> Fixed
    • Patch: push -->
     
  • Anonymous

    Anonymous - 2016-02-16

    author Simon Albrecht simon.albrecht@mail.de
    Tue, 16 Feb 2016 19:47:21 +0000 (19:47 +0000)
    committer James Lowe pkx166h@gmail.com
    Tue, 16 Feb 2016 19:48:28 +0000 (19:48 +0000)
    commit 25fe86c1db4017a46c3169912ceae8a6663b057e

     
  • Simon Albrecht

    Simon Albrecht - 2016-03-02
    • status: Fixed --> Verified
     
Want the latest updates on software, tech news, and AI?
Get latest updates about software, tech news, and AI from SourceForge directly in your inbox once a month.