-
Notifications
You must be signed in to change notification settings - Fork 685
rocdoc directive inserts an extra blank line in doc, doesn't look right #20679
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Comments
So, it's a problem of <div class="coqdoc literal-block docutils container">
<span><span class="coqdoc-keyword">Ltac2</span><span> </span><span class="coqdoc-keyword">Notation</span><span> </span><span class="coqdoc-var">foo</span><span> := </span><span class="coqdoc-keyword">fun</span><span> </span><span class="coqdoc-var">x</span><span> => </span><span class="coqdoc-var">x</span><span> ().</span><span>
</span></span></div> The spurious line-break is the one after |
Fixing the HTML generation sounded complicated to me. I compared the HTML generated for rocqdoc: <div class="coqdoc literal-block docutils container">
<span><span></span><span class="coqdoc-keyword">let</span><span> </span><span class="coqdoc-var">x</span><span> := '0 </span><span class="coqdoc-tactic">in</span><span> </span><span class="coqdoc-keyword">constr</span><span>:(1 + </span><span class="coqdoc-var">ltac2</span><span>:(</span><span class="coqdoc-tactic">exact</span><span> $</span><span class="coqdoc-var">x</span><span>))</span></span></div> rocqtop: <div class="coqtop literal-block docutils container">
<span></span><dl class="simple">
<dt><span></span><span class="coqdoc-keyword">Ltac</span><span>2 </span><span class="coqdoc-var">myconstr</span><span> () := </span><span class="coqdoc-keyword">constr</span><span>:(</span><span class="coqdoc-var">nat</span><span> -> 0).</span><span>
</span></dt></dl>
</div> In both case, there is the first The difference however is in how the CSS is applied: .coqdoc, .coqtop dt, .coqtop dd, pre { /* pre added because of production lists */
font-family: Consolas,"Andale Mono WT","Andale Mono","Lucida Console","Lucida Sans Typewriter","DejaVu Sans Mono","Bitstream Vera Sans Mono","Liberation Mono","Nimbus Mono L",Monaco,"Courier New",Courier,monospace !important; /* Copied from RTD theme */
font-size: 12px !important; /* Copied from RTD theme */
line-height: 1.5 !important; /* Copied from RTD theme */
white-space: pre;
} The difference is that in the case of |
Adjust the CSS selectors of rocqdoc to be closer to the ones of rocqtop.
Uh oh!
There was an error while loading. Please reload this page.
Description of the problem
.. rocdoc::
always inserts an extra blank line, which doesn't look right. (Note the doc uses:n:
heavily, which can create doc hyperlinks for non-terminals but doesn't provide the coloring you get from rocdoc.:n:
can also be used in-line rather than becoming a new paragraph.)is rendered as
Version of Rocq / Coq where this bug occurs
9.0
The text was updated successfully, but these errors were encountered: