Layout template: Difference between revisions

From MusiCAD
No edit summary
 
(15 intermediate revisions by the same user not shown)
Line 1: Line 1:
A '''layout template''' may be seen as a list of layout instructions that will produce a certain layout effect.
Using a '''layout template''' you can adjust a whole series of settings at the same time. This allows you to use, among other things, a standard layout for a booklet, [[examples_-_templates|record 4-part parts on two bars]], sound preference settings. etc. [[accompaniment arrangement]]s are also saved as a layout template. A large number of layout templates are already included and are divided into a number of groups.


layout templates may be bound to a [[user_definable_button|user-button]] by means of the [[shortcuts dialog]].
You can also assign layout templates to [[shortcut]]s (and therefore also to [[user buttons]]), use them in a [[toolbox]] and even apply them in [[playlist]]s, just what you find useful.


Layout templates may be executed from the [[layout_templates_dialog|layout template dialog]], a [[user_definable_button|user button]] or [[shortcut|shortcut-key]]
With the shortcut {{key|F2}} or the {{btn|templates}} button you get an overview of available templates.


Layout templates contain plaintext (like all MusiCAD files) so they can be edited in an ordinary text editor (like notepad). You can edit from within MusiCAD using the edit-button {{btn|edit}} in the [[layout templates dialog]]. A template file may look like:
[[File:Dlg-Layout Template.png|Dialog Layout Template]]


melodie "MijnSjabloon";
For the function of the buttons above the list, see the list below:
!%TemplateNL: MijnNaam|MijnSjabloon
!%TemplateUK: MyName|MyTemplate
!%TemplateDE: MeineName|MeineSchablone
!# iMinDX=2;iMaxDX=16;iHeaderSize=23;iLineSpacing=0;iNBarsPerLine=4;
!# iStaffDist=0;iHdrDist=0;iResizeOrphanPct=21;iScaleHorizontal=85;
!# iScaleVertical=85;iPageLeft=15;iPageTop=10;iPageRight=15;iTempo=90;
!# bAutoBass=0;bAutoChords=0;fSelection=(Size=5, Y=7);fInfo=(Name=Arial);
!# fInfo3=(Name=Lucida Bright, Size=11, Style=fsBold, Color=clRed, Y=7);
!# fChords=(Size=14, Style=fsNarrow, Y=-12);


All non default style parameters are listed here. Any MusiCAD music or template file starts with a line: <code>melodie &quot;NAME&quot;;</code>
{| class="wikitable"
| {{btn|new}}
| Create a new template based on the current [[layout|melody layout]].
|-
| {{btn|copy}}
| Create a new template as a copy of the selected template.
|-
| {{btn|delete}}
| Delete the selected template.
|-
| {{btn|edit}}
| Edit template in text form.
|-
| {{btn|choosetype}}
| choose between [[score template]]s and layout templates
|}


Next three lines determine for supported languages (Dutch, English and German) the group to list with, and a description comment.
A layout template is something like a melody file without notes, with the possibility of additional [[template functions]].


The rest of the lines list the parameters to be changed.
The template list shown represents the templates as found in the folder specified in
{{MenuReference|[[Options]]|[[Preferences]]|[[Locations]]|Template Folder}} supplemented with templates contained in the MusiCAD installation folder.


By the way, every MusiCAD melody lists its layout exactly the same way: <code>parameterName=value;</code>.
To make it easy to use layout templates, many key combinations in the [[main screen]] can be linked to [[shortcuts|layout templates]].


== Examples ==
When opening a music file, a formatting template is usually applied. At {{MenuReference|[[Options]]|[[Preferences]]|[[Files]]}} you can set which one this should be.
no(extra) staff distance (default is 2)
  !# iStaffDist=0;
set {{Literal|infotext3}} font-style:
  !# fInfo3=(Name=Lucida Bright, Size=11, Style=fsBold, Color=clRed, Y=7);


In layout templates a few additional constructs may be used that are not allowed in music-fields:
== See also ==
  !# iScaleHorizontal=*+5;iScaleVertical=*+5;
* [[Create templates]]
The use of *+5 means add 5% to mentioned parameter.
* [[Shortcuts]]
* [[Score template]]
* [[FAQ templates|Frequently asked questions]]


Parameters that are meaningful for single parts - when used within a template - will set a value for all parts.


There is an alphabetical overview of all parameters for use in a template: [[template parameters]]
{{NavLayout}}


==== Template script ====
{{NavFiles}}
Layout templates may perform a few actions like selection, transposition, addition of parts and export of files in other formats ([[midi file|midi]], [[portable document format|pdf]]).
[[SELECTPART]]( MAIN|PREV|NEXT|FULL|LAST|naam );
[[MODIFYPART]]( [[]] );
[[ADDPART]]( [[automatic part|autopart]] );
[[SETPART]]( [[templateparameter]], value );
[[TRANSPOSE]]( [[transpose|#semitones]] );
[[OPENLIST]]( [[play list]] );
[[OPENFILE]]( PREV|NEXT|FIRST|LAST|name );
[[SAVEFILE]]( extension )


A layout template that will split a double voiced part will have the following content:
{{NavTemplates}}
  SETPART( sVoicename, Upper );  ! ''rename part to "Upper"'
  ADDPART( COPY1 ); ! ''Copy current part''
  SETPART( sVoicename, Lower ); !''rename part to "Lower"''
  MODIFYPART( RemoveHighvoice ); ! ''remove top notes''
  SELECTPART( sVoicename, Upper ); ! ''Select part "Upper" ''
  MODIFYPART( RemoveLowvoice); ! ''remove bottom notes''
 
Templates may be bound to [[shortcuts]] and even to a button on the [[buttonbar]]


[[nl:Opmaaksjablonen]]
[[nl:Opmaaksjablonen]]

Latest revision as of 17:36, 26 March 2024

Using a layout template you can adjust a whole series of settings at the same time. This allows you to use, among other things, a standard layout for a booklet, record 4-part parts on two bars, sound preference settings. etc. accompaniment arrangements are also saved as a layout template. A large number of layout templates are already included and are divided into a number of groups.

You can also assign layout templates to shortcuts (and therefore also to user buttons), use them in a toolbox and even apply them in playlists, just what you find useful.

With the shortcut <F2> or the templates button you get an overview of available templates.

Dialog Layout Template

For the function of the buttons above the list, see the list below:

new Create a new template based on the current melody layout.
copy Create a new template as a copy of the selected template.
delete Delete the selected template.
edit Edit template in text form.
choosetype choose between score templates and layout templates

A layout template is something like a melody file without notes, with the possibility of additional template functions.

The template list shown represents the templates as found in the folder specified in [Options|Preferences|Locations|Template Folder] supplemented with templates contained in the MusiCAD installation folder.

To make it easy to use layout templates, many key combinations in the main screen can be linked to layout templates.

When opening a music file, a formatting template is usually applied. At [Options|Preferences|Files] you can set which one this should be.

See also


Files

.abc.arr.bmp.gif.ini.jpg.license.mc.mcd.mck.mid.min.msj.mp3.mxl.mfr.mpl.msd.mtl.musicmxl.pdf.png.tmc.xml.~mc0.txt.ps