Asciidoctor-pdf: Passthrough generates conversion missing warning

Created on 15 Jan 2016  Â·  14Comments  Â·  Source: asciidoctor/asciidoctor-pdf

I'm using a passthrough code block to specify the Google Analytics script:

<script>
</script>
++++

No errors from the HTML generation. The PDF error generates:

asciidoctor: WARNING: conversion missing in backend pdf for pass
documentation

Most helpful comment

Btw, you should absolutely not be embedding a <style> element directly in your content. This is what docinfo is for. (docinfo can be contributed from a file or an extension).

All 14 comments

That's correct. Asciidoctor PDF does not support the passthrough block (since it doesn't bare much meaning). You need to filter this out using preprocessor directives.

ifdef::backend-html5[]
++++
<script>
</script>
++++
endif::[]

This may be worth mentioning in the README. Therefore, I will keep it open as a documentation issue.

I'm pretty new to this... where can I find info on preprocessor directives?

On Fri, Jan 15, 2016 at 3:57 AM, Dan Allen [email protected] wrote:

That's correct. Asciidoctor PDF does not support the passthrough block
(since it doesn't bare much meaning). You need to filter this out using
preprocessor directives.

ifdef::basebackend-html[]
++++

++++
endif::[]

This may be worth mentioning in the README. Therefore, I will keep it open
as a documentation issue.

—
Reply to this email directly or view it on GitHub
https://github.com/asciidoctor/asciidoctor-pdf/issues/390#issuecomment-171933019
.

Thanks,

Gunnar
_If you think you can you can, if you think you can't you're right._

Unfortunately, it's one of the features we're behind on documenting in the user manual. See this open issue to find key resources and information. https://github.com/asciidoctor/asciidoctor.org/issues/283

Btw, it's probably better to add the Google Analytics via an extension. In fact, you can find such an extension in the extensions lab.

See https://github.com/asciidoctor/asciidoctor-extensions-lab#using-an-extension for how to apply it.

how to deal with mathematical formulas to PDF?

[latexmath,file="tex-formula-2.png"]
++++
\begin{align}
\dot{x} & = \sigma(y-x) \\
\dot{y} & = \rho x - y - xz \\
\dot{z} & = -\beta z + xyp
\end{align}
++++

i have same error:
asciidoctor: WARNING: conversion missing in backend pdf for pass


>asciidoctor-pdf -v
Asciidoctor PDF 1.5.0.alpha.13 using Asciidoctor 1.5.5 [http://asciidoctor.org]
Runtime Environment (ruby 2.0.0p648 (2015-12-16) [x64-mingw32]) (lc:IBM866 fs:Windows-1251 in:- ex:IBM866)

You need to the asciidoctor-mathematical extension to handle latexmath blocks. See https://github.com/asciidoctor/asciidoctor-mathematical/.

Thank you. Will it work on windows-7?
I tried to run the gem install asciidoctor-mathematical, began dependent software installation process. On the program mathematical process fails, the need to install Ruby DevKit, then I found out that is not enough cmake, it was not in the description of dependencies gjtorikian/mathematical .
At the moment, I do not install cmake, I am in thought - how much more can all be required?

I do not know the exact requirements. You'll need to ask in that module (or on the Asciidoctor mailinglist).

I plan to publish another module named asciidoctor-mathoid that uses mathoid to generate the math image. That should be more portable as it only depends on Node. However, I haven't gotten it all working yet. See https://github.com/asciidoctor/asciidoctor-extensions-lab/tree/master/lib/mathoid-treeprocessor for a prototype.

Thanks for the answer
One day (maybe a year ago), I was faced with installing Node.js on WindowsXP. I do not remember for what program is needed.
Just remember that I did not achieve the work program.
I am afraid as though Node again did not become a stumbling block.

P.S. Now I use AsciidocFX, very friendly program, but with PDF as long as it is a lot of problems, I will have to deal with editing configuration files.

@mojavelinux what would be recommended way add underlined text that would work with pdf and html?

typically one would use +++<u>text</u>+++ or pass:[] macro.

never mind
looks like [underline]# text # works fine
Thank you

I'm using a passthrough code block to specify some CSS with preprocessor directive:

ifdef::basebackend-html[]
++++
<style>
.arc42help {font-size:small; width: 14px; height: 16px; overflow: hidden; position: absolute; right: 0px; padding: 2px 0px 3px 2px;}
.arc42help::before {content: "?";}
.arc42help:hover {width:auto; height: auto; z-index: 100; padding: 10px;}
.arc42help:hover::before {content: "";}
@media print {
    .arc42help {display:hidden;}
}
</style>
++++
endif::basebackend-html[]

and still getting a warning:

asciidoctor: WARNING: conversion missing in backend pdf for pass

Maven configuration:

<plugin>
  <groupId>org.asciidoctor</groupId>
  <artifactId>asciidoctor-maven-plugin</artifactId>
  <version>1.5.7.1</version>
  <dependencies>
    <dependency>
      <groupId>org.asciidoctor</groupId>
      <artifactId>asciidoctorj-pdf</artifactId>
      <version>1.5.0-alpha.16</version>
    </dependency>
    <dependency>
      <groupId>org.jruby</groupId>
      <artifactId>jruby-complete</artifactId>
      <version>9.1.17.0</version>
    </dependency>
    <dependency>
      <groupId>org.asciidoctor</groupId>
      <artifactId>asciidoctorj</artifactId>
      <version>1.5.8.1</version>
    </dependency>
  </dependencies>
</plugin>

This happens because the basebackend for the PDF converter is html. (The original recommendation was incorrect. I've updated it.)

If you want to filter out content from the PDF, then you need to check ifdef::backend-html5 or ifndef::backend-pdf.

Btw, you should absolutely not be embedding a <style> element directly in your content. This is what docinfo is for. (docinfo can be contributed from a file or an extension).

Was this page helpful?
0 / 5 - 0 ratings

Related issues

royemmerich picture royemmerich  Â·  5Comments

jniggemann picture jniggemann  Â·  4Comments

asilvestre picture asilvestre  Â·  5Comments

aidanhs picture aidanhs  Â·  3Comments

mimiz picture mimiz  Â·  3Comments