Loading... |
Reply to author |
Edit post |
Move post |
Delete this post |
Delete this post and replies |
Change post date |
Print post |
Permalink |
Raw mail |
46 posts
|
I am trying to work out what the best translation block would be to support Leanpub's Poerty blocks (0
I am thinking that either the literal block would work or maybe the verse block, but in both cases I would like to somehow have it annotated via attributes, so that it can passthrough other converters without breaking them. Just doing somehting like [poetry] .... Some poem here .... will probably break. So I would rather have something like [literal,poem="yes"] ... Some poem here. .... Any ideas? (And yes, I am working on an experimental converter from Asciidoctor to Leanpub Markuva) |
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
|
On Sun, May 24, 2015 at 1:59 PM, ysb33r [via Asciidoctor :: Discussion] <[hidden email]> wrote: I am trying to work out what the best translation block would be to support Leanpub's Poerty blocks (0 I think verse works best here with the "poetry" role. [verse.poetry] ____ Blowing photos,scattering themselves like conceptual fragments searching unity, ... ____
Any block can add an arbitrary amount of metadata via block attributes that other converters can utilize. The important thing is to pick a structural container (the delimiters) that best fits the type of content so that it renders in a reasonable way when using the built-in converters. In this case, I think verse is the right choice.
Yes, you would need to load an extension that handles it.
See above.
Splendid news! Cheers, -Dan Dan Allen | http://google.com/profiles/dan.j.allen |
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
|
In reply to this post by ysb33r
The definition of "structural container" can be found here. -Dan On Sun, May 24, 2015 at 2:26 PM, Dan Allen <[hidden email]> wrote:
... [show rest of quote] Dan Allen | http://google.com/profiles/dan.j.allen |
Loading... |
Reply to author |
Edit post |
Move post |
Delete this post |
Delete this post and replies |
Change post date |
Print post |
Permalink |
Raw mail |
46 posts
|
In reply to this post by ysb33r
Actually I can get it to work by doing
[role="poem"] .... Poem goes here .... It does bring up anotehr question for me: Is it the responsibility of the converter to [1] look for whether a block has a role [2] look whether there is an extension to handle a specific role? Or is it asciidocotr-core's responsibility? |
Loading... |
Reply to author |
Edit post |
Move post |
Delete this post |
Delete this post and replies |
Change post date |
Print post |
Permalink |
Raw mail |
46 posts
|
I must have been typing up my post before seeing your reply Dan. I'l llook into rather using verse than literal.
|
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
|
In reply to this post by ysb33r
On Sun, May 24, 2015 at 2:33 PM, ysb33r [via Asciidoctor :: Discussion] <[hidden email]> wrote:
I still think verse would be better. Verse formats by respecting endlines, like literal, but it does not use monospaced text. |
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
|
In reply to this post by ysb33r
On Sun, May 24, 2015 at 3:53 PM, ysb33r [via Asciidoctor :: Discussion] <[hidden email]> wrote: I must have been typing up my post before seeing your reply Dan. Hahaha. Same here :) Dan Allen | http://google.com/profiles/dan.j.allen |
Loading... |
Reply to author |
Edit post |
Move post |
Delete this post |
Delete this post and replies |
Change post date |
Print post |
Permalink |
Raw mail |
46 posts
|
In reply to this post by mojavelinux
Yes, going from [verse] on ASciidoctor to {style="poem"} on Leanpub yields much better result than going to a monospaced block on Leanpub.
|
Loading... |
Reply to author |
Edit post |
Move post |
Delete this post |
Delete this post and replies |
Change post date |
Print post |
Permalink |
Raw mail |
46 posts
|
In reply to this post by mojavelinux
Does this apply to sections i.e. [chapter] & [preface] as well? |
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
|
Yep. The block attributes in AsciiDoc are schema-less. [foo=bar] == Chapter Name -Dan On Wed, May 27, 2015 at 4:51 PM, ysb33r [via Asciidoctor :: Discussion] <[hidden email]> wrote: Does this apply to sections i.e. [chapter] & [preface] as well? Dan Allen | http://google.com/profiles/dan.j.allen |
Free forum by Nabble | Edit this page |