lewdlime / abcm2ps

abcm2ps is a command line program which converts ABC to music sheet in PostScript or SVG format. It is an extension of abc2ps which may handle many voices per staff. abcm2ps is Copyright © 2014-2016 Jean-Francois Moine.
http://moinejf.free.fr/
GNU General Public License v3.0
82 stars 31 forks source link

Words other than trailing "The" get moved to front of title #78

Closed rcedward closed 3 years ago

rcedward commented 3 years ago

Titles such as "Kenny Gillies of Portnalong, Skye" get rendered as "Skye Kenny Gillies of Portnalong"

Expected: title gets rendered unmodified

Fix: In subs.c:trim_title, check for first letter after comma to be 'T', else do not move word to front

moinejf commented 3 years ago

Your fix does not work with titles as T:fine journey, A T:hübsche Frau, Die T:danse des canards, La

It is simpler to set:

%%titletrim 0

rcedward commented 3 years ago

Fair enough, but the comment in the code should be changed: "/ -- move trailing "The" to front, set to uppercase letters or add xref -- /"

Should read more like, / -- move trailing words such as "A" and "The" to front, set to uppercase letters or add xref -- /

The comment suggests the intent is to move only the word "The", but that's not what the code does.

To be honest, to me altering the title at all from what is in the .abc file is unexpected behavior. Perhaps logic should be reversed and the title should remain unaltered unless the user specifies %%titletrim 1

Cheers!

moinejf commented 3 years ago

You are right, but:

rcedward commented 3 years ago

Sounds good. Thanks!