Re: New page, contents and references
Stéphane Legrand <[email protected]>
| Newsgroups | gmane.comp.type-setting.lout |
|---|---|
| Message-ID | <[email protected]> |
Le mardi 11 janvier 2011 à 19:46 +0100, Ludovic Courtès a écrit :
> Salut Stéphane, ;-)
Bonsoir / Hello ! :-)
> Oops, the ‘@RefSectionGap’ option should be under ‘@ReportSetup’, not
> under ‘@DocumentSetup’. Here’s an updated patch.
Thanks for your new patch.
It's now ok for the patch utility. I was able to apply the patch to
my /usr/local/lout.lib/include directory.
Then i did the following things :
- I added the following line
# @RefSectionGap { @SectionGap }
in my "myreport" file (i have a "@Include { myreport }" in my
document).
- I ran lout but no difference.
So, i tried to remove the # comment sign on the @RefSectionGap line in
"myreport" file but then i have these errors :
: lout -r beginning run 4:
lout file "myreport" (from "memoire_latin1.lout" line 1):
428,33: symbol @SectionGap unknown or misspelt
428,33: width missing from @SectionGap
428,33: /, | and & must be enclosed in double quotes
428,33: width missing from @SectionGap
428,33: /, | and & must be enclosed in double quotes
And finally i tried to put
@RefSectionGap { 20v }
in "myreport" file. And bingo ! Lout add this space before the
references and i have now the right pages in the contents. Thank you
very much !
I guess the "20v" value will have to be modified according to my
document text length. But it's still a good workaround. Is there any
chance to add this @RefSectionGap in the next release ?
Thanks again for your help ! Encore merci pour ton/votre aide ! :-)
Regards,
Stéphane.
> Let us know how it goes.
>
> Ludo’.
>
> PS: Use ‘cd /path/to/lout ; patch -p1 < the-patch’.
>
> pièce jointe différences entre fichiers (,,t.patch), "the patch"
> 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
> + }
> + }
> +
> +
> + #######################################################################@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