In the source: https://sourceforge.net/p/gnucobol/code ... /2-1A.texi
there is the macro: @diagram{Complete GnuCOBOL Program,Complete-Program-Info,Complete-Program-Info,None}
which inserts the file: SYN-Complete-Program-Info.texi
This file contains some dots and ellipses...
The right square brackets are correctly aligned in the source file but are misaligned in the PDF generated by TEX.
Apparently, the right square brackets shift to the right when there is a period . or three periods ... in the line.
TEX software adds unwanted spaces.
This is part of source file: 2-1A.texi that call the macro "diagram" :
@comment *********************************************************************
@comment ** 2.1.17 Program Structure **
@comment *********************************************************************
@page
@newsubsection{Program Structure}
@diagram{Complete GnuCOBOL Program,Complete-Program-Info,Complete-Program-Info,None}
This is the macro:
@comment +-------------------------------------------------------------------+
@comment | MACRO: diagram{title,fileinfo,filetex,note |
@comment | |
@comment | Insert a syntax diagram. Arguments are as follows: |
@comment | title Title of Diagram |
@comment | fileinfo "INFO" Format filename : SYN-<fileinfo>.texi |
@comment | filetex "TeX" Format filename : SYN-<filetex>.texi |
@comment | note Notes filename : NOTE-<note>.texi |
@comment +-------------------------------------------------------------------+
@macro diagram{title,fileinfo,filetex,note}
@ifnottex
@ifset SKELETON
@sp 1
@center =======================================================================
@end ifset
@center \title\ Syntax
@center =======================================================================
@sp 1
@verbatiminclude SYN-\fileinfo\.texi
@include NOTE-\note\.texi
@end ifnottex
@iftex
@cartouche
@smallformat
@center @b{\title\ Syntax}
@end smallformat
@end cartouche
@verbatiminclude SYN-\filetex\.texi
@include NOTE-\note\.texi
@end iftex
@ifnottex
@ifclear SKELETON
@sp 1
@center =======================================================================
@end ifclear
@end ifnottex
@iftex
@ifclear SKELETON
@sp 1
@center ------------------------------------------------------------------------------------------------------------------------
@end ifclear
@end iftex
@end macro
this is the content of file: SYN-Complete-Program-Info.texi where right sqare brackets are vertical aligned:
Code: Select all
[ IDENTIFICATION DIVISION. ]
~~ ~~~~~~~~
PROGRAM-ID|FUNCTION-ID. name-1 [ Program-Options ].
~~~~~~~~~~ ~~~~~~~~~~~
[ ENVIRONMENT DIVISION. ]
[ ~~~~~~~~~~~ ~~~~~~~~ ]
[ CONFIGURATION SECTION. ]
[ ~~~~~~~~~~~~~ ~~~~~~~ ]
[ SOURCE-COMPUTER. Compilation-Computer-Specification. ]
[ ~~~~~~~~~~~~~~~ ]
[ OBJECT-COMPUTER. Execution-Computer-Specification. ]
[ ~~~~~~~~~~~~~~~ ]
[ REPOSITORY. Prototype-Specification... . ]
[ ~~~~~~~~~~ ]
[ SPECIAL-NAMES. Program-Configuration-Specification. ]
[ ~~~~~~~~~~~~~ ]
[ INPUT-OUTPUT SECTION. ]
[ ~~~~~~~~~~~~ ~~~~~~~ ]
[ FILE-CONTROL. General-File-Description... . ]
[ ~~~~~~~~~~~~ ]
[ I-O-CONTROL. File-Buffering-Specification... . ]
~~~~~~~~~~~
[ DATA DIVISION. ]
[ ~~~~~~~~~~~~~ ]
[ FILE SECTION. Detailed-File-Description... . ]
[ ~~~~~~~~~~~~ ]
[ WORKING-STORAGE SECTION. Permanent-Data-Definition... . ]
[ ~~~~~~~~~~~~~~~ ~~~~~~~ ]
[ LOCAL-STORAGE SECTION. Temporary-Data-Definition... . ]
[ ~~~~~~~~~~~~~ ~~~~~~~ ]
[ LINKAGE SECTION. Subprogram-Argument-Description... . ]
[ ~~~~~~~ ~~~~~~~ ]
[ REPORT SECTION. Report-Description... . ]
[ ~~~~~~ ~~~~~~~ ]
[ SCREEN SECTION. Screen-Layout-Definition... . ]
~~~~~~ ~~~~~~~
PROCEDURE DIVISION [ { USING Subprogram-Argument... } ]
~~~~~~~~~ ~~~~~~~~ [ { ~~~~~ } ]
[ { CHAINING Main-Program-Argument... } ]
~~~~~~~~
[ RETURNING identifier-1 ].
~~~~~~~~~
[ DECLARATIVES. ]
[ ~~~~~~~~~~~~ ]
[ Event-Handler-Routine... . ]
[ END DECLARATIVES. ]
~~~ ~~~~~~~~~~~~
General-Program-Logic.
[ Nested-Subprogram... ]
[ END PROGRAM|FUNCTION name-1. ]
~~~ ~~~~~~~ ~~~~~~~~
TEX inserts unwanted spaces after the single dots and after ellipsis;
it's unclear what the rule is, and this causes the right brackets to be misaligned.
See attached image.
How can I tell to TEX do not add spaces after dots and after ellipsis ?