Loading... |
Reply to author |
Edit post |
Move post |
Delete this post |
Delete this post and replies |
Change post date |
Print post |
Permalink |
Raw mail |
![]() ![]() ![]() ![]() ![]() ![]() ![]() |
85 posts
|
Asciidoctor 1.5.2 [http://asciidoctor.org] Runtime Environment (ruby 2.0.0p576 (2014-09-19) [x86_64-cygwin]) (lc:UTF-8 fs:Windows-1252 in:- ex:UTF-8) I've scanned a lot of documentation on this question, but what the asciidoctor processor does doesn't seem to quite match what I read.... What I want is to have a paragraph style 'rule', that will be indented and blue (or think up any typical visual/font mods). So in the Asciidoc source I have: [.rule] *VTVSID* value-set id defined sss ddd fff. I had thought it should just be [rule] but that doesn't work. What I expected to get was 'class=rule' in the generated <p> tag. What I get is this: <div class="paragraph rule"><p>....</p></div> I created a custom css and added the following to it: div.paragraph.rule {text-indent:1.25em;color:blue;font-family:"Open Sans"} This does do something in the HTML output, but it's not quite right. Questions: * why is the generated class name "paragraph rule" and not just "rule"? * I would normally expect to just define p.rule {} in the CSS - I picked up the div.paragraph.rule thing from the asciidoctor documentation. * why is the class put on an enclosing <div>, not just on the <p>? * I also want to generate PDF - is the [.rule] directive in the adoc source correct for that as well? Sorry if this is too basic. I don't normally hack CSS source and am very new to Asciidoctor. |
Loading... |
Reply to author |
Edit post |
Move post |
Delete this post |
Delete this post and replies |
Change post date |
Print post |
Permalink |
Raw mail |
![]() ![]() ![]() ![]() ![]() ![]() ![]() |
Administrator
2681 posts
|
For now, you'll have to define your CSS rule as: .paragraph.rule > p { text-indent: 1.25em; color: blue; font-family: "Open Sans"; } (an alternative is to modify the templates for the HTML backend so that Asciidoctor only emits a <p> element). Asciidoctor outputs paragraphs using this structure to accommodate a paragraph style (and, historically, to be consistent with AsciiDoc Python output). There's an open issue to simplify it. Cheers, -Dan On Fri, Jun 19, 2015 at 4:42 AM, wolandscat [via Asciidoctor :: Discussion] <[hidden email]> wrote:
... [show rest of quote] Dan Allen | http://google.com/profiles/dan.j.allen |
Free forum by Nabble | Edit this page |