Format parameters ================= The general layout of the printed scores may be changed in four ways: 1- at compilation time setting the values in abc2ps.h, 2- at running time in a 'format' file, 3- at startup time in the command line, 4- by pseudo-comments inside the tunes. For more about 3), have a look at options.txt. A format file contains lines giving the parameters values, format: parameter [parameter list] In a format file, empty lines and lines starting with '#' are ignored. The pseudo-comments used for formatting have the format: %%parameter [parameter list] Format parameters may appear in the command line by: --parameter [parameter list] Some pseudo-comments are treated while being parsed and cannot appear in a format file nor in the command line. These ones are listed at the end of this file. List of the format parameters ----------------------------- alignbars <int> Default: 0 Compilation: none Command line: none Description: Align the bars of the next <int> music lines. Such an alignment works only when there is only one voice in the music lines (no V: or %%staves allowed). aligncomposer <int> Default: 1 Compilation: none Command line: none Description: Tell where to display the composer field. A negative value means 'on the left', 0 means 'center', and a positive value means 'on the right'. annotationfont <font> [<encoding>] <size> Default: Helvetica 12 Compilation: none Command line: none Description: Set the annotation font to <font> with a size <size>. autoclef <bool> Default: 1 Compilation: none Command line: none Description: When true, set the clefs and possibly insert clef changes when no clef is defined in K: or V:. barnumbers <int> Same as 'measurenb'. barsperstaff <int> Default: 0 Compilation: none Command line: -B<int> Description: Try to typeset with <int> bars on each line. beginps Default: none Compilation: none Command line: none Description: Start a PostScript sequence which ends on 'endps'. This parameter may be found only in a format or ABC file (it cannot appear in the command line). Each line between 'beginps' and 'endps' is included in the PostScript output file. botmargin <unit> Default: 1cm Compilation: none Command line: none Description: Set the bottom margin to <unit>. bstemdown <bool> Default: 0 Compilation: none Command line: none Description: When set, the stem of the note on the middle of the staff goes downwards. Otherwise, it goes upwards or downwards according to the previous note. comball <bool> Default: 0 Compilation: none Command line: none Description: When 'combinevoices' is set, voice combination does not occurs when the pitches are a second, unisson or inverted. Setting this flag makes the combination to occur in all cases. combinevoices <bool> Default: 0 Compilation: none Command line: none Description: If 1, the notes of same duration belonging to voices of the same staff are combined giving chords. composerfont <font> [<encoding>] <size> Default: Times-Italic 14 Compilation: none Command line: none Description: Set the composer font to <font> with a size <size>. composerspace <unit> Default: 0.2cm Compilation: none Command line: none Description: Set the vertical space before the composer to <unit>. contbarnb <bool> Default: 0 Compilation: none Command line: none Description: If 0, the bar number of the second repeat(s) is reset to the number of the first repeat. If 1, the bars are sequencially numbered. continueall <bool> Default: 0 Compilation: none Command line: -c Description: Ignore the line breaks in tune if true. dateformat <text> Default: "\%b \%e, \%Y \%H:\%M" Compilation: none Command line: none Description: Define the format of the date and time. The possible values of this parameter are described in the manual pages of date(1) and strftime(3). Note: the '%'s must be escaped as '\%'. deco <name> <c_func> <ps_func> <h> <wl> <wr> [<str>] Default: none Compilation: none Command line: none Description: Define a decoration. !! this is an experimental feature which is subject to change in next releases and asks for a good knowledge of the internals of abcm2ps - see deco.abc for examples !! The actual arguments are: <name>: name of the decoration. If it is the name of an existing decoration, this one is redefined. <c_func>: index of a C function (defined in deco.c). The possible values are: 0, 1, 2: decoration near the note, inside the staff. 0: 'dot' and 'tenuto' 1: 'slide' 2: 'arpeggio' 3, 4, 5: decoration near the note, outside the staff, generally printed above the staff. 3: general 4: below the staff 5: long 'trill' (with start and stop) 6, 7: decoration tied to the staff (dynamic marks), generally printed below the staff. 6: general 7: long dynamic (with start and stop) <ps_func>: postscript function name or '-' if start of a long decoration. <h>: decoration height. It is the minimum height for +arpeggio+. <wl> and <wr>: left and right widths. These values are actually used for general dynamic marks only. <str>: text to display (for some postscript functions - see code). Decorations which names begin with 'head-' prevent the note head(s) to be drawn. dynalign <bool> Default: 1 Compilation: none Command line: none Description: When true, horizontally align the dynamic marks. encoding <encoding> | <int> Default: 0 Compilation: none Command line: -L<int> Description: Set the global font encoding to <encoding>, or to ISO-Latin<int>. The recognized encodings are: us-ascii iso-8859-1 (latin1) iso-8859-2 (latin2) iso-8859-3 (latin3) iso-8859-4 (latin4) iso-8859-9 (latin5) iso-8859-10 (latin6) native When the encoding is 'native', the encoding vectors of the fonts are not changed. <encoding> may be any string. In this case, the encoding vector must be defined by a sequence of 'postscript' commands. <int> may take values from '0' to '6'. The value '0' is the same as '1', but the PostScript encoding vector for Latin1 is not output. exprabove <bool> Default: 0 Compilation: none Command line: none Description: Draw the expression decorations above the staff. If neither 'exprabove' nor 'exprbelow' are true, the expression decorations are drawn above the staff if there are lyrics on the staff, and below otherwise. 'exprabove' takes precedence over 'exprbelow'. exprbelow <bool> Default: 0 Compilation: none Command line: none Description: Draw the expression decorations below the staff. If neither 'exprabove' nor 'exprbelow' are true, the expression decorations are drawn above the staff if there are lyrics on the staff, and below otherwise. 'exprabove' takes precedence over 'exprbelow'. flatbeams <bool> Default: 0 Compilation: none Command line: -f Description: Have flat beams in bagpipe tunes. font <font> [<encoding>] Default: none Compilation: none Command line: none Description: Define a font and its encoding. This parameter is required when specific fonts are defined later in ABC files/tunes, and it must be defined before any PostScript output is done, generally in a format file. When absent, <encoding> defaults to the current 'encoding' parameter (see above). footer <text> Default: none Compilation: none Command line: none Description: Define the text printed at the bottom of each page. There may be one or two lines. When 2 lines, these ones must be separated by the 2 characters "\n" (not a real 'newline'). In each lines 3 areas may be defined: left, center and right. These areas are separated by tabulations (real TABs, not '\t') and may be empty (if the left area is empty, quote the string - see sample3.abc for example). The character '$' introduces variable expansion: - '$d' is the date and time of the last modification of the current ABC input file, - '$D' is the current date and time, - '$F' is the current input file name, - '$P' is the current page number, - '$P0' and '$P1' are also the page number, but only when this one is even ('0') or odd ('1'), - '$T' is the current tune title, - '$V' is 'abcm2ps-' followed by the program version. For example, the command line option '-N3' is the same as: %%header "$P0 $P1" (note the 2 TABs). A little trick: when a header or footer is defined inside a tune, it is printed on the next page. This may be used for example to have no header/footer on the 1st page. footerfont <font> [<encoding>] <size> Default: Times-Roman 12 Compilation: none Command line: none Description: Set the footer font to <font> with a size <size>. Note that the footer is not scaled. format <filename> Default: none Compilation: none Command line: none Description: Read the format file <filename>. When found in the command line, this parameter is the same as '-F'. freegchord <bool> Default: 0 Compilation: none Command line: none Description: Prevent the characters '#', 'b' and '=' to be displayed as sharp, flat and natural sign in guitar chords. When this flag is set, displaying accidental may be forced escaping the characters ('\#', '\b' and '\='). gchordbox <bool> Default: 0 Compilation: none Command line: none Description: Draw a box around the guitar chords. This value may be set to 'true' by %%gchordfont. gchordfont <font> [<encoding>] <size> [box] Default: Helvetica 12 Compilation: none Command line: none Description: Set the guitar chord font to <font> with a size <size>. If 'box' is present, draw a box around the guitar chords. graceslurs <bool> Default: 1 Compilation: none Command line: -G Description: Draw slurs on grace notes. header <text> Default: none Compilation: none Command line: none Description: Set the text printed at the top of each page. See 'footer' above for the header syntax. headerfont <font> [<encoding>] <size> Default: Times-Roman 12 Compilation: none Command line: none Description: Set the header font to <font> with a size <size>. Note that the header is not scaled. historyfont <font> [<encoding>] <size> Default: Times-Roman 16 Compilation: none Command line: none Description: Set the history font to <font> with a size <size>. hyphencont <bool> Default: 0 Compilation: none Command line: none Description: When a lyric under staff ends with a hyphen, put a hyphen in the next line. indent <unit> Default: 0 Compilation: none Command line: -I<unit> Description: Indent the first line of the tune by <unit>. infofont <font> [<encoding>] <size> Default: Times-Italic 14 Compilation: none Command line: none Description: Set the infoline font to <font> with a size <size>. infoline <bool> Default: 0 Compilation: none Command line: none Description: Display the rhythm and origin on a same line, and also display the area ('A:'). infospace <unit> Default: 0 Compilation: none Command line: none Description: Set the vertical space before the infoline to <unit>. landscape <bool> Default: 0 Compilation: none Command line: -l Description: Set the page orientation to landscape. leftmargin <unit> Default: 1.8cm Compilation: none Command line: -m<unit> Description: Set the left margin to <unit>. lineskipfac <float> Default: 1.1 Compilation: none Command line: none Description: Set the factor for spacing between lines of text to <float>. maxshrink <float> Default: 0.65 Compilation: none Command line: -a<float> Description: Set how much to compress horizontally when staff breaks are chosen automatically. <float> must be between 0 and 1. maxstaffsep <unit> Default: 2000pt Compilation: none Command line: none Description: Set the maximum vertical interstaff space to <unit>. maxsysstaffsep <unit> Default: 2000pt Compilation: none Command line: none Description: Set the maximum vertical system interstaff space to <unit>. measurebox <bool> Default: 0 Compilation: none Command line: trailing 'b' at end of -j or -k - see measurenb. Description: Draw a box around the measure numbers. This value may be set to 'true' by %%measurefont. measurefirst <int> Default: 1 Compilation: none Command line: -b<int> Description: Start numbering the measures of the tune from <int>. This parameter is obsolete and should be replaced by '%%setbarnb' (outside the tune body). measurefont <font> [<encoding>] <size> [box] Default: Times-Italic 14 Compilation: none Command line: none Description: Set the measure font to <font> with a size <size>. If 'box' is present, draw a box around the measure number. measurenb <int> Default: -1 Compilation: none Command line: -j<int>[b] or -k<int>[b] Description: If positive, draw the measure number each <int> bars. If <int> = 0, the measure number appears only on the left of each staff system. On the command line, if a trailing 'b' is present, a box is drawn around the measure numbers. musiconly <bool> Default: 0 Compilation: none Command line: -M Description: Don't output the lyrics if true. musicspace <unit> Default: 0.2cm Compilation: none Command line: none Description: Set the vertical space before the first staff to <unit>. notespacingfactor <float> Default: 1.414 Compilation: none Command line: none Description: Set the note spacing factor to <float>. This value is used to compute the natural space of the notes. The base space of the crotchet is always 40 pts. When the duration of a note type is twice the one of an other note type, its space is multiplied by this factor. The default value makes a note space to be multiplied by 2 when its duration is multiplied by 4, i.e. the space of the semibreve is 80 pts and the space of the semiquaver is 20 pts. Setting this value to 1 sets all note spaces to 40 pts. oneperpage <bool> Default: 0 Compilation: none Command line: -1 Description: Output one tune per page. pageheight <unit> Default: PAGEHEIGHT Compilation: PAGEHEIGHT= (A4: 29.7cm - US: 11in) Command line: none Description: Set the page height to <unit>. pagewidth <unit> Default: PAGEWIDTH Compilation: PAGEWIDTH= (A4: 21.0cm - US: 8.5in) Command line: none Description: Set the page width to <unit>. parskipfac <float> Default: 0.4 Compilation: none Command line: none Description: Set the factor for spacing between text paragraphs to <float>. partsbox <bool> Default: 0 Compilation: none Command line: none Description: Draw a box around the part names. This value may be set to 'true' by %%partsfont. partsfont <font> [<encoding>] <size> [box] Default: Times-Roman 15 Compilation: none Command line: none Description: Set the part font to <font> with a size <size>. If 'box' is present, draw a box around the part names. partsspace <unit> Default: 0.3cm Compilation: none Command line: none Description: Set the vertical space before a new part to <unit>. postscript <text> Default: none Compilation: none Command line: none Description: Define a line to be included in the PostScript output file. This parameter may be used to override any PostScript function or to define new functions for use in a 'deco' format. pslevel <int> Default: 2 Compilation: none Command line: none Description: Set the PostScript level for output. It may be 1, 2 or 3. printparts <bool> Default: 1 Compilation: none Command line: none Description: Print the part indications (P:). printtempo <bool> Default: 1 Compilation: none Command line: -Q (on) / +Q (off) Description: Print the tempo indications (Q:). repeatfont <font> [<encoding>] <size> Default: Times-Roman 13 Compilation: none Command line: none Description: Set the repeat number/text font to <font> with a size <size>. rightmargin <unit> Default: 1.8cm Compilation: none Command line: none Description: Set the right margin to <unit>. scale <float> Default: 0.75 Compilation: none Command line: -s<float> Description: Set the page scale factor to <float>. Note that the header and footer are not scaled. setdefl <bool> Default: 0 Compilation: none Command line: none Description: When true, output some indications about the note/chord and/or decorations for customization purpose. These indications are stored in the PostScript variable 'defl'. setfont-1 <font> [<encoding>] <size> setfont-2 <font> [<encoding>] <size> setfont-3 <font> [<encoding>] <size> setfont-4 <font> [<encoding>] <size> Default: Times-Roman 0 Compilation: none Command line: none Description: Set the alternate fonts of strings. In most strings, the current font may be changed by "$n" (n = 0, 1 .. 4 - "$0" resets the font to its default value. shifthnote <bool> Default: 0 Compilation: none Command line: none Description: In multivoice tunes, when voices go to unisson with a minim (half note) and a note smaller than crotchet (black note), there is only one note head, the minim one. When this flag is set, a note shift is done. slurheight <float> Default: 1.0 Compilation: none Command line: none Description: Set the slur height factor to <float>. splittune <bool> Default: 0 Compilation: none Command line: -0 Description: If false, a tune starts on a new page if it does not fit in the current one. If true, there is no page checking, and the tune may be splitted. squarebreve <bool> Default: 0 Compilation: none Command line: none Description: Display the breve notes in square format. staffsep <unit> Default: 46pt Compilation: none Command line: -d<unit> Description: Set the vertical interstaff space to <unit>. staffwidth <unit> Default: none Compilation: none Command line: -w<unit> Description: Adjust the right margin so that the staff width is <unit>. stemheight <float> Default: 20.0 Compilation: none Command line: none Description: Set the stem height to <float>. straightflags <bool> Default: 0 Compilation: none Command line: none Description: Have straight flags on stems in bagpipe tunes. stretchlast <bool> Default: 0 Compilation: none Command line: none Description: Stretch the last staff of the tune when more expanded than the previous line. stretchstaff <bool> Default: 1 Compilation: none Command line: none Description: Stretch underfull staves across page. subtitlefont <font> [<encoding>] <size> Default: Times-Roman 16 Compilation: none Command line: none Description: Set the subtitle font to <font> with a size <size>. subtitlespace <unit> Default: 0.1cm Compilation: none Command line: none Description: Set the vertical space before the subtitle to <unit>. sysstaffsep <unit> Default: 36pt Compilation: none Command line: none Description: Set the vertical space between staves in a system to <unit>. tempofont <font> [<encoding>] <size> Default: Times-Bold 15 Compilation: none Command line: none Description: Set the tempo font to <font> with a size <size>. textfont <font> [<encoding>] <size> Default: Times-Roman 16 Compilation: none Command line: none Description: Set the text font to <font> with a size <size>. textoption <int> Default: 0 (obeylines) Compilation: none Command line: none Description: Set the default text option to <int>. This option is used for text between '%%begintext' and '%%endtext'. <int> may be a keyword. The values are: 0: obeylines 1: justify 2: fill 3: center 4: skip textspace <unit> Default: 0.5cm Compilation: none Command line: none Description: Set to <unit> the vertical space before the history. timewarn <bool> Default: 0 Compilation: none Command line: none Description: When set, if a time signature occurs at the beginning of a music line, a cautionary time signature is added at the end of the previous line. titlecaps <bool> Default: 0 Compilation: none Command line: none Description: Output the title in uppercase letters. titlefont <font> [<encoding>] <size> Default: Times-Roman 20 Compilation: none Command line: none Description: Set the title font to <font> with a size <size>. titleformat <text> Default: none Compilation: none Command line: none Description: Define the format of the tune title. This format overrides the standard way to display the tune title, i.e. parameters as %%titleleft, %%infoline or %%composerspace will be ignored. The format is a set of letters, numbers and commas. Unrecognized characters are ignored. A letter is the ABC header infomation type. It may be 'A', 'B', 'C', 'D', 'H', 'N', 'O', 'P', 'R', 'S', 'T', 'X' or 'Z'. A number may follow a letter. It may be: '0' for 'center', '1' for 'right align' or '-1' for 'left align'. When absent, the number defaults to '0' (center). A comma sets the next fields to appear lower in the page. For example: %%titleformat T-1 T1 T1, R0 C1 A1 displays the first title on the left, the second and third titles, if any, on the right. The rhythm is centered a bit below, with the composer and author/area on the right. titleleft <bool> Default: 0 Compilation: none Command line: none Description: Output the title on the left (instead of centered). titlespace <unit> Default: 0.2cm Compilation: none Command line: none Description: Set the vertical space before the title to <unit>. topmargin <unit> Default: 1cm Compilation: none Command line: none Description: Set the top margin to <unit>. topspace <unit> Default: 0.8cm Compilation: none Command line: none Description: Set the top vertical space to <unit>. This space is put above the tune and also on top of continuation pages. tuplets <int> <int> <int> Default: 0 0 0 Compilation: none Command line: none Description: Define how to draw the tuplets. The first <int> tells when to draw: 0: auto (draw when no beam at endings) 1: never 2: always The second <int> tells what to draw: 0: a square bracket 1: a slur 2: do beam extension on rests (does not work yet) The third <int> tells which value to print: 0: a simple number (value of 'p') 1: no value 2: a ratio ('p':'q') vocalabove <bool> Default: 0 Compilation: none Command line: none Description: Set the vocals above the staff. vocalfont <font> [<encoding>] <size> Default: Times-Bold 13 Compilation: none Command line: none Description: Set the font of the lyrics under staves to <font> with a size <size>. vocalspace <unit> Default: 23pt Compilation: none Command line: none Description: Set the vertical space before the lyrics under staves to <unit>. voicefont <font> [<encoding>] <size> Default: Times-Bold 13 Compilation: none Command line: none Description: Set the font of the voice names to <font> with a size <size>. withxrefs <bool> Default: 0 Compilation: none Command line: -x Print the X: number in the title. wordsfont <font> [<encoding>] <size> Default: Times-Roman 16 Compilation: none Command line: none Description: Set the font of the lyrics at end of tune to <font> with a size <size>. wordsspace <unit> Default: 0.5cm Compilation: none Command line: none Description: Set the vertical space before the lyrics at end of tune to <unit>. writehistory <bool> Default: 0 Compilation: none Command line: -n Description: Output notes, history... List of the pseudo-comments treated while parsed ------------------------------------------------ begintext [<option>] Start printing a free text. The text appears on the next lines (starting with '%%' or not). The text ends on a line containing %%endtext <option> may be: 'obeylines': keep lines as they are (default) 'align' or 'justify': justify the lines 'ragged' or 'fill': fill the lines 'center': center the lines 'skip': don't print the lines (same as comments) center <line of text> Print one line of centered text. EPS <eps_file> Include the file <eps_file>. endtext See 'begintext'. multicol <command> Define multicolomn printing. <command> may be: 'start': save the current vertical position and the left and right margins. Then, these margins may be changed to print music or text. 'new': reset the vertical offset at the place of the previous '%%multicol start', and restore the left and right margins. 'end': restore the left and right margins, and skip down to a safe place. (see 'sample3.abc' for example). newpage [<int>] Continue printing on a new page and possibly restart page numbering from <int>. repbra <bool> The repeat brackets are normally displayed as found in a voice. '%%repbra 0' prevents displaying them for the current voice. sep [<h1> <h2> <len>] Print a separator of length <len> with space <h1> above and space <h2> below (defaults: h1 = h2 = 0.5cm, len = 3.0cm). setbarnb <int> Set the number of the next measure to <int>. When found outside a tune, this command is the same as '%%measurefirst'. If it appears at the beginning of the tune (after K:), only the 2nd measure will have the new number. staff <["+" | "-"] int> Put the next symbols of the current voice on the staff <int> (1..n - see sample4.abc for example), or on the <+int>th or <-int>th staff. staffbreak <unit> Have a break in the current staff. <unit> gives the width of the break (in points, inches or cm). As a side effect, when the width is bigger than 0.5 cm, the left side of the staff system is redrawn. When used in a multi-voice tune, a staff break must be inserted in each voice. staves <definition> See 'features.txt' for description. text <line of text> Print one line of text. vskip <h> Skip vertical space of height <h>.