PDF generation of tables with includes

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

PDF generation of tables with includes

Chuck
I'm having an issue with generating a PDF.

In my asciidoc source I have a table with some cells containing includes. When generating a HTML doc things render as expected. However, in the PDF rendering the cell that contains the variable "include::contact.adoc" or an equivalent image link render as the text in the cell.

The code is:

== project file
[cols=3,frame=none]
|===
a| include::contact.adoc[]
^|Focused Information Security

https://www.example.com[www.example.com]
>a| image::images/logo.png[250, 76]
|===

And the result in the PDF rendering is:

PDF Rendered image


Is there a way around this? My command line to generate the doc is simply 'asciidoctor-pdf examplefile.adoc'.
Reply | Threaded
Open this post in threaded view
|

Re: PDF generation of tables with includes

rockyallen
What happens if you put the image:: and include:: on their own lines?

== project file
[cols=3,frame=none]
|===
a|

include::contact.adoc[]

^|Focused Information Security

https://www.example.com[www.example.com]
>a|

image::images/logo.png[250, 76]

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

Re: PDF generation of tables with includes

mojavelinux
Administrator
In reply to this post by Chuck
Chuck,

Can you please confirm that you are using Asciidoctor PDF 1.5.0.alpha.14? The AsciiDoc-style table cell was not supported until that version (which was just recently released).


I tried the syntax you provided using 1.5.0.alpha.14 and it worked for me as expected.

Cheers,

-Dan

On Wed, Feb 8, 2017 at 8:50 AM, Chuck [via Asciidoctor :: Discussion] <[hidden email]> wrote:
I'm having an issue with generating a PDF.

In my asciidoc source I have a table with some cells containing includes. When generating a HTML doc things render as expected. However, in the PDF rendering the cell that contains the variable "include::contact.adoc" or an equivalent image link render as the text in the cell.

The code is:

== project file
[cols=3,frame=none]
|===
a| include::contact.adoc[]
^|Focused Information Security

https://www.example.com[www.example.com]
>a| image::images/logo.png[250, 76]
|===

And the result in the PDF rendering is:

PDF Rendered image


Is there a way around this? My command line to generate the doc is simply 'asciidoctor-pdf examplefile.adoc'.


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



--
Dan Allen | @mojavelinux | https://twitter.com/mojavelinux
Reply | Threaded
Open this post in threaded view
|

Re: PDF generation of tables with includes

Chuck
Sorry for the delay in responding, I was on vacation that started early due to the snow in NY.

@rockyallen Thanks for your response. Even on Alpha.13, which I was on, separating the lines as you described worked for the text include but not the image include.

@mojavelinux I updated to Alpha.14 from Alpha.13. The tables work better now including inserting the image and not requiring the line break that rockyallen mentions in his reply.  However it does not seem to honor the alignment rules that I have in the table. Can you confirm that the centering(^) and right justification(>) is working on your version?

I'm running this on MacOS Sierra 10.12.3 if that matters.  The output of 'asciidoctor-pdf --version' is:

Asciidoctor PDF 1.5.0.alpha.14 using Asciidoctor 1.5.5 [http://asciidoctor.org]
Runtime Environment (ruby 2.3.3p222 (2016-11-21 revision 56859) [x86_64-darwin16]) (lc:UTF-8 fs:UTF-8 in:- ex:UTF-8)
Reply | Threaded
Open this post in threaded view
|

Re: PDF generation of tables with includes

mojavelinux
Administrator

On Mon, Feb 13, 2017 at 7:46 AM, Chuck [via Asciidoctor :: Discussion] <[hidden email]> wrote:
However it does not seem to honor the alignment rules that I have in the table. Can you confirm that the centering(^) and right justification(>) is working on your version?

I haven't added support for custom alignment in AsciiDoc table cells. It's a complex issue because technically that's a cascading style. I'm not sure yet what should happen or how it's going to work.

Custom alignment does work for normal table cells.

-Dan

--
Dan Allen | @mojavelinux | https://twitter.com/mojavelinux