How does the ABC music typesetting package configure spacing with the value passed to width. The documentation says width is the dimension best expressed as a fraction of \abcwidth

As width is one of the only user passed parameters:

  1. Is the calculation that sets up spacing between notes and number of bars per line computed by the package?
  2. Or is it driven by the externally called programs such as abcm2ps and thus this is no longer a remotely TeX controlled calculation.
  • 1
    Actually, the documentation is incorrect; one should say \renewcommand{\abcwidth}{\dimexpr⟨fraction ⟩\linewidth\relax} (or any other length parameter instead of \linewidth) so width=.5\abcwidth works as well. The width value is passed to \includegraphics, not to abcm2ps. – egreg Jun 27 '15 at 22:50
  • @egreg does that mean the music spacing is calculated internally, and the graphic is scaled to the page width or user defined size? If this is the case I am an still not sure if it abcm2ps that deals with note and bar spacing or the latex package, which could still need to paramaterize the spacing and wrapping so the notes are not microscopic. A possibility the external image generator can't really plan for if I understand it correctly. – EngBIRD Jun 27 '15 at 22:56
  • There's no way to set the width with abcm2ps that I know of. If you know one, then pass it as an option to abcm2ps. – egreg Jun 27 '15 at 23:16

Apart from the slip in the documentation (discussed later), here is how width works.

Giving width=<dimen> to an abc environment results in width=<dimen> being passed to the final \includegraphics command. This only scales up or down the included PDF file and has no influence whatsoever on how abcm2ps processes its input when producing the score.

The options=<text> key, instead, passes the <text> as command line options to abcm2ps; so if you want to influence the width here, you should do something like

options={-O= -c -w 10cm}

(note that -O= -c are the default command line options).

The default value for width is \abcwidth, that's set to \linewidth. However, this is not a length, so if you for example want to set the width to 80% of \linewidth without having to specify this in all abc environments, you can say


and so you can override the default width by saying width=.45\abcwidth (say for placing two scores side by side). This is not necessary if \abcwidth has the default definition.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.