Re: New page, contents and references

[email protected] (Ludovic Courtès)
Newsgroups gmane.comp.type-setting.lout
Message-ID <[email protected]>
Salut Stéphane,  ;-)

Oops, the ‘@RefSectionGap’ option should be under ‘@ReportSetup’, not
under ‘@DocumentSetup’.  Here’s an updated patch.

Let us know how it goes.

Ludo’.

PS: Use ‘cd /path/to/lout ; patch -p1 < the-patch’.
,,t.patch (text/x-patch, 3.2 KB)
diff --git a/include/report b/include/report
index 2a66c8e..4459314 100644
--- a/include/report
+++ b/include/report
@@ -423,6 +423,7 @@
   # @AppendixGap		{ 2.0v	@OrIfPlain 3f	} # between appendices
   # @SubAppendixGap		{ 1.5v	@OrIfPlain 2f	} # between subappendices
   # @SubSubAppendixGap		{ 1.5v	@OrIfPlain 2f	} # between sub-subapps
+  # @RefSectionGap		{ @SectionGap		} # gap before the ref section
   # @SectionInContents		{ Yes		} # add sections to contents
   # @SubSectionInContents	{ Yes		} # add subsections to contents
   # @SubSubSectionInContents	{ No		} # add sub-subsects to contents
diff --git a/include/reportf b/include/reportf
index ffc7fbb..7ad96e9 100644
--- a/include/reportf
+++ b/include/reportf
@@ -122,6 +122,7 @@ def @ReportSetup
     named @SectionGap			{ 2.0v  @OrIfPlain 3f	}
     named @SubSectionGap		{ 1.5v  @OrIfPlain 2f	}
     named @SubSubSectionGap		{ 1.5v  @OrIfPlain 2f	}
+    named @RefSectionGap		{ dft			}
     named @AppendixGap			{ 2.0v  @OrIfPlain 3f	}
     named @SubAppendixGap		{ 1.5v  @OrIfPlain 2f	}
     named @SubSubAppendixGap		{ 1.5v  @OrIfPlain 2f	}
@@ -272,6 +273,21 @@ def @ReportSetup
 
     #######################################################################
     #                                                                     #
+    #  Gap before the "References" section.                               #
+    #                                                                     #
+    #######################################################################
+
+    def @GapBeforeRefs
+    {
+	@RefSectionGap @Case {
+	    "dft" @Yield @SectionGap
+	    else  @Yield @RefSectionGap
+	}
+    }
+
+
+    #######################################################################
+    #                                                                     #
     #  @Report                                                            #
     #                                                                     #
     #######################################################################
@@ -559,13 +575,13 @@ def @ReportSetup
 	    //			@AbstractDisplay @NoDo @AbstractPart
 	    //@ContentsGap	@ContentsPart
 	    //@ContentsGap	@SectionList @FirstSectionNumber
-	    //@SectionGap	@ReferencesBeforeAppendices @Do {
+	    //@GapBeforeRefs	@ReferencesBeforeAppendices @Do {
 				    @MakeReferences @Do @ReferencesPart
 				}
             //@AppendixGap	@AppendixList @FirstAppendixNumber
 	    //@SectionGap	@EndFigureList
 	    //@SectionGap	@EndNoteList 1
-	    //@SectionGap	@ReferencesBeforeAppendices @NoDo {
+	    //@GapBeforeRefs	@ReferencesBeforeAppendices @NoDo {
 				    @MakeReferences @Do @ReferencesPart
 				}
 	    //			@MakeGlossary @Do @GlossaryPart
@@ -589,11 +605,11 @@ def @ReportSetup
 	      	 		Start @Runner
 	    //@ContentsGap	@ContentsPart
 	    //@ContentsGap	@SectionList @FirstSectionNumber
-	    //@SectionGap	@ReferencesBeforeAppendices @Do {
+	    //@GapBeforeRefs	@ReferencesBeforeAppendices @Do {
 				    @MakeReferences @Do @ReferencesPart
 				}
             //@AppendixGap	@AppendixList @FirstAppendixNumber
-	    //@SectionGap	@ReferencesBeforeAppendices @NoDo {
+	    //@GapBeforeRefs	@ReferencesBeforeAppendices @NoDo {
 				    @MakeReferences @Do @ReferencesPart
 				}
 	    //@SectionGap	@EndFigureList
signature.asc (application/pgp-signature, 197 B)
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v2.0.16 (GNU/Linux)

iEYEARECAAYFAk0spZEACgkQd92V4upS7PT1VACeKu2H3voTkKmGNTCrj7A5dN0D
xdwAn0poB5B2B3bm1QK0JRRDKUNtvyhM
=cxq5
-----END PGP SIGNATURE-----
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.