Add RecRef links to the top & bottom of each reference page
This commit is contained in:
+3
-1
@@ -3,7 +3,7 @@
|
||||
# in file LICENSE that is included with this distribution.
|
||||
#*************************************************************************
|
||||
|
||||
=head1 Fields Common to Input Record Types
|
||||
=title Fields Common to Input Record Types
|
||||
|
||||
This section describes fields that are found in many input record types.
|
||||
These fields usually have the same meaning whenever they are used.
|
||||
@@ -206,3 +206,5 @@ If SIMM is not YES, NO or RAW, a SOFT alarm with a severity of INVALID is
|
||||
raised, and return status is set to -1.
|
||||
|
||||
=back
|
||||
|
||||
=cut
|
||||
+3
-1
@@ -3,7 +3,7 @@
|
||||
# in file LICENSE that is included with this distribution.
|
||||
#*************************************************************************
|
||||
|
||||
=head1 Fields Common to Output Record Types
|
||||
=title Fields Common to Output Record Types
|
||||
|
||||
This section describes fields that are found in many output record types.
|
||||
These fields usually have the same meaning whenever they are used.
|
||||
@@ -237,3 +237,5 @@ If SIMM is not YES or NO, a SOFT alarm with a severity of INVALID is
|
||||
raised, and return status is set to -1.
|
||||
|
||||
=back
|
||||
|
||||
=cut
|
||||
@@ -3,7 +3,7 @@
|
||||
# in file LICENSE that is included with this distribution.
|
||||
#*************************************************************************
|
||||
|
||||
=head1 Fields Common to All Record Types
|
||||
=title Fields Common to All Record Types
|
||||
|
||||
This section contains a description of the fields that are common to all record
|
||||
types. These fields are defined in dbCommon.dbd.
|
||||
|
||||
@@ -141,7 +141,8 @@ __END_DOCTYPE
|
||||
my $title = shift;
|
||||
return $podHtml->idify($title, 1);
|
||||
}
|
||||
} else { # Fall back to HTML
|
||||
}
|
||||
else { # Regular HTML
|
||||
$Pod::Simple::HTML::Content_decl = $contentType;
|
||||
$podHtml = EPICS::PodHtml->new();
|
||||
$podHtml->html_css('style.css');
|
||||
@@ -153,7 +154,13 @@ __END_DOCTYPE
|
||||
}
|
||||
|
||||
# Parse the Pod text from the root DBD object
|
||||
my $pod = join "\n", '=for html <div class="pod">', '',
|
||||
my $pod = join "\n",
|
||||
'=for html <div class="pod">',
|
||||
'',
|
||||
'L<EPICS Reference Manual|RecordReference>',
|
||||
'',
|
||||
'=for html <hr>',
|
||||
'',
|
||||
map {
|
||||
# Handle a 'recordtype' Pod directive
|
||||
if (m/^ =recordtype \s+ (\w+) /x) {
|
||||
@@ -173,13 +180,16 @@ my $pod = join "\n", '=for html <div class="pod">', '',
|
||||
}
|
||||
elsif (m/^ =title \s+ (.*)/x) {
|
||||
$title = $1;
|
||||
"=head1 $title";
|
||||
"=head1 EPICS Reference: $title";
|
||||
}
|
||||
else {
|
||||
$_;
|
||||
}
|
||||
} $dbd->pod,
|
||||
'=for html </div>', '';
|
||||
'=for html </div><hr>',
|
||||
'',
|
||||
'L<EPICS Reference Manual|RecordReference>',
|
||||
'';
|
||||
|
||||
$podHtml->force_title($podHtml->encode_entities($title));
|
||||
$podHtml->perldoc_url_prefix('');
|
||||
@@ -307,7 +317,7 @@ sub DBD::Recfield::writable {
|
||||
|
||||
=pod
|
||||
|
||||
=head1 Converting Wiki Record Reference to POD
|
||||
=head1 Writing Record Reference as POD
|
||||
|
||||
If you open the src/std/rec/aiRecord.dbd.pod file in your favourite plain text
|
||||
editor you'll see what input was required to generate the aiRecord.html file.
|
||||
@@ -320,13 +330,14 @@ When we add POD markup to a record type, we rename its *Record.dbd file to
|
||||
system to find it by its new name. The POD content is effectively just a new
|
||||
kind of comment that appears in .dbd.pod files, which the formatter knows how to
|
||||
convert into HTML. The build also generates a plain *Record.dbd file from this
|
||||
same input file by stripping out all of the POD markup.
|
||||
same input file by stripping out all of the POD markup, so make sure to remove
|
||||
the old *Record.dbd file from your source directory.
|
||||
|
||||
Documentation for Perl's POD markup standard can be found online at
|
||||
L<https://perldoc.perl.org/perlpod.html> or you may be able to type 'perldoc
|
||||
perlpod' into a Linux command-line to see the same text. We added a few POD
|
||||
keywords of our own to handle the table generation, and I'll cover those briefly
|
||||
below.
|
||||
L<https://perldoc.perl.org/perlpod> or you may be able to type
|
||||
C<perldoc perlpod> at a Linux command-line to see the same text.
|
||||
We added a few POD keywords of our own to handle the table generation, and we'll
|
||||
cover those briefly below.
|
||||
|
||||
POD text can appear almost anywhere in a dbd.pod file. It always starts with a
|
||||
line "=[keyword] [additional text...]" where [keyword] is "title", "head1"
|
||||
@@ -390,4 +401,8 @@ table that lists all the choices found in the named menu. Any MENU fields in the
|
||||
field tables that refer to a locally-defined menu will generate a link to a
|
||||
document section which must be titled "Menu [menuName]".
|
||||
|
||||
The "title" keyword should only appear once in each file, it sets the document
|
||||
title as well as generating a "head1" heading with "EPICS Reference:" pre-pended
|
||||
to the text.
|
||||
|
||||
=cut
|
||||
|
||||
Reference in New Issue
Block a user