From 3586b3a974862e016df27e37a351f2f5751bcc1a Mon Sep 17 00:00:00 2001 From: oliverpool Date: Mon, 27 Apr 2015 20:49:15 +0200 Subject: [PATCH 1/4] Allow the size of the paper to be customized in relation with patanet --- templates/data.tex | 48 ++++++++++++++++++++++++++++++++++++++-------- 1 file changed, 40 insertions(+), 8 deletions(-) diff --git a/templates/data.tex b/templates/data.tex index 832ebcf4..58e4d37a 100644 --- a/templates/data.tex +++ b/templates/data.tex @@ -40,11 +40,35 @@ }, "papersize":{ "description": {"english": "Paper size.", "french": "Taille du papier."}, - "type": "enum", - "values": {"a4": {"default": "A4"}, - "a5": {"default": "A5"} - }, - "default": {"default":"a4"} + "default": {"default":"A4"} + }, +"width":{ "description": {"english": "Width.", + "french": "Largeur."}, + "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."}, @@ -96,14 +120,22 @@ \makeatother %! End of font management -\geometry{((orientation)), ((papersize))paper} +\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 \let\OldSongColumns=\songcolumns \def\songcolumns#1{% -(* if orientation=="portrait" and papersize=="a5" *) +(* if orientation=="portrait" and papersize=="A5" *) \OldSongColumns{1} -(* elif orientation=="landscape" and papersize=="a4" *) +(* elif orientation=="landscape" and papersize=="A4" *) \count0=#1\relax\advance\count0 by 1\relax% \OldSongColumns{\count0} (* else *) From 7af941e55db6bf9283b149b69dfe4a2b86137c20 Mon Sep 17 00:00:00 2001 From: oliverpool Date: Tue, 28 Apr 2015 15:31:59 +0200 Subject: [PATCH 2/4] The orientation was forgotten MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Avant de merger, il faut parvenir à un consensus sur https://github.com/patacrep/patadata/commit/3586b3a974862e016df27e37a351f2f5751bcc1a --- templates/data.tex | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/templates/data.tex b/templates/data.tex index 58e4d37a..ed0a9450 100644 --- a/templates/data.tex +++ b/templates/data.tex @@ -121,7 +121,8 @@ %! End of font management \geometry{ - total={((width))mm,((height))mm} + ((orientation)) + ,total={((width))mm,((height))mm} ,left=((margin_left))mm ,right=((margin_right))mm ,top=((margin_top))mm From f2d76ebdc2b2eb32777cbe6c1aa23b5edd2e2be5 Mon Sep 17 00:00:00 2001 From: oliverpool Date: Tue, 28 Apr 2015 23:06:55 +0200 Subject: [PATCH 3/4] Merge all the variables in geometry According to discussion on the commit 3586b3a974862e016df27e37a351f2f5751bcc1a --- templates/data.tex | 58 ++++++++++------------------------------------ 1 file changed, 12 insertions(+), 46 deletions(-) diff --git a/templates/data.tex b/templates/data.tex index ed0a9450..c710eddb 100644 --- a/templates/data.tex +++ b/templates/data.tex @@ -38,45 +38,18 @@ "french": "Police des refrains"}, "default": {"default": "i"} }, -"papersize":{ "description": {"english": "Paper size.", - "french": "Taille du papier."}, - "default": {"default":"A4"} +"geometry":{ "description": {"english": "Paper geometry (size, margin, orientation...).", + "french": "Format du papier (taille, marges, orientation...)."}, + "default": {"default":"a4paper"} }, -"width":{ "description": {"english": "Width.", - "french": "Largeur."}, - "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."}, +"column_adjustment":{ "description": {"english": "Column adjsutment.", + "french": "Ajustement des colonnes."}, "type": "enum", - "values": {"landscape": {"english": "Landscape", "french": "Paysage" }, - "portrait": {"english": "Portrait", "french": "Portrait" } + "values": {"none": {"default": "none"}, + "only_one": {"default": "only_one"}, + "one_more": {"default": "one_more"} }, - "default": {"default":"portrait"} + "default": {"default":"none"} } } (* endvariables *) @@ -121,22 +94,15 @@ %! End of font management \geometry{ - ((orientation)) - ,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 + ((geometry)) } %! Temporary hack for columns management \let\OldSongColumns=\songcolumns \def\songcolumns#1{% -(* if orientation=="portrait" and papersize=="A5" *) +(* if column_adjustment=="only_one" *) \OldSongColumns{1} -(* elif orientation=="landscape" and papersize=="A4" *) +(* elif column_adjustment=="one_more" *) \count0=#1\relax\advance\count0 by 1\relax% \OldSongColumns{\count0} (* else *) From 895da049aa8a5dc3bac1cd98ff6f6c919bd60e09 Mon Sep 17 00:00:00 2001 From: Louis Date: Tue, 5 May 2015 11:25:38 +0200 Subject: [PATCH 4/4] Commentaires --- templates/data.tex | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/templates/data.tex b/templates/data.tex index c710eddb..a0afa244 100644 --- a/templates/data.tex +++ b/templates/data.tex @@ -38,8 +38,8 @@ "french": "Police des refrains"}, "default": {"default": "i"} }, -"geometry":{ "description": {"english": "Paper geometry (size, margin, orientation...).", - "french": "Format du papier (taille, marges, orientation...)."}, +"geometry":{ "description": {"english": "Paper geometry (size, margin, orientation...), as options of the LaTeX geometry package.", + "french": "Format du papier (taille, marges, orientation...), avec le même format que les options du paquet LaTeX geometry."}, "default": {"default":"a4paper"} }, "column_adjustment":{ "description": {"english": "Column adjsutment.",