Comments (19)
Callouts work with pygments, but not with coderay.
DEFINITELY needs to be in the docs. :-p
from asciidoctor-pdf.
It should because we're taking a different approach. We're using characters in the M+ 1mn font set to draw the callout bullets. If that font isn't loaded properly, then that might be why it's not working. I'll add some callouts to the README so we can verify it works in the getting started section...a baseline.
from asciidoctor-pdf.
You can see here the starting character. It then counts up from there:
https://github.com/asciidoctor/asciidoctor-pdf/blob/master/lib/asciidoctor/pdf_renderer.rb#L701
from asciidoctor-pdf.
Actually, I figured out that the issue is that the callout code inside the listing block is just a quick hack that was only checking for the following permutation:
line of text // <1>
I've updated it to be a bit more flexible by checking for a leading #
or no leading line comment character, but it's still not complete yet.
from asciidoctor-pdf.
Here's the code that needs fixing:
https://github.com/asciidoctor/asciidoctor-pdf/blob/master/lib/asciidoctor/pdf_renderer.rb#L914
It's also reliant on the syntax highlighting being used atm.
from asciidoctor-pdf.
Part of the reason the code is a bit crufty is because I need Asciidoctor to provide an API for processing callouts in listing blocks so that Asciidoctor PDF can tap into it. That code is currently buried in Asciidoctor core.
from asciidoctor-pdf.
I noticed that I wasn't using M+ 1mn by default in Asciidoctor PDF, which is the font that is providing the callout numbers. I've switched to it for now, though I'm also going to make the callout unicode start number configurable in the theme.
from asciidoctor-pdf.
This still does not work in asciidoctor-pdf.
I get the icon after the code block, but there is no substitution inside the code block.
from asciidoctor-pdf.
Callouts are generated fine for HTML, but when I use asciidoctor-pdf, I'm getting "asciidoctor: WARNING: conversion missing in backend pdf for inline_callout" and no callouts are included in the PDF file". Is there a workaround for this problem? I'm using Asciidoctor 1.5.2.
from asciidoctor-pdf.
These are not yet implemented. It's on the roadmap for Asciidoctor PDF 1.5.0. The inline stuff like callouts and icons are one of the first things I'll get working once I pick it back up again...maybe at a hackergarten :)
from asciidoctor-pdf.
Is there a list of what is not implemented in asciidoctor-pdf?
from asciidoctor-pdf.
It's mostly just the inline imagery because it requires special handling to make it work in Prawn. I've filed many of the issues against the 1.5.0 milestone. See https://github.com/asciidoctor/asciidoctor-pdf/milestones/v1.5.0
from asciidoctor-pdf.
I get the icon after the code block, but there is no substitution inside the code block.
Callouts work with pygments, but not with coderay. The code used when the source highlighter is pygments just needs to be ported to the section on coderay.
We can probably do it cleaner too. That was just a quick hack.
from asciidoctor-pdf.
from asciidoctor-pdf.
All cases of using callout numbers should now be covered. Of course, if you find a corner case, please speak up!
from asciidoctor-pdf.
Again me with the non AFM font =) Callouts are not supported and fall back to the "not" glyph in the coderay hightlighted blocks and to the correct number but in the wrong color (white).
The marked character is a "1" as I would assume from the first callout but as you can see it's rendered in white and is thus invisible. The "conum_font_color" is only applied to the callout in the code example itself but not the description text bubble.
EDIT: Forget it, just have to set literal to a supported font manually then it will work.
from asciidoctor-pdf.
EDIT: Forget it, just have to set literal to a supported font manually then it will work.
Yep. For now, I strongly recommend using the provided M+ 1mn font as it has the necessary characters. Once there is a guide available for how to rebuild the monospace font, then it will be worth the time to look for a replacement.
from asciidoctor-pdf.
For me, the callout numbers only work up to and including 20. In HTML there are all there, but in PDF they are not. For instance, in the image below numbers 21-24 are missing:
from asciidoctor-pdf.
You are correct. There are only 20 circled numbers in Unicode, so that's how far we can go. We'd have to stop using special glyphs at that point and switch to regular numbers if we wanted to support it. However, more than 20 numbers in a callout list is really a usability issue.
from asciidoctor-pdf.
Related Issues (20)
- Incorrect warning about missing character in fallback font when using inline image HOT 1
- Surrounding text in content key of running content is dropped if image macro is on its own line
- Embedding of "built-in" fonts HOT 2
- Deactivate header/footer in inserted blank pages in prepress mode HOT 2
- listing block font-size is a fixed value? HOT 1
- Customise a block according to its type HOT 1
- Ordered list starting from 0 HOT 2
- Source location not reported if description in horizontal dlist is truncated
- Upgrade prawn-svg to 0.34.x HOT 1
- Remove link from entry in TOC
- Support prawn-icon 3.1.x in v2.3.x branch HOT 1
- Lock ttfunk to 1.7.x in 2.3.x release line HOT 2
- Producer set to Author instead of producing software in document properties
- Document exceptions to the nobreak role and non-breaking characters HOT 6
- Add support for SVG to image referece in SVG encoded as a data URI (SVG data loader) HOT 1
- Alternative to prawn-gmagick? HOT 3
- asciidoctor: WARNING: unknown unordered list style: something HOT 2
- A custom title page HOT 1
- Add theme support for indent for admonition and sidebar HOT 1
- prose_margin_inner has no effect on prose in table cells HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from asciidoctor-pdf.