Topics

Best way to represent images at the book/cover page level #images #bookmap

Stuart Norton
 

We are just getting started with our move to DITA and would appreciate some advice.

 

Some of our books are presented with an image on the title page or early in the book, before the frontmatter. What's the best way to represent something like that in DITA?

 

One suggestion was that we might use a <data> element inside the bookmeta, something like: <data name=”coverimage” value=”foo.jpg”/>.  But we would prefer to use the <image> element, so we can easily get things like preview in the editor. 

 

For example, it seems like it would be nice if we could put an <image> inside the <bookmeta> or directly inside <frontmatter>. But it looks like the only similar place images are allowed is inside booktitlealt, which seems a bit weird… The image definitely isn't part of an alternate title.

 

Any recommendations?

 

Thanks,

Stuart


Juniper Business Use Only

Julio J Vazquez
 

Because the spec currently defines <image> as a child of a topic and not a child of map, you can't have an image in a map. <data> is allowed anywhere that is the best solution, even though it's not semantically as accurate unless you think that everything on a book cover is metadata of the document. 

Julio J. Vazquez

Tom Magliery
 

Some editors can be customized (relatively easily, and by you) to recognize any element as an image to be displayed while editing. XMetaL can do this. I don't know about oXygen.

In XMetaL's case, with DITA maps, this would only apply to the "XML view" of the map (as opposed the usual side-panel "map editor"). Note that the "XML view" is a slight misnomer as this is a WYSIWYG-like view.

mag
-- 
Tom Magliery
I worked at XMetaL for a year or 17

Radu Coravu
 

Hi,

In Oxygen XML Editor if the DITA Map is opened in the main editing area in the Author editing mode you can get the <data> image reference to appear as an image with a small CSS customization:

data[href]{
content: attr(href, url);
}
https://blog.oxygenxml.com/topics/customizeDITACSS.html

Regards,
Radu

Radu Coravu
<oXygen/> XML Editor
http://www.oxygenxml.com

On 2/22/2020 6:41 PM, Tom Magliery wrote:
Some editors can be customized (relatively easily, and by you) to recognize any element as an image to be displayed while editing. XMetaL can do this. I don't know about oXygen.
In XMetaL's case, with DITA maps, this would only apply to the "XML view" of the map (as opposed the usual side-panel "map editor"). Note that the "XML view" is a slight misnomer as this is a WYSIWYG-like view.
mag
--
Tom Magliery
I worked at XMetaL for a year or 17

Stuart Norton
 

Thanks all for your input!

FWIW, we discovered that the image element is actually permitted inside of <data>, as well, so it looks like we will probably go with that:
<data name="cover-image"><image href="cover-image1.png"/></data>

Thanks again,
Stuart


Juniper Business Use Only

-----Original Message-----
From: main@dita-users.groups.io <main@dita-users.groups.io> On Behalf Of Radu Coravu
Sent: Sunday, February 23, 2020 10:35 PM
To: main@dita-users.groups.io
Subject: Re: [dita-users] Best way to represent images at the book/cover page level

Hi,

In Oxygen XML Editor if the DITA Map is opened in the main editing area in the Author editing mode you can get the <data> image reference to appear as an image with a small CSS customization:

data[href]{
content: attr(href, url);
}
https://urldefense.com/v3/__https://blog.oxygenxml.com/topics/customizeDITACSS.html__;!!NEt6yMaO-gk!UXJiiGY6HqOqA1xkbW__B7PMJeXU93Kr1koYCmYQLAgS67SRMvwLfRJqf5cVrMk$

Regards,
Radu

Radu Coravu
<oXygen/> XML Editor
https://urldefense.com/v3/__http://www.oxygenxml.com__;!!NEt6yMaO-gk!UXJiiGY6HqOqA1xkbW__B7PMJeXU93Kr1koYCmYQLAgS67SRMvwLfRJqmzwUgTE$

On 2/22/2020 6:41 PM, Tom Magliery wrote:
Some editors can be customized (relatively easily, and by you) to
recognize any element as an image to be displayed while editing.
XMetaL can do this. I don't know about oXygen.

In XMetaL's case, with DITA maps, this would only apply to the "XML
view" of the map (as opposed the usual side-panel "map editor"). Note
that the "XML view" is a slight misnomer as this is a WYSIWYG-like view.

mag
--
Tom Magliery
I worked at XMetaL for a year or 17