Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Z
ZODB
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
nexedi
ZODB
Commits
150d4b8c
Commit
150d4b8c
authored
Jan 13, 2003
by
Fred Drake
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Markup support for XML-related elements, to be used in describing the schema
language.
parent
c700d3c4
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
81 additions
and
0 deletions
+81
-0
trunk/doc/ZConfig/xmlmarkup.perl
trunk/doc/ZConfig/xmlmarkup.perl
+54
-0
trunk/doc/ZConfig/xmlmarkup.sty
trunk/doc/ZConfig/xmlmarkup.sty
+27
-0
No files found.
trunk/doc/ZConfig/xmlmarkup.perl
0 → 100644
View file @
150d4b8c
#
LaTeX2HTML
support
for
the
xmlmarkup
package
.
Doesn
't do indexing.
package main;
# sub ltx_next_argument{
# my $param;
# $param = missing_braces()
# unless ((s/$next_pair_pr_rx/$param=$2;''/eo)
# ||(s/$next_pair_rx/$param=$2;''/eo));
# return $param;
# }
sub do_cmd_element{
local($_) = @_;
my $name = next_argument();
return "<tt class='
element
'>$name</tt>" . $_;
}
sub do_cmd_attribute{
local($_) = @_;
my $name = next_argument();
return "<tt class='
attribute
'>$name</tt>" . $_;
}
sub do_env_attributedesc{
local($_) = @_;
my $name = next_argument();
my $valuetype = next_argument();
return ("\n<dl class='
macrodesc
'>"
. "\n<dt><b><tt class='
macro
'>$name</tt></b>"
. " (<tt>$valuetype</tt>)"
. "\n<dd>"
. $_
. "</dl>");
}
sub do_env_elementdesc{
local($_) = @_;
my $name = next_argument();
my $contentmodel = next_argument();
return ("\n<dl class='
elementdesc
'>"
. "\n<dt class='
start
-
tag
'><tt><"
. "<b class='
element
'>$name</b>></tt>"
. "\n<dd class='
content
-
model
'>$contentmodel"
. "\n<dt class='
endtag
'><tt></"
. "<b class='
element
'>$name</b>></tt>"
. "\n<dd class='
descrition
'>"
. $_
. "</dl>");
}
1; # Must end with this, because Perl is bogus.
trunk/doc/ZConfig/xmlmarkup.sty
0 → 100644
View file @
150d4b8c
% Created by Fred L. Drake, Jr. <fdrake@acm.org>, as part of the
% Python Documentation Project.
%
% Define some simple markup for the LaTeX command documentation:
\ProvidesPackage
{
xmlmarkup
}
\RequirePackage
{
python
}
% fulllineitems environment
\newcommand
{
\element
}
[1]
{
\code
{
#1
}}
\newcommand
{
\attribute
}
[1]
{
\code
{
#1
}}
% \begin{elementdesc}{type}{content-model}
\newenvironment
{
elementdesc
}
[2]
{
\begin{fulllineitems}
\item
[\code{\textless{\bfseries #1}\textgreater}]
\code
{
#2
}
\item
[\code{\textless/{\bfseries #1}\textgreater}]
\index
{
#1 element@
\py
@idxcode
{
#1
}
element
}
\index
{
elements!#1@
\py
@idxcode
{
#1
}}
}{
\end{fulllineitems}
}
% \begin{attributedesc}{name}{content-type}
\newenvironment
{
attributedesc
}
[2]
{
\begin{fulllineitems}
\item
[\code{\bfseries#1}{\quad(\code{#2})}]
\index
{
#1@
\py
@idxcode
{
#1
}}
}{
\end{fulllineitems}
}
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment