Help forcing images on newline

Having trouble installing <oXygen/>? Got a bug to report? Post it all here.
duongtn34
Posts: 1

Help forcing images on newline

Thu Sep 06, 2018 12:50 pm

My laptop was stolen recently - everything was committed in Git repos so I didn't lose anything, except for my transform. Somehow, all my transformations from before the theft show images as appearing on a new line. But all my transformations after the theft show the images inline! The inline looks terrible for what I'm trying to do. I'm using the standard dita-otk, etc.

I think that I've tracked it down to something within the generation...particularly, one line of HTML.

"Good" versions look like this:

Code: Select all

<li class="li step stepexpand">
     <span class="ph cmd">Remove the components</span>
 <div class="itemgroup stepxmp">
     
       <a class="xref" href="images/Image.jpg">
        <img class="image" id="kyijktr4r__image_ktn_bvsdbm2v_js" src="thumbs/Image.jpg"/>
       </a>
     
     </div>
    </li>


"Bad versions" look like this:

Code: Select all

<li class="li step stepexpand">
     <span class="ph cmd">Remove the components</span>
     
     
       <a class="xref" href="images/Image.jpg">
        <img class="image" id="kyijktr4r__image_ktn_bvsdbm2v_js" src="thumbs/Image"/>
       </a>
    </li>

Notice that the "good" version wraps the a element within this <div class="itemgroup stepxmp">

Can anyone help me figure this out?
Radu
Posts: 5748

Re: Help forcing images on newline

Thu Sep 06, 2018 1:51 pm

Hi,

Sorry for your loss.
Looking at the "good" HTML sample, I will assume it's generated from a DITA task which has a <step> looking like this:

Code: Select all

<step>
                <cmd>Take your time! Work comfortably and do not make shortcuts when cutting stems.
                    Use good quality, sharp tools.</cmd>
                <stepxmp><xref href="http://www.google.com" format="html" scope="external"><image
                            href="../images/Gardeniaflower.jpg" id="image_rw5_wrd_bfb"
                    /></xref></stepxmp>
            </step>


You did not mention what DITA OT version you are using. I tested publishing to HTML5 and XHTML using the latest versions of DITA OT 3.x and 2.x and I got the "good" HTML generated. So I cannot reproduce your problem.

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

Return to “Common Problems”

Who is online

Users browsing this forum: No registered users and 1 guest