bug-texinfo
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Texinfo 4.0 feature request (and bug)


From: Mark Lindner
Subject: Texinfo 4.0 feature request (and bug)
Date: Tue, 31 Jul 2001 23:54:39 -0500

I've been documenting Java APIs with Texinfo and a while back I submitted a
bug report about a problem in the @deftypeivar macro.

Now I also have a need for a new macro that is not available in Texinfo AFAIK.
I've defined one called @deftypecvar, which is identical to @deftypeivar
except it lists the variable as a "Class Variable" rather than as an "Instance
Variable".

This corresponds to "static" variables defined in Java classes.

Here's what I added to texinfo.tex; however I'm not an expert at TeX so there
may be a more elegant way to do this:


\ifx\putwordClassVariableof\undefined \gdef\putwordClassVariableof{Class
Variable of}\fi

% @deftypecvar CLASS TYPE VARNAME
%
\def\deftypecvar{%
  \deftypemethparsebody\Edeftypecvar\deftypecvarx\deftypecvarheader}
%
% #1 is the class name, #2 the data type, #3 the variable name.
\def\deftypecvarheader#1#2#3{%
  \dosubind{vr}{\code{#3}}{\putwordof\ \code{#1}}% entry in variable index
  \begingroup
    \defname{\defheaderxcond#2\relax$$$#3}{\putwordClassVariableof\
\code{#1}}%
    \defvarargs{}%
  \endgroup
}


Basically just cut & paste of the original putwordInstanceVariableof and
@deftypeivar definitions.

I'd appreciate if you could roll this (and the bug fix I submitted a few
months ago) into a future version of Texinfo.

Cheers,
Mark

-- 

------------------------------------------------------------------------------
Mark Lindner            http://www.dystance.net/       address@hidden
------------------------------------------------------------------------------
        The programmers of old were mysterious and profound.  We cannot fathom
their thoughts, so all we do is describe their appearance.
        Aware, like a fox crossing the water.  Alert, like a general on the
battlefield.  Kind, like a hostess greeting her guests. Simple, like uncarved
blocks of wood.  Opaque, like black pools in darkened caves.
        Who can tell the secrets of their hearts and minds?
        The answer exists only in the Tao.
                -- Geoffrey James, "The Tao of Programming"

(Fortune selected at random by an automated process from a large database.)



reply via email to

[Prev in Thread] Current Thread [Next in Thread]