Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit dfa539d

Browse files
committed
Add --up-link and --up-title parameters to allow linking the top level
of the generated document to an external index. These correspond to the -up_url and -up_title parameters of LaTeX2HTML.
1 parent 3be2074 commit dfa539d

1 file changed

Lines changed: 12 additions & 1 deletion

File tree

Doc/tools/mkhowto

Lines changed: 12 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,8 @@ HTML options:
2222
the filenames.
2323
--style Specify the CSS file to use for the output (filename,
2424
not a URL).
25+
--up-link URL to a parent document.
26+
--up-title Title of a parent document.
2527
2628
Other options:
2729
--a4 Format for A4 paper.
@@ -91,6 +93,8 @@ class Options:
9193
numeric = 0
9294
style_file = os.path.join(TOPDIR, "html", "style.css")
9395
about_file = os.path.join(TOPDIR, "html", "about.dat")
96+
up_link = None
97+
up_title = None
9498
#
9599
DEFAULT_FORMATS = ("pdf",)
96100
ALL_FORMATS = ("dvi", "html", "pdf", "ps", "text")
@@ -112,7 +116,8 @@ class Options:
112116
"address=", "a4", "letter", "l2h-init=",
113117
"link=", "split=", "logging", "debugging",
114118
"keep", "quiet", "runs=", "image-type=",
115-
"about=", "numeric", "style="]
119+
"about=", "numeric", "style=",
120+
"up-link=", "up-title="]
116121
+ list(self.ALL_FORMATS))
117122
for opt, arg in opts:
118123
if opt == "--all":
@@ -154,6 +159,10 @@ class Options:
154159
self.style_file = os.path.abspath(arg)
155160
elif opt == "--l2h-init":
156161
self.l2h_init_files.append(os.path.abspath(arg))
162+
elif opt == "--up-link":
163+
self.up_link = arg
164+
elif opt == "--up-title":
165+
self.up_title = arg
157166
#
158167
# Format specifiers:
159168
#
@@ -391,6 +400,8 @@ class Job:
391400
l2hoption(fp, "ADDRESS", options.address)
392401
l2hoption(fp, "MAX_LINK_DEPTH", options.max_link_depth)
393402
l2hoption(fp, "MAX_SPLIT_DEPTH", options.max_split_depth)
403+
l2hoption(fp, "EXTERNAL_UP_LINK", options.up_link)
404+
l2hoption(fp, "EXTERNAL_UP_TITLE", options.up_title)
394405
fp.write("1;\n")
395406
fp.close()
396407

0 commit comments

Comments
 (0)