Browse Source

Merge pull request #16 from patacrep/custom_papersize

Replaced papersize option by a geometry option, passed to the LaTeX geometry package.
chordpro
Louis 10 years ago
parent
commit
2eaa3ab5ca
  1. 29
      templates/data.tex

29
templates/data.tex

@ -38,21 +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...), as options of the LaTeX geometry package.",
"french": "Taille du papier."}, "french": "Format du papier (taille, marges, orientation...), avec le même format que les options du paquet LaTeX geometry."},
"type": "enum", "default": {"default":"a4paper"}
"values": {"a4": {"default": "A4"},
"a5": {"default": "A5"}
},
"default": {"default":"a4"}
}, },
"orientation":{ "description": {"english": "Paper orientation.", "column_adjustment":{ "description": {"english": "Column adjsutment.",
"french": "Orientation du papier."}, "french": "Ajustement des colonnes."},
"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 *)
@ -96,14 +93,16 @@
\makeatother \makeatother
%! End of font management %! End of font management
\geometry{((orientation)), ((papersize))paper} \geometry{
((geometry))
}
%! 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