Poetry blocks

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
10 messages Options
Reply | Threaded
Open this post in threaded view
|

Poetry blocks

ysb33r
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)
Reply | Threaded
Open this post in threaded view
|

Re: Poetry blocks

mojavelinux
Administrator
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,
...
____
 

I would like to somehow have it annotated via attributes, so that it can passthrough other converters without breaking them.

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.


Just doing somehting like

  [poetry]
  ....
  Some poem here
  ....

will probably break.

Yes, you would need to load an extension that handles it.
 

So I would rather have something like

   [literal,poem="yes"]
   ...
  Some poem here.
   ....

See above. 



(And yes, I am working on an experimental converter from Asciidoctor to Leanpub Markuva)

Splendid news!

Cheers,

-Dan

--
Reply | Threaded
Open this post in threaded view
|

Re: Poetry blocks

mojavelinux
Administrator
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:
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,
...
____
 

I would like to somehow have it annotated via attributes, so that it can passthrough other converters without breaking them.

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.


Just doing somehting like

  [poetry]
  ....
  Some poem here
  ....

will probably break.

Yes, you would need to load an extension that handles it.
 

So I would rather have something like

   [literal,poem="yes"]
   ...
  Some poem here.
   ....

See above. 



(And yes, I am working on an experimental converter from Asciidoctor to Leanpub Markuva)

Splendid news!

Cheers,

-Dan

--



--
Reply | Threaded
Open this post in threaded view
|

Re: Poetry blocks

ysb33r
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?
Reply | Threaded
Open this post in threaded view
|

Re: Poetry blocks

ysb33r
I must have been typing up my post before seeing your reply Dan. I'l llook into rather using verse than literal.
Reply | Threaded
Open this post in threaded view
|

Re: Poetry blocks

mojavelinux
Administrator
In reply to this post by ysb33r

On Sun, May 24, 2015 at 2:33 PM, ysb33r [via Asciidoctor :: Discussion] <[hidden email]> wrote:
[role="poem"]
....
Poem goes here
....

I still think verse would be better. Verse formats by respecting endlines, like literal, but it does not use monospaced text.

Reply | Threaded
Open this post in threaded view
|

Re: Poetry blocks

mojavelinux
Administrator
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 :)


--
Reply | Threaded
Open this post in threaded view
|

Re: Poetry blocks

ysb33r
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.
Reply | Threaded
Open this post in threaded view
|

Re: Poetry blocks

ysb33r
In reply to this post by mojavelinux
mojavelinux wrote
>
> 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.
Does this apply to sections i.e. [chapter] & [preface] as well?
Reply | Threaded
Open this post in threaded view
|

Re: Poetry blocks

mojavelinux
Administrator
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:
mojavelinux wrote
>
> 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.
Does this apply to sections i.e. [chapter] & [preface] as well?


If you reply to this email, your message will be added to the discussion below:
http://discuss.asciidoctor.org/Poetry-blocks-tp3254p3274.html
To start a new topic under Asciidoctor :: Discussion, email [hidden email]
To unsubscribe from Asciidoctor :: Discussion, click here.
NAML



--