Loading... |
Reply to author |
Edit post |
Move post |
Delete this post |
Delete this post and replies |
Change post date |
Print post |
Permalink |
Raw mail |
Hello,
While it is very easy to center the image, I couldn't find a way to center the caption text (except by changing the generated css). Am I overlooking something? Thanks. |
Loading... |
Reply to author |
Edit post |
Move post |
Delete this post |
Delete this post and replies |
Change post date |
Print post |
Permalink |
Raw mail |
Administrator
|
@littlepanda, That's a limitation of the default stylesheet (and stylesheet factory) at the moment. Ideally, the caption should either center with the image or left align to the left edge of the centered image. Both would require updates to the stylesheet. Those changes can be made directly to the stylesheet [1] or you can include overrides in a docinfo file [2]. Btw, we are looking for design advice on the stylesheet in general. I'm close to the limit of my ability to make it look professional. Cheers, [1] https://github.com/asciidoctor/asciidoctor-stylesheet-factory/blob/master/sass/components/_asciidoc.scss#L889-L910 [2] http://asciidoctor.org/docs/user-manual/#docinfo-file On Tue, Oct 29, 2013 at 5:19 AM, littlepanda [via Asciidoctor :: Discussion] <[hidden email]> wrote: Hello, -- Dan Allen | http://google.com/profiles/dan.j.allen |
Loading... |
Reply to author |
Edit post |
Move post |
Delete this post |
Delete this post and replies |
Change post date |
Print post |
Permalink |
Raw mail |
@mojavelinux
Thank you for the info. We have to use our own stylesheet anyway, so docinfo file suits my needs. |
Loading... |
Reply to author |
Edit post |
Move post |
Delete this post |
Delete this post and replies |
Change post date |
Print post |
Permalink |
Raw mail |
Does anyone have an example of a docinfo file that will center figure and/or table captions?
Thanks, -Mike |
Loading... |
Reply to author |
Edit post |
Move post |
Delete this post |
Delete this post and replies |
Change post date |
Print post |
Permalink |
Raw mail |
In reply to this post by littlepanda
How can you do that? I didnt understand from the links.
|
Loading... |
Reply to author |
Edit post |
Move post |
Delete this post |
Delete this post and replies |
Change post date |
Print post |
Permalink |
Raw mail |
Administrator
|
Please see https://github.com/asciidoctor/asciidoctor/issues/857 for a longer discussion on this issue. -Dan On Mon, Feb 29, 2016 at 6:45 AM, ayca1903 [via Asciidoctor :: Discussion] <[hidden email]> wrote: How can you do that? I didnt understand from the links. Dan Allen | @mojavelinux | http://google.com/profiles/dan.j.allen |
Loading... |
Reply to author |
Edit post |
Move post |
Delete this post |
Delete this post and replies |
Change post date |
Print post |
Permalink |
Raw mail |
you have said, It would be necessary to add the following declaration in the stylesheet (shown here in scss syntax)....
I dont know about the stylesheet, where is it, or how can I add the declaration to it? I wrote like this, [.text-center] .Image Title image::tiger.png[] or [.center.text-center] .Diagram Example image::diagram.png[] or .Diagram Example image::diagram.png[align=center, title-align=center] like this. I couldnt align the title. |
Loading... |
Reply to author |
Edit post |
Move post |
Delete this post |
Delete this post and replies |
Change post date |
Print post |
Permalink |
Raw mail |
Start with your nameofdoc.adoc file in a directory with the images and add a docinfo.html file like this: nameofdoc.adoc docinfo.html tiger.png diagram.png Add :docinfo1: to nameofdoc.adoc like this = Centering :docinfo1: == Test Centering Below [.text-center] .Image Title image::tiger.png[] or [.center.text-center] .Diagram Example image::diagram.png[] or .Diagram Example image::diagram.png[align=center, title-align=center] Finally in the docinfo.html file place this code <style type="text/css"> .imageblock > .title { text-align: center; } </style> Then render it with Asciidoctor > asciidoctor nameofdoc.adoc View nameofdoc.html for results.
- Ted
@TedAtCIS
|
Loading... |
Reply to author |
Edit post |
Move post |
Delete this post |
Delete this post and replies |
Change post date |
Print post |
Permalink |
Raw mail |
I tried these solutions, none rendered properly on Atom live preview.
|
Loading... |
Reply to author |
Edit post |
Move post |
Delete this post |
Delete this post and replies |
Change post date |
Print post |
Permalink |
Raw mail |
I haven't used the Atom editor in a while, but I'd bet there is not anyway to have it process the docinfo.html file and render that with the AsciiDoc file. Which is why you will not see the results in the Atom live previewer. Use Asciidoctor to render the two files together to see the results.
- Ted
@TedAtCIS
|
Free forum by Nabble | Edit this page |