@c @rprogram
@c @rsnippets
@c @rinternals
+@c all these also have a @...named version, which allows to specify the
+@c displayed text for the reference as second argument
-@ifhtml
-@c ***** HTML *****
+@c ***** HTML + bigpage is a special case (other manual names), all other
+@c formats are treated similarly
+
+@ifnottex
@ifset bigpage
@ref{\TEXT\,,,music-glossary-big-page,Music Glossary}
@end macro
+@macro rglosnamed{TEXT,DISPLAY}
+@vindex \TEXT\
+@ref{\TEXT\,,\DISPLAY\,music-glossary-big-page,Music Glossary}
+@end macro
+
@macro rlearning{TEXT}
@vindex \TEXT\
@ref{\TEXT\,,,lilypond-learning-big-page,Learning Manual}
@end macro
+@macro rlearningnamed{TEXT,DISPLAY}
+@vindex \TEXT\
+@ref{\TEXT\,,\DISPLAY\,lilypond-learning-big-page,Learning Manual}
+@end macro
+
@macro ruser{TEXT}
@vindex \TEXT\
@ref{\TEXT\,,,lilypond-big-page,Notation Reference}
@end macro
+@macro rusernamed{TEXT,DISPLAY}
+@vindex \TEXT\
+@ref{\TEXT\,,\DISPLAY\,lilypond-big-page,Notation Reference}
+@end macro
+
@macro rprogram{TEXT}
@vindex \TEXT\
@ref{\TEXT\,,,lilypond-program-big-page,Application Usage}
@end macro
+@macro rprogramnamed{TEXT,DISPLAY}
+@vindex \TEXT\
+@ref{\TEXT\,,\DISPLAY\,lilypond-program-big-page,Application Usage}
+@end macro
+
@macro rlsr{TEXT}
@ref{\TEXT\,,,lilypond-snippets-big-page,Snippets}
@end macro
+@macro rlsrnamed{TEXT,DISPLAY}
+@ref{\TEXT\,,\DISPLAY\,lilypond-snippets-big-page,Snippets}
+@end macro
+
@macro rinternals{TEXT}
@vindex \TEXT\
@ref{\TEXT\,,,lilypond-internals-big-page,Internals Reference}
@end macro
+@macro rinternalsnamed{TEXT,DISPLAY}
+@vindex \TEXT\
+@ref{\TEXT\,,,lilypond-internals-big-page,Internals Reference}
+@end macro
+
@end ifset
@ref{\TEXT\,,,music-glossary,Music Glossary}
@end macro
-@macro rlearning{TEXT}
+@macro rglosnamed{TEXT,DISPLAY}
@vindex \TEXT\
-@ref{\TEXT\,,,lilypond-learning,Learning Manual}
+@ref{\TEXT\,,\DISPLAY\,music-glossary,Music Glossary}
@end macro
-@macro ruser{TEXT}
-@vindex \TEXT\
-@ref{\TEXT\,,,lilypond,Notation Reference}
-@end macro
-
-@macro rprogram{TEXT}
-@vindex \TEXT\
-@ref{\TEXT\,,,lilypond-program,Application Usage}
-@end macro
-
-@macro rlsr{TEXT}
-@ref{\TEXT\,,,lilypond-snippets,Snippets}
-@end macro
-
-@macro rinternals{TEXT}
-@vindex \TEXT\
-@ref{\TEXT\,,,lilypond-internals,Internals Reference}
-@end macro
-
-@end ifclear
-
-@end ifhtml
-
-
-@ifdocbook
-@c ***** DOCBOOK-XML *****
-
-@macro rglos{TEXT}
+@macro rlearning{TEXT}
@vindex \TEXT\
-@ref{\TEXT\,,,music-glossary,Music Glossary}
+@ref{\TEXT\,,,lilypond-learning,Learning Manual}
@end macro
-@macro rlearning{TEXT}
+@macro rlearningnamed{TEXT,DISPLAY}
@vindex \TEXT\
@ref{\TEXT\,,,lilypond-learning,Learning Manual}
@end macro
@ref{\TEXT\,,,lilypond,Notation Reference}
@end macro
-@macro rprogram{TEXT}
+@macro rusernamed{TEXT,DISPLAY}
@vindex \TEXT\
-@ref{\TEXT\,,,lilypond-program,Application Usage}
+@ref{\TEXT\,,\DISPLAY\,lilypond,Notation Reference}
@end macro
-@macro rlsr{TEXT}
-@ref{\TEXT\,,,lilypond-snippets,Snippets}
+@macro rprogram{TEXT}
+@vindex \TEXT\
+@ref{\TEXT\,,,lilypond-program,Application Usage}
@end macro
-@macro rinternals{TEXT}
+@macro rprogramnamed{TEXT,DISPLAY}
@vindex \TEXT\
-@ref{\TEXT\,,,lilypond-internals,Internals Reference}
+@ref{\TEXT\,,\DISPLAY\,lilypond-program,Application Usage}
@end macro
-@end ifdocbook
-
-
-@ifinfo
-@c **** INFO ****
-
-@macro rglos{TEXT}
-@vindex \TEXT\
-@ref{\TEXT\,,,music-glossary,Music Glossary}
+@macro rlsr{TEXT}
+@ref{\TEXT\,,,lilypond-snippets,Snippets}
@end macro
-@macro rlearning{TEXT}
-@vindex \TEXT\
-@ref{\TEXT\,,,lilypond-learning,Learning Manual}
+@macro rlsrnamed{TEXT,DISPLAY}
+@ref{\TEXT\,,\DISPLAY\,lilypond-snippets,Snippets}
@end macro
-@macro ruser{TEXT}
+@macro rinternals{TEXT}
@vindex \TEXT\
-@ref{\TEXT\,,,lilypond,Notation Reference}
+@ref{\TEXT\,,,lilypond-internals,Internals Reference}
@end macro
-@macro rprogram{TEXT}
+@macro rinternalsnamed{TEXT,DISPLAY}
@vindex \TEXT\
-@ref{\TEXT\,,,lilypond-program,Application Usage}
+@ref{\TEXT\,,\DISPLAY\,lilypond-internals,Internals Reference}
@end macro
-@macro rlsr{TEXT}
-@ref{\TEXT\,,,lilypond-snippets,Snippets}
-@end macro
+@end ifclear
-@macro rinternals{TEXT}
-@vindex \TEXT\
-@ref{\TEXT\,,,lilypond-internals,Internals Reference}
-@end macro
+@end ifnottex
-@end ifinfo
@c **** TEX ****
@ref{\TEXT\,,,music-glossary,Music Glossary}
@end macro
+@macro rglosnamed{TEXT,DISPLAY}
+@vindex \TEXT\
+@ref{\TEXT\,,\DISPLAY\,music-glossary,Music Glossary}
+@end macro
+
@macro rlearning{TEXT}
learning manual, @ref{\TEXT\,,,lilypond-learning,Learning Manual}
@end macro
+@macro rlearningnamed{TEXT,DISPLAY}
+learning manual, @ref{\TEXT\,,\DISPLAY\,lilypond-learning,Learning Manual}
+@end macro
+
@macro ruser{TEXT}
notation reference, @ref{\TEXT\,,,lilypond,Notation Reference}
@end macro
+@macro rusernamed{TEXT,DISPLAY,DISPLAY}
+notation reference, @ref{\TEXT\,,\DISPLAY\,lilypond,Notation Reference}
+@end macro
+
@macro rprogram{TEXT}
program usage manual, @ref{\TEXT\,,,lilypond-program,Application Usage}
@end macro
+@macro rprogramnamed{TEXT,DISPLAY}
+program usage manual, @ref{\TEXT\,,\DISPLAY\,lilypond-program,Application Usage}
+@end macro
+
@macro rlsr{TEXT}
@ref{\TEXT\,,,lilypond-snippets,Snippets}
@end macro
+@macro rlsrnamed{TEXT,DISPLAY}
+@ref{\TEXT\,,\DISPLAY\,lilypond-snippets,Snippets}
+@end macro
+
@macro rinternals{TEXT}
@vindex \TEXT\
@code{\TEXT\}
@end macro
+@macro rinternalsnamed{TEXT,DISPLAY}
+@vindex \TEXT\
+@code{\DISPLAY\}
+@end macro
+
@end iftex