![]() |
#1 |
Blue. Not sad...just blue
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 218
Karma: 1267018
Join Date: Oct 2009
Location: Japan
Device: Ridibooks Paper Pro
|
Markdown: Direct image references?
calibre seems to ignore files directly referenced via HTML inside a Markdown file, both during initial import into the .txtz file, and then during conversion (that is, if I manually open the .txtz file, add in the missing files, and re-zip it, calibre still ignores them during conversion).
Is there a setting somewhere that'd allow me to directly reference files like this? The reason that I'm trying to use HTML here is that I want to center and right-justify some images, but images referenced in Markdown style within <div> tags, like this... Code:
<div style="text-align: center"> ![text][myImage] </div> [myImage]: images/file.png So instead I'm trying to reference the image directly with HTML, like this: Code:
<div style="text-align: center"> <img src="images/file.png" alt="text"> </div> Any hints? Thanks! |
![]() |
![]() |
![]() |
#2 |
Guru
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 776
Karma: 2751519
Join Date: Jul 2010
Location: UK
Device: PW2, Nexus7
|
Calibre is correct in doing this since Markdown formatting syntax is not processed within block-level HTML tags, such as DIV. This is part of the Markdown specification. See http://daringfireball.net/projects/markdown/syntax#html
If you are converting to ePub then you could use calibre's Tweak ePub function to explode the ePub and add your required <div> tags. In this case you do not need to specify these <div> tags in the markdown, just use the normal image syntax. I'm note sure why your second syntax doesn't work. Do you have an images folder relative to your markdown text file? An alternative option would be to use Textile instead of Markdown as it has more tag and style capabilities. See http://textile.thresholdstate.com/ Last edited by Agama; 03-01-2012 at 07:45 AM. |
![]() |
![]() |
Advert | |
|
![]() |
#3 |
Blue. Not sad...just blue
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 218
Karma: 1267018
Join Date: Oct 2009
Location: Japan
Device: Ridibooks Paper Pro
|
Yes, the Markdown-syntax images are being cherry-picked from the same "images" folder that contains the <img> tag images. Both my previewer apps can see all the images, so they're all accessible. I just don't know if it's a known thing that calibre isn't designed to do, or if I'm doing something screwy on my end.
Thanks for the heads-up on Textile; I hadn't thought of that. It turns out that my previewer app Marked can use a Textile engine for its display, so that's a minimal disruption of my workflow. Should be very interesting to try. Now I've just got to start from square one again and learn the syntax... ![]() ![]() |
![]() |
![]() |
![]() |
#4 | |
Guru
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 776
Karma: 2751519
Join Date: Jul 2010
Location: UK
Device: PW2, Nexus7
|
Quote:
Code:
   Last edited by Agama; 03-01-2012 at 04:01 PM. |
|
![]() |
![]() |
![]() |
#5 |
Connoisseur
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 58
Karma: 10970
Join Date: Jul 2010
Device: Kindle
|
I'm having the same problem:
 This works in several markdown editors ( http://mouapp.com/ , http://multimarkdown.com/ ) but does not work in Calibre. Did anyone find a solution? |
![]() |
![]() |
Advert | |
|
![]() |
|
![]() |
||||
Thread | Thread Starter | Forum | Replies | Last Post |
markdown-calibre | bobb40 | Conversion | 1 | 07-08-2011 12:02 PM |
->Txt+Markdown | Perkin | Calibre | 2 | 12-11-2010 04:04 AM |
multiple references | troymc | Sigil | 3 | 05-06-2010 03:20 PM |
Unutterably Silly Why all the Lovecraft references? | Mobile Mason | Lounge | 3 | 12-03-2009 12:53 PM |
Markdown editor | user_none | Workshop | 0 | 08-30-2009 09:25 PM |