Macros: some corrections.
This commit is contained in:
		
							parent
							
								
									0491a98adf
								
							
						
					
					
						commit
						13aa99402a
					
				
					 1 changed files with 129 additions and 35 deletions
				
			
		
							
								
								
									
										164
									
								
								macros.ms
									
										
									
									
									
								
							
							
						
						
									
										164
									
								
								macros.ms
									
										
									
									
									
								
							| 
						 | 
					@ -17,12 +17,37 @@ accumulate
 | 
				
			||||||
.defcolor darkgreen rgb 0.1 0.5 0.2
 | 
					.defcolor darkgreen rgb 0.1 0.5 0.2
 | 
				
			||||||
.defcolor darkblue  rgb 0.3 0.3 0.7
 | 
					.defcolor darkblue  rgb 0.3 0.3 0.7
 | 
				
			||||||
.defcolor darkred   rgb 0.7 0.3 0.3
 | 
					.defcolor darkred   rgb 0.7 0.3 0.3
 | 
				
			||||||
 | 
					.defcolor black     rgb 0 0 0
 | 
				
			||||||
.
 | 
					.
 | 
				
			||||||
 | 
					. \" with semantic
 | 
				
			||||||
.defcolor citation       rgb 0.4 0.4 0.4
 | 
					.defcolor citation       rgb 0.4 0.4 0.4
 | 
				
			||||||
.defcolor citationbar    rgb 0.3 0.3 0.7
 | 
					.defcolor citationbar    rgb 0.3 0.3 0.7
 | 
				
			||||||
.defcolor explanation    rgb 0.7 0.4 0.4
 | 
					.defcolor explanation    rgb 0.7 0.4 0.4
 | 
				
			||||||
.defcolor explanationbar rgb 0.8 0.3 0.3
 | 
					.defcolor explanationbar rgb 0.8 0.3 0.3
 | 
				
			||||||
.
 | 
					.
 | 
				
			||||||
 | 
					.defcolor specialcolor_type        rgb 0.6 0.3 0.5
 | 
				
			||||||
 | 
					.defcolor specialcolor_constructor rgb 0.1 0.5 0.2
 | 
				
			||||||
 | 
					.defcolor specialcolor_module      rgb 0.1 0.5 0.2
 | 
				
			||||||
 | 
					.defcolor specialcolor_function    rgb 0.4 0.4 0.7
 | 
				
			||||||
 | 
					.defcolor specialcolor_question    rgb 0.0 0.0 0.7
 | 
				
			||||||
 | 
					.defcolor specialcolor_shine       rgb 0.3 0.3 0.7
 | 
				
			||||||
 | 
					.
 | 
				
			||||||
 | 
					. \" SIZES
 | 
				
			||||||
 | 
					.nr specialsize_type        8
 | 
				
			||||||
 | 
					.nr specialsize_constructor 8
 | 
				
			||||||
 | 
					.nr specialsize_module      8
 | 
				
			||||||
 | 
					.nr specialsize_function    8
 | 
				
			||||||
 | 
					.nr specialsize_question    10   \" Current point size, no change.
 | 
				
			||||||
 | 
					.nr specialsize_shine       11
 | 
				
			||||||
 | 
					.
 | 
				
			||||||
 | 
					. \" FONTS
 | 
				
			||||||
 | 
					.ds specialfont_type        CW
 | 
				
			||||||
 | 
					.ds specialfont_constructor CW
 | 
				
			||||||
 | 
					.ds specialfont_module      CW
 | 
				
			||||||
 | 
					.ds specialfont_function    I
 | 
				
			||||||
 | 
					.ds specialfont_question    I
 | 
				
			||||||
 | 
					.ds specialfont_shine       B
 | 
				
			||||||
 | 
					.
 | 
				
			||||||
.
 | 
					.
 | 
				
			||||||
.de BELLOWEXPLANATION1
 | 
					.de BELLOWEXPLANATION1
 | 
				
			||||||
.sp 0.5
 | 
					.sp 0.5
 | 
				
			||||||
| 
						 | 
					@ -76,16 +101,25 @@ accumulate
 | 
				
			||||||
.in +1       \" indent a bit
 | 
					.in +1       \" indent a bit
 | 
				
			||||||
.gcolor citation
 | 
					.gcolor citation
 | 
				
			||||||
..
 | 
					..
 | 
				
			||||||
 | 
					.ig
 | 
				
			||||||
 | 
					    The CITATION2 macro closes the quote then draws a line
 | 
				
			||||||
 | 
					    from current line to the start of the quote.
 | 
				
			||||||
 | 
					..
 | 
				
			||||||
.de CITATION2
 | 
					.de CITATION2
 | 
				
			||||||
.mk D        \" set second marker to come back here
 | 
					.mk D        \" set second marker to come back here
 | 
				
			||||||
.ft          \" back to previous font
 | 
					.ft          \" back to previous font
 | 
				
			||||||
.in -1       \" remove indent
 | 
					.in -1       \" remove indent
 | 
				
			||||||
.gcolor      \" remove previous color
 | 
					.gcolor      \" remove previous color
 | 
				
			||||||
.gcolor citationbar
 | 
					.gcolor citationbar
 | 
				
			||||||
\r\L'|\\nCu' \" draw line (\r moves upward, \L draw the line, ...)
 | 
					.\" r     = move upward
 | 
				
			||||||
.sp '|\\nDu' \" return to the second marker
 | 
					.\" Z D t = drawing thickness
 | 
				
			||||||
.gcolor      \" remove previous color
 | 
					.\" L     = draw the line
 | 
				
			||||||
 | 
					\r
 | 
				
			||||||
 | 
					\Z'\D't 1p''\
 | 
				
			||||||
 | 
					\L'|\\nCu' \" draw line (\r moves upward, \L draw the line, ...)
 | 
				
			||||||
 | 
					.gcolor black     \" remove previous color
 | 
				
			||||||
.sp -2       \" get two lines back
 | 
					.sp -2       \" get two lines back
 | 
				
			||||||
 | 
					\Z'\D't 1''    \" get the previous drawing thickness back
 | 
				
			||||||
.KE          \" end of the keep
 | 
					.KE          \" end of the keep
 | 
				
			||||||
..
 | 
					..
 | 
				
			||||||
.
 | 
					.
 | 
				
			||||||
| 
						 | 
					@ -146,6 +180,28 @@ accumulate
 | 
				
			||||||
\l'15'
 | 
					\l'15'
 | 
				
			||||||
.FOOTNOTE_TO_COLUMN_WIDTH
 | 
					.FOOTNOTE_TO_COLUMN_WIDTH
 | 
				
			||||||
..
 | 
					..
 | 
				
			||||||
 | 
					.
 | 
				
			||||||
 | 
					. \" Fonts and colors.
 | 
				
			||||||
 | 
					.
 | 
				
			||||||
 | 
					.de SPECIAL_WORDS
 | 
				
			||||||
 | 
					.nr current_size \\n[.s]  \" Current point size.
 | 
				
			||||||
 | 
					.gcolor specialcolor_\\*[semantictoken]
 | 
				
			||||||
 | 
					.
 | 
				
			||||||
 | 
					.if !((\\n[current_size] == \\n[specialsize_\\*[semantictoken]]) \
 | 
				
			||||||
 | 
					.ps \\n[specialsize_\\*[semantictoken]]
 | 
				
			||||||
 | 
					.
 | 
				
			||||||
 | 
					.ie '\\$2'' \{\
 | 
				
			||||||
 | 
					\f[\\*[specialfont_\\*[semantictoken]]]\\$1\f[]
 | 
				
			||||||
 | 
					.  ps \\n[current_size]
 | 
				
			||||||
 | 
					.  gcolor black      \" FIXME: should be the previous color
 | 
				
			||||||
 | 
					\}
 | 
				
			||||||
 | 
					.el \{\
 | 
				
			||||||
 | 
					\f[\\*[specialfont_\\*[semantictoken]]]\\$1\f[]\c
 | 
				
			||||||
 | 
					.  ps \\n[current_size]
 | 
				
			||||||
 | 
					.  gcolor black      \" FIXME: should be the previous color
 | 
				
			||||||
 | 
					\\$2
 | 
				
			||||||
 | 
					\}
 | 
				
			||||||
 | 
					..
 | 
				
			||||||
.de SMALLFONT
 | 
					.de SMALLFONT
 | 
				
			||||||
.ps 8
 | 
					.ps 8
 | 
				
			||||||
.vs 9p
 | 
					.vs 9p
 | 
				
			||||||
| 
						 | 
					@ -161,57 +217,43 @@ accumulate
 | 
				
			||||||
.b2
 | 
					.b2
 | 
				
			||||||
..
 | 
					..
 | 
				
			||||||
.de COMMANDNAME
 | 
					.de COMMANDNAME
 | 
				
			||||||
.I "\\$1"
 | 
					 | 
				
			||||||
..
 | 
					 | 
				
			||||||
.de FUNCTION
 | 
					 | 
				
			||||||
.I "\\$1" "\\$2"
 | 
					.I "\\$1" "\\$2"
 | 
				
			||||||
..
 | 
					..
 | 
				
			||||||
.de TYPE
 | 
					.de FUNCTION
 | 
				
			||||||
.gcolor darkgreen
 | 
					.gcolor color_function
 | 
				
			||||||
.ps 8
 | 
					\f[CW]\\$1\f[]\c
 | 
				
			||||||
.ft CW
 | 
					 | 
				
			||||||
\\$1
 | 
					 | 
				
			||||||
.ft R
 | 
					 | 
				
			||||||
.gcolor
 | 
					.gcolor
 | 
				
			||||||
.ps
 | 
					\\$2
 | 
				
			||||||
 | 
					..
 | 
				
			||||||
 | 
					.de TYPE
 | 
				
			||||||
 | 
					.ds semantictoken type
 | 
				
			||||||
 | 
					.SPECIAL_WORDS "\\$1" "\\$2"
 | 
				
			||||||
..
 | 
					..
 | 
				
			||||||
.de TYPECLASS
 | 
					.de TYPECLASS
 | 
				
			||||||
.I "\\$1" "\\$2"
 | 
					.I "\\$1" "\\$2"
 | 
				
			||||||
..
 | 
					..
 | 
				
			||||||
.de OPERATOR
 | 
					.de OPERATOR
 | 
				
			||||||
.I "\\$1" "\\$2"
 | 
					\f[CW]\\$1\f[]\\$2
 | 
				
			||||||
..
 | 
					..
 | 
				
			||||||
.de QUESTION
 | 
					.de QUESTION
 | 
				
			||||||
.I "\\$1" "\\$2"
 | 
					.ds semantictoken question
 | 
				
			||||||
 | 
					.SPECIAL_WORDS "\\$1" "\\$2"
 | 
				
			||||||
\h'5p'
 | 
					\h'5p'
 | 
				
			||||||
..
 | 
					..
 | 
				
			||||||
.de CONSTRUCTOR
 | 
					.de CONSTRUCTOR
 | 
				
			||||||
.gcolor darkred
 | 
					.ds semantictoken constructor
 | 
				
			||||||
.ps 8
 | 
					.SPECIAL_WORDS "\\$1" "\\$2"
 | 
				
			||||||
.ft CW
 | 
					 | 
				
			||||||
\\$1
 | 
					 | 
				
			||||||
.ft R
 | 
					 | 
				
			||||||
.gcolor
 | 
					 | 
				
			||||||
.ps
 | 
					 | 
				
			||||||
..
 | 
					..
 | 
				
			||||||
.de MODULE
 | 
					.de MODULE
 | 
				
			||||||
.gcolor darkblue
 | 
					.ds semantictoken module
 | 
				
			||||||
.ps 8
 | 
					.SPECIAL_WORDS "\\$1" "\\$2"
 | 
				
			||||||
.ft CW
 | 
					 | 
				
			||||||
\\$1
 | 
					 | 
				
			||||||
.ft R
 | 
					 | 
				
			||||||
.gcolor
 | 
					 | 
				
			||||||
.ps
 | 
					 | 
				
			||||||
..
 | 
					..
 | 
				
			||||||
.de SHINE
 | 
					.de SHINE
 | 
				
			||||||
.gcolor darkblue
 | 
					.ds semantictoken shine
 | 
				
			||||||
.ft B
 | 
					.SPECIAL_WORDS "\\$1" "\\$2"
 | 
				
			||||||
\\$1
 | 
					 | 
				
			||||||
.ft R
 | 
					 | 
				
			||||||
.gcolor
 | 
					 | 
				
			||||||
..
 | 
					..
 | 
				
			||||||
.de MODULEX
 | 
					.de MODULEX
 | 
				
			||||||
.MODULE "\\$1,"
 | 
					.MODULE \\$1 ,
 | 
				
			||||||
..
 | 
					..
 | 
				
			||||||
.de TBD
 | 
					.de TBD
 | 
				
			||||||
.ft B
 | 
					.ft B
 | 
				
			||||||
| 
						 | 
					@ -268,27 +310,50 @@ Compilé pour la dernière fois le
 | 
				
			||||||
.
 | 
					.
 | 
				
			||||||
.de SECTION
 | 
					.de SECTION
 | 
				
			||||||
.NH
 | 
					.NH
 | 
				
			||||||
 | 
					.ps +3
 | 
				
			||||||
 | 
					.fam H   \" helvetica family
 | 
				
			||||||
\\$*
 | 
					\\$*
 | 
				
			||||||
 | 
					.fam     \" back to previous font family
 | 
				
			||||||
 | 
					.ps
 | 
				
			||||||
 | 
					.PARAGRAPH_INDENTED
 | 
				
			||||||
..
 | 
					..
 | 
				
			||||||
.de SUBSECTION
 | 
					.de SUBSECTION
 | 
				
			||||||
.NH 2
 | 
					.NH 2
 | 
				
			||||||
 | 
					.ps +1
 | 
				
			||||||
 | 
					.fam H   \" helvetica family
 | 
				
			||||||
\\$*
 | 
					\\$*
 | 
				
			||||||
 | 
					.fam     \" back to previous font family
 | 
				
			||||||
 | 
					.ps
 | 
				
			||||||
 | 
					.PARAGRAPH_INDENTED
 | 
				
			||||||
..
 | 
					..
 | 
				
			||||||
.de SUBSUBSECTION
 | 
					.de SUBSUBSECTION
 | 
				
			||||||
.NH 3
 | 
					.NH 3
 | 
				
			||||||
 | 
					.fam H   \" helvetica family
 | 
				
			||||||
\\$*
 | 
					\\$*
 | 
				
			||||||
 | 
					.fam     \" back to previous font family
 | 
				
			||||||
 | 
					.ps
 | 
				
			||||||
 | 
					.PARAGRAPH_INDENTED
 | 
				
			||||||
..
 | 
					..
 | 
				
			||||||
.de SUBSUBSUBSECTION
 | 
					.de SUBSUBSUBSECTION
 | 
				
			||||||
.NH 4
 | 
					.NH 4
 | 
				
			||||||
 | 
					.fam H   \" helvetica family
 | 
				
			||||||
\\$*
 | 
					\\$*
 | 
				
			||||||
 | 
					.fam     \" back to previous font family
 | 
				
			||||||
 | 
					.PARAGRAPH_INDENTED
 | 
				
			||||||
..
 | 
					..
 | 
				
			||||||
.de SECTION_NO_NUMBER
 | 
					.de SECTION_NO_NUMBER
 | 
				
			||||||
.SH
 | 
					.SH
 | 
				
			||||||
 | 
					.fam H   \" helvetica family
 | 
				
			||||||
\\$*
 | 
					\\$*
 | 
				
			||||||
 | 
					.fam     \" back to previous font family
 | 
				
			||||||
 | 
					.PARAGRAPH_INDENTED
 | 
				
			||||||
..
 | 
					..
 | 
				
			||||||
.de SUBSECTION_NO_NUMBER
 | 
					.de SUBSECTION_NO_NUMBER
 | 
				
			||||||
.SH 2
 | 
					.SH 2
 | 
				
			||||||
 | 
					.fam H   \" helvetica family
 | 
				
			||||||
\\$*
 | 
					\\$*
 | 
				
			||||||
 | 
					.fam     \" back to previous font family
 | 
				
			||||||
 | 
					.PARAGRAPH_INDENTED
 | 
				
			||||||
..
 | 
					..
 | 
				
			||||||
.de PARAGRAPH_INDENTED
 | 
					.de PARAGRAPH_INDENTED
 | 
				
			||||||
.PP
 | 
					.PP
 | 
				
			||||||
| 
						 | 
					@ -330,3 +395,32 @@ Compilé pour la dernière fois le
 | 
				
			||||||
.de VOCABULARY2
 | 
					.de VOCABULARY2
 | 
				
			||||||
.KE
 | 
					.KE
 | 
				
			||||||
..
 | 
					..
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					.\".nr G 0 1 \" numéro des notes
 | 
				
			||||||
 | 
					.\".de NOTE1
 | 
				
			||||||
 | 
					.\".\" macro NOTE1 commence les notes
 | 
				
			||||||
 | 
					.\"(\\n+G)
 | 
				
			||||||
 | 
					.\".   ev 1 \" ouvre un environnement dédié aux notes
 | 
				
			||||||
 | 
					.\".   br \" casse le flux
 | 
				
			||||||
 | 
					.\".   da print \" divertit le flux vers print
 | 
				
			||||||
 | 
					.\".   sp \" espace
 | 
				
			||||||
 | 
					.\"\\nx)
 | 
				
			||||||
 | 
					.\"..
 | 
				
			||||||
 | 
					.\".de NOTE2
 | 
				
			||||||
 | 
					.\".\" macro NOTE2 ferme les notes
 | 
				
			||||||
 | 
					.\".   br \" casse le flux
 | 
				
			||||||
 | 
					.\".   di \" ferme la diversion
 | 
				
			||||||
 | 
					.\".   ev \" sort de l'environnement
 | 
				
			||||||
 | 
					.\"..
 | 
				
			||||||
 | 
					.\".de end
 | 
				
			||||||
 | 
					.\".\" macro appellée à la fin du document
 | 
				
			||||||
 | 
					.\".   br
 | 
				
			||||||
 | 
					.\".   ev 1 \" en retourne dans l'environnement des notes
 | 
				
			||||||
 | 
					.\".   print \" execute le contenu de la diversion
 | 
				
			||||||
 | 
					.\".   br
 | 
				
			||||||
 | 
					.\".   ev
 | 
				
			||||||
 | 
					.\".   pl \\n(nlu \" ajuste la taille de la page au nombre de lignes
 | 
				
			||||||
 | 
					.\"..
 | 
				
			||||||
 | 
					.\".\" définit la macro .end comme macro de fin de document:
 | 
				
			||||||
 | 
					.\".\" .em end
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
		Loading…
	
	Add table
		
		Reference in a new issue