Browse Source

Merge all the variables in geometry

According to discussion on the commit 3586b3a974
chordpro
oliverpool 10 years ago
parent
commit
f2d76ebdc2
  1. 58
      templates/data.tex

58
templates/data.tex

@ -38,45 +38,18 @@
"french": "Police des refrains"}, "french": "Police des refrains"},
"default": {"default": "i"} "default": {"default": "i"}
}, },
"papersize":{ "description": {"english": "Paper size.", "geometry":{ "description": {"english": "Paper geometry (size, margin, orientation...).",
"french": "Taille du papier."}, "french": "Format du papier (taille, marges, orientation...)."},
"default": {"default":"A4"} "default": {"default":"a4paper"}
}, },
"width":{ "description": {"english": "Width.", "column_adjustment":{ "description": {"english": "Column adjsutment.",
"french": "Largeur."}, "french": "Ajustement des colonnes."},
"default": {"default":"210"}
},
"height":{ "description": {"english": "Height.",
"french": "Hauteur."},
"default": {"default":"297"}
},
"margin_top":{ "description": {"english": "Margin top.",
"french": "Marge en haut."},
"default": {"default":"13"}
},
"margin_right":{ "description": {"english": "Margin right.",
"french": "Marge à droite."},
"default": {"default":"18"}
},
"margin_bottom":{ "description": {"english": "Margin bottom.",
"french": "Marge en bas."},
"default": {"default":"13"}
},
"margin_left":{ "description": {"english": "Margin left.",
"french": "Marge à gauche."},
"default": {"default":"18"}
},
"bindingoffset":{ "description": {"english": "Binding offset.",
"french": "Reliure."},
"default": {"default":"0"}
},
"orientation":{ "description": {"english": "Paper orientation.",
"french": "Orientation du papier."},
"type": "enum", "type": "enum",
"values": {"landscape": {"english": "Landscape", "french": "Paysage" }, "values": {"none": {"default": "none"},
"portrait": {"english": "Portrait", "french": "Portrait" } "only_one": {"default": "only_one"},
"one_more": {"default": "one_more"}
}, },
"default": {"default":"portrait"} "default": {"default":"none"}
} }
} }
(* endvariables *) (* endvariables *)
@ -121,22 +94,15 @@
%! End of font management %! End of font management
\geometry{ \geometry{
((orientation)) ((geometry))
,total={((width))mm,((height))mm}
,left=((margin_left))mm
,right=((margin_right))mm
,top=((margin_top))mm
,bottom=((margin_bottom))mm
,asymmetric
,bindingoffset=((bindingoffset))mm % space reserved to bound pages together
} }
%! Temporary hack for columns management %! Temporary hack for columns management
\let\OldSongColumns=\songcolumns \let\OldSongColumns=\songcolumns
\def\songcolumns#1{% \def\songcolumns#1{%
(* if orientation=="portrait" and papersize=="A5" *) (* if column_adjustment=="only_one" *)
\OldSongColumns{1} \OldSongColumns{1}
(* elif orientation=="landscape" and papersize=="A4" *) (* elif column_adjustment=="one_more" *)
\count0=#1\relax\advance\count0 by 1\relax% \count0=#1\relax\advance\count0 by 1\relax%
\OldSongColumns{\count0} \OldSongColumns{\count0}
(* else *) (* else *)

Loading…
Cancel
Save