Re: Using Macros

2020-11-13 Thread Patrice Dumas
On Fri, Nov 13, 2020 at 08:05:46PM +0100, Christopher Dimech wrote:
> Anybody understands what's wrong with the following code.
> 
> @macro Startof{entity, label, title}
> 
> @ifclear NoLabel
>@* @noindent @strong{\entity\ \label\.} @ \title\
> @end ifclear
> 
> @ifset NoLabel
>@* @noindent @strong{\entity\.} @ \title\
> @end ifset
> 
> @end macro
> 
> 
> @macro Defini(lb, tl)

It should be with braces
@macro Defini{lb, tl}

> 
>@Startof{Definition, \lb\, \tl\}
> 
> @end macro


texi2any error message is quite clear:

testm.texi:18: bad syntax for @macro argument: (lb, tl)

-- 
Pat



Using Macros

2020-11-13 Thread Christopher Dimech
Anybody understands what's wrong with the following code.

@macro Startof{entity, label, title}

@ifclear NoLabel
   @* @noindent @strong{\entity\ \label\.} @ \title\
@end ifclear

@ifset NoLabel
   @* @noindent @strong{\entity\.} @ \title\
@end ifset

@end macro


@macro Defini(lb, tl)

   @Startof{Definition, \lb\, \tl\}

@end macro






Re: Using Macros

2020-05-30 Thread Gavin Smith
On Sat, May 30, 2020 at 04:20:50AM +0200, Christopher Dimech wrote:
> 
> I have been scrutinising the Texinfo files for the book "Free Software Free 
> Society"
> where he defines some macros in texinfo.tex
> 
> In the code file not-ipr.texi there is the command
> 
> @chapter Did You Say ``Intellectual 
> Property''?@entrybreak{}It's@tie{}a@tie{}Seductive@tie{}Mirage
> 
> I do not think that @entrybreak{} is a standard texinfo command when checking 
> the manual.

It isn't.  It might be removed in the future so you shouldn't rely on 
it.

> 
> In the file texinfo.tex I have found defined
> 
> \def\entrybreak{\hfil\break}%
> 
> I want to do a similar thing in one of my documents that uses @part because 
> the part
> title is bit long and I would like to break it along multiple lines.
> 
> Because I keep to 72 columns in the code, I want to split the long part 
> titles,
> but have noticed that texinfo takes only the entry on the same line as @part.

I don't know what you mean here.

> @alias ebr = entrybreak
> @set ta @ebr{}New Ideas in Seismic
> @set tb @ebr{}Observatory Practice
> 
> @part PART I @*@*@* @value{ta}@*@value{tb}
> @part PART I @*@*@* @value{ta}@*@value{tb}

When I added a @contents after the @alias line and a @chapter after the 
@part, the contents were printed with the full part name.



Using Macros

2020-05-29 Thread Christopher Dimech


I have been scrutinising the Texinfo files for the book "Free Software Free 
Society"
where he defines some macros in texinfo.tex

In the code file not-ipr.texi there is the command

@chapter Did You Say ``Intellectual 
Property''?@entrybreak{}It's@tie{}a@tie{}Seductive@tie{}Mirage

I do not think that @entrybreak{} is a standard texinfo command when checking 
the manual.

In the file texinfo.tex I have found defined

\def\entrybreak{\hfil\break}%

I want to do a similar thing in one of my documents that uses @part because the 
part
title is bit long and I would like to break it along multiple lines.

Because I keep to 72 columns in the code, I want to split the long part titles,
but have noticed that texinfo takes only the entry on the same line as @part.


@alias ebr = entrybreak
@set ta @ebr{}New Ideas in Seismic
@set tb @ebr{}Observatory Practice

@part PART I @*@*@* @value{ta}@*@value{tb}
@part PART I @*@*@* @value{ta}@*@value{tb}