On Sat, Oct 25, 2014 at 02:51:14PM -0400, Jason Massey wrote:
> Greetings, and thank you for any attention given to this question.
> 
> Would someone please tell me exactly which customization variables need to
> modified (via `--set-customization-variable'), and set to what exact
> values, in order to achieve the following effects (all within the context
> of HTML rendering)?
> 
> * The document is split on nodes.
> * Neither nodes nor node-descriptions appear in the menu: only section
> names appear in the menus.
> * Nodes are not used in the "Next: ... Previous: ... Up:..." navigational
> linkage (at the top and bottom of pages) but rather section names appear.
> 
> ***
> 
> Said simply: I don't want "nodes" to appear in HTML menus or HTML
> navigational linkage; I want only the section-titles displayed.

It is not enough to use --set-customization-variable, the headings
cannot be customized with --set-customization-variable, you need a
customization file.  And in order to have both text and anchors in the
header, there is a need to use a function for the header formatting.

I attach a customization file that does what you want, if I understood
your need well.

The command-line should be along:

texi2any --html --set-customization-variable USE_NODES=0 
--set-customization-variable NODE_NAME_IN_MENU=0 --set-customization-variable 
NODE_NAME_IN_INDEX=0 --init header_with_sections.pm 

Beware that this uses interfaces that are not documented and subject to
changes.

-- 
Pat
sub _default_section_direction($$)
{
  my $self = shift;
  my $direction = shift;

  my $result = undef;
  my $href = $self->_element_direction($self->{'current_element'},
                                           $direction, 'href');
  my $node = $self->_element_direction($self->{'current_element'},
                                           $direction, 'text');
  my $anchor;                              
  if (defined($href) and defined($node) and $node =~ /\S/) {
    my $anchor_attributes = $self->_direction_href_attributes($direction);
    $anchor = "<a href=\"$href\"${anchor_attributes}>$node</a>";
  #} elsif (defined($node) and $node =~ /\S/) {
  #  $anchor = $node; 
  #} else {
  }
  if (defined($anchor)) {
    # i18n
    $result = $self->get_conf('BUTTONS_TEXT')->{$direction}.": $anchor";
  }
  return $result;
}

my @buttons = ([ 'NodeNext', \&_default_section_direction ],
               [ 'NodePrev', \&_default_section_direction ],
               [ 'NodeUp', \&_default_section_direction ], ' ',
               'Contents', 'Index');

foreach my $buttons ('SECTION_BUTTONS', 'CHAPTER_BUTTONS', 'TOP_BUTTONS',
                     'MISC_BUTTONS', 'SECTION_FOOTER_BUTTONS') {
  set_from_init_file($buttons, \@buttons);
}

set_from_init_file('LINKS_BUTTONS',
    ['Top', 'Index', 'Contents', 'About', 'Up', 'NextFile', 'PrevFile']);

Reply via email to