Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
M
moose
Manage
Activity
Members
Labels
Plan
Issues
9
Issue boards
Milestones
Wiki
Code
Merge requests
2
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package Registry
Container Registry
Operate
Environments
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Sahil Moza
moose
Commits
fad5f65a
Commit
fad5f65a
authored
7 years ago
by
Dilawar Singh
Browse files
Options
Downloads
Patches
Plain Diff
Fixed
#232
. Latex writer is producing good pdf.
parent
22eb3d1a
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
docs/source/Extensions/hidden_code_block.py
+30
-1
30 additions, 1 deletion
docs/source/Extensions/hidden_code_block.py
with
30 additions
and
1 deletion
docs/source/Extensions/hidden_code_block.py
+
30
−
1
View file @
fad5f65a
...
...
@@ -88,7 +88,36 @@ class HiddenCodeBlock(CodeBlock):
return
[
hcb
]
def
visit_hcb_tex
(
self
,
node
):
pass
global
HCB_COUNTER
# We want to use the original highlighter so that we don't
# have to reimplement it. However it raises a SkipNode
# error at the end of the function call. Thus we intercept
# it and raise it again later.
try
:
self
.
visit_literal_block
(
node
)
except
nodes
.
SkipNode
:
pass
## The last element of the body should be the literal code
## block that was just made.
#code_block = self.body[-1]
#fill_header = {'divname': 'hiddencodeblock{0}'.format(HCB_COUNTER),
# 'startdisplay': 'none' if node['starthidden'] else 'block',
# 'label': node.get('label'),
# }
#divheader = ("""<a href="javascript:showhide(document.getElementById('{divname}'))">"""
# """{label}</a><br />"""
# '''<div id="{divname}" style="display: {startdisplay}">'''
# ).format(**fill_header)
#code_block = js_showhide + divheader + code_block + "</div>"
## reassign and exit
#self.body[-1] = code_block
raise
nodes
.
SkipNode
def
depart_hcb_tex
(
self
,
node
):
pass
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment