MakerPress / atlas-public-feedback

Public feedback and issue tracking for Atlas
22 stars 0 forks source link

Online GUI inserts the wrong code for displaying images #370

Closed MarkAYoder closed 10 years ago

MarkAYoder commented 10 years ago

When using the Atlas GUI I click on the Media menu and then click Image and then select an image to insert. It inserts the code:

image::images/template_bb.png[]

when this is really what should be insterted:

image:images/template_bb.png[]

Note the extra ":". The tools then look in :images, not images

sandersk commented 10 years ago

Hi @MarkAYoder,

The double-colon syntax is actually the correct syntax for adding standard figure images in AsciiDoc. So in the following markup:

image::images/template_bb.png[]

The file being referenced is indeed "images/template_bb.png". The single-colon image syntax (image:images/template_bb.png[]) is used for inline images only (for example, images that are within the body text flow in a paragraph).

For more information on adding image markup to Atlas, you may want to take a look at this section of our Getting Started with Atlas guide:

http://chimera.labs.oreilly.com/books/1230000000065/ch04.html#figures_and_other_images

And if you're running into any trouble with image referencing, let us know and point us to the book project's URL, and we'd be happy to assist further.

Best, Sanders

MarkAYoder commented 10 years ago

Sanders: I'm working on http://ano-atlas2.herokuapp.com/books/1234000001747. Look at the end of basics.asciidoc, you'll see a reference to an image. The single ";" notation works, but the "::" notation doesn't when I Build Book either pdf for html. The html code references files in :images rather than images.

See the pdf and html for the most recent build for examples that work with : and don't work with :: .

--Mark

sarahs commented 10 years ago

Hi Mark,

Jumping in here - I took a quick look at basics.asciidoc, and it looks like you just need a newline before the image:: markup. Try this:

_fritzin_ is a nice an open-source program for creating hardware.
You can create breadboard diagrams, schematic diagrams and
printed circuits boards (PCBs) with it. Here is the basic setup:

image::images/template_bb.png["Basic Setup"]

I use a half sized breadboard since it's about the same size as the bone.

AsciiDoc is sensitive to whitespace, so just make sure you have at least one line of space before and after block elements. This does not apply to inline images (:), which, as Sanders explained, fall within the text in a paragraph.

Hope this helps, Sarah

MarkAYoder commented 10 years ago

The extra blank line fixed it. Thanks!

Wow, asciidoc is a bit picky.