Table cell with include -- Unresolved Directive

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

Table cell with include -- Unresolved Directive

Chuck
Hi everyone,

I'm bumping into another issue. I have a simple 3 column table. The first issue is the include statement in the first cell. The second issue is slightly different with the image in the third cell.

When I preview the file in Chrome with the Asciidoctor plugin, the asciidoctor preview for Atom, or generate HTML from the cli with `asciidoctor filename.adoc' I see the contact information and image as expected.

The problem with the include file is that when I use the atom asciidoc preview I get an error that there is an "Unresolved directive in <stdin> - include::contact.adoc[]. When I generate a PDF using asciidoctor-pdf instead of the include file I get the text "include::contact.adoc[]" text.

The problem with the image is when I generate a PDF using asciidoctor-pdf. Instead of the image I get the text "image::images/example.png[example, 250, 76]"

The image and include file are both either in the same directory or relative to the same directory. I've tried setting a base directory and setting the safe mode to unsafe. Neither of those changes made any difference in the rendering.

The code is here:

https://gist.github.com/chuckf/cca7e7b58b17961ac1960adf6283e497
Reply | Threaded
Open this post in threaded view
|

Re: Table cell with include -- Unresolved Directive

mojavelinux
Administrator
Chuck,

Before I dive into the details, it's important to point out that Asciidoctor PDF does not currently support AsciiDoc table cells. It's an open issue and will require some redesign in order to solve. See https://github.com/asciidoctor/asciidoctor-pdf/issues/6

You can use images in table cells, as long as they are inline images. Obviously, there are some limitations to using inline images, but it should be able to work in some circumstances.

> The problem with the include file is that when I use the atom asciidoc preview I get an error that there is an "Unresolved directive in <stdin> - include::contact.adoc[].

That appears to be a bug in Asciidoctor.js. You can work around it by putting the include directive on a line by itself.

a|
include:contact.adoc[]

I'll need to see what's going on there.

-Dan

On Tue, Aug 23, 2016 at 7:25 AM, Chuck [via Asciidoctor :: Discussion] <[hidden email]> wrote:
Hi everyone,

I'm bumping into another issue. I have a simple 3 column table. The first issue is the include statement in the first cell. The second issue is slightly different with the image in the third cell.

When I preview the file in Chrome with the Asciidoctor plugin, the asciidoctor preview for Atom, or generate HTML from the cli with `asciidoctor filename.adoc' I see the contact information and image as expected.

The problem with the include file is that when I use the atom asciidoc preview I get an error that there is an "Unresolved directive in <stdin> - include::contact.adoc[]. When I generate a PDF using asciidoctor-pdf instead of the include file I get the text "include::contact.adoc[]" text.

The problem with the image is when I generate a PDF using asciidoctor-pdf. Instead of the image I get the text "image::images/example.png[example, 250, 76]"

The image and include file are both either in the same directory or relative to the same directory. I've tried setting a base directory and setting the safe mode to unsafe. Neither of those changes made any difference in the rendering.

The code is here:

https://gist.github.com/chuckf/cca7e7b58b17961ac1960adf6283e497


If you reply to this email, your message will be added to the discussion below:
http://discuss.asciidoctor.org/Table-cell-with-include-Unresolved-Directive-tp4901.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: Table cell with include -- Unresolved Directive

mojavelinux
Administrator
In reply to this post by Chuck
I tested the scenario of the include directive in an AsciiDoc table cell using Asciidoctor.js 1.5.5-1 on the commandline / node and it worked. So this problem seems specific to Asciidoctor.js running in the browser...or it only happens in Atom.

-Dan

On Tue, Aug 23, 2016 at 4:47 PM, Dan Allen <[hidden email]> wrote:
Chuck,

Before I dive into the details, it's important to point out that Asciidoctor PDF does not currently support AsciiDoc table cells. It's an open issue and will require some redesign in order to solve. See https://github.com/asciidoctor/asciidoctor-pdf/issues/6

You can use images in table cells, as long as they are inline images. Obviously, there are some limitations to using inline images, but it should be able to work in some circumstances.

> The problem with the include file is that when I use the atom asciidoc preview I get an error that there is an "Unresolved directive in <stdin> - include::contact.adoc[].

That appears to be a bug in Asciidoctor.js. You can work around it by putting the include directive on a line by itself.

a|
include:contact.adoc[]

I'll need to see what's going on there.

-Dan

On Tue, Aug 23, 2016 at 7:25 AM, Chuck [via Asciidoctor :: Discussion] <[hidden email]> wrote:
Hi everyone,

I'm bumping into another issue. I have a simple 3 column table. The first issue is the include statement in the first cell. The second issue is slightly different with the image in the third cell.

When I preview the file in Chrome with the Asciidoctor plugin, the asciidoctor preview for Atom, or generate HTML from the cli with `asciidoctor filename.adoc' I see the contact information and image as expected.

The problem with the include file is that when I use the atom asciidoc preview I get an error that there is an "Unresolved directive in <stdin> - include::contact.adoc[]. When I generate a PDF using asciidoctor-pdf instead of the include file I get the text "include::contact.adoc[]" text.

The problem with the image is when I generate a PDF using asciidoctor-pdf. Instead of the image I get the text "image::images/example.png[example, 250, 76]"

The image and include file are both either in the same directory or relative to the same directory. I've tried setting a base directory and setting the safe mode to unsafe. Neither of those changes made any difference in the rendering.

The code is here:

https://gist.github.com/chuckf/cca7e7b58b17961ac1960adf6283e497


If you reply to this email, your message will be added to the discussion below:
http://discuss.asciidoctor.org/Table-cell-with-include-Unresolved-Directive-tp4901.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



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

Re: Table cell with include -- Unresolved Directive

mojavelinux
Administrator
In reply to this post by Chuck
It really does seems specific to Atom. Could you file an issue in the preview extension so we can track / debug it?

-Dan

On Tue, Aug 23, 2016 at 6:29 PM, Dan Allen <[hidden email]> wrote:
I tested the scenario of the include directive in an AsciiDoc table cell using Asciidoctor.js 1.5.5-1 on the commandline / node and it worked. So this problem seems specific to Asciidoctor.js running in the browser...or it only happens in Atom.

-Dan

On Tue, Aug 23, 2016 at 4:47 PM, Dan Allen <[hidden email]> wrote:
Chuck,

Before I dive into the details, it's important to point out that Asciidoctor PDF does not currently support AsciiDoc table cells. It's an open issue and will require some redesign in order to solve. See https://github.com/asciidoctor/asciidoctor-pdf/issues/6

You can use images in table cells, as long as they are inline images. Obviously, there are some limitations to using inline images, but it should be able to work in some circumstances.

> The problem with the include file is that when I use the atom asciidoc preview I get an error that there is an "Unresolved directive in <stdin> - include::contact.adoc[].

That appears to be a bug in Asciidoctor.js. You can work around it by putting the include directive on a line by itself.

a|
include:contact.adoc[]

I'll need to see what's going on there.

-Dan

On Tue, Aug 23, 2016 at 7:25 AM, Chuck [via Asciidoctor :: Discussion] <[hidden email]> wrote:
Hi everyone,

I'm bumping into another issue. I have a simple 3 column table. The first issue is the include statement in the first cell. The second issue is slightly different with the image in the third cell.

When I preview the file in Chrome with the Asciidoctor plugin, the asciidoctor preview for Atom, or generate HTML from the cli with `asciidoctor filename.adoc' I see the contact information and image as expected.

The problem with the include file is that when I use the atom asciidoc preview I get an error that there is an "Unresolved directive in <stdin> - include::contact.adoc[]. When I generate a PDF using asciidoctor-pdf instead of the include file I get the text "include::contact.adoc[]" text.

The problem with the image is when I generate a PDF using asciidoctor-pdf. Instead of the image I get the text "image::images/example.png[example, 250, 76]"

The image and include file are both either in the same directory or relative to the same directory. I've tried setting a base directory and setting the safe mode to unsafe. Neither of those changes made any difference in the rendering.

The code is here:

https://gist.github.com/chuckf/cca7e7b58b17961ac1960adf6283e497


If you reply to this email, your message will be added to the discussion below:
http://discuss.asciidoctor.org/Table-cell-with-include-Unresolved-Directive-tp4901.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



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



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