Inserting an image with label from beginning

This forum is for all Flare issues not related to any of the other categories.
Post Reply
db5ced
Propeller Head
Posts: 28
Joined: Wed Mar 08, 2017 6:36 am

Inserting an image with label from beginning

Post by db5ced »

Hello people,

I apologise in advance as this is probably a really simple question but I am new to Madcap and am really struggling. I have searched the forums and the answer may already be out there but I have found nothing that I understand. First of all, let me point out, I do not know CSS so when people are talking about divs, it goes over my head. I am a tech author who has recently been asked to start using Madcap Flare. All I am trying to do is insert an image (done) and then like I have always done in Word, insert a caption, as a figure with a description or title of the image. I have found instructions on how to then put the figures into a table so I am hoping I will be able to do that. However I am struggling with the part that I thought would be very easy and straight forward. I have inserted my image and, using the stylesheet, for the p.caption part put in the following code into mc-auto-number-format "GH:Figure {n+}: ". This shows "Figure 1: " under my image. So far so good. However, unlike in Word I am unable to then type my description or title. Madcap does not allow me to click anywhere on the 'Figure 1: " text. So what I need to know is, am I going about this in the right way so that I can then show my table of figures in my document and how can I type my title or description after the "Figure 1: "? If people could answer me as though I was a 3 year old child to help my understanding it would be greatly appreciated.

Thanks
db5ced
Propeller Head
Posts: 28
Joined: Wed Mar 08, 2017 6:36 am

Re: Inserting an image with label from beginning

Post by db5ced »

Clearly what I am asking for is either too time consuming, people don't understand what I am asking or perhaps the answer to my question is already out there in an easy to understand format. If someone could help me out here it would be much appreciated.
qtxasjo
Propeller Head
Posts: 37
Joined: Tue Oct 16, 2007 5:06 am
Location: Europe

Re: Inserting an image with label from beginning

Post by qtxasjo »

I can't be of much help, other than that I tried your scenario and it worked for me. I added a p.caption to my stylesheet with your auto number format. I then added an image, and on the following line, I changed the p tag to p.caption. My cursor was placed immediately after the 'Figure 1:' and I was allowed to type in text.
db5ced
Propeller Head
Posts: 28
Joined: Wed Mar 08, 2017 6:36 am

Re: Inserting an image with label from beginning

Post by db5ced »

Well that is frustrating. It is pleasing to know that what I have done is the correct way and should work but leaves me at a loss to work out why it isn't. I can click before the 'Figure 1:' and type and I can type on the next line down but it won't allow me to type after it. Does anyone else have any ideas? Could I have locked something to be unable to type or what?
ajturnersurrey
Sr. Propeller Head
Posts: 346
Joined: Fri Nov 05, 2010 3:30 am

Re: Inserting an image with label from beginning

Post by ajturnersurrey »

I am sure you must just not be managing to put your cursor in quite the right place to start typing.

If you are feeling brave enough I suggest you toggle from XML editor to source view.

Here is an example of what an image and caption look like in one of my documents:

Code: Select all

<p class="keepwithnext">
            <img src="../Resources/Images/VocalityScreenshots/alarm_mgmt_alarm_log.png" alt="Vocality unit screenshot - Diagnostics > Slot n > Logs > Alarm Log example" class="screenshot" />
        </p>
        <p class="figurecaption" MadCap:autonum=" Figure 1-1 ">Alarm Management > Alarm Log</p>
I expect you must currently be correctly inserting something that looks like

Code: Select all

<p class="figurecaption" MadCap:autonum=" Figure 1-1 "></p>
without getting the text inbetween.

So I suggest you insert your text then toggle back to XML Editor to see if it has worked...
db5ced
Propeller Head
Posts: 28
Joined: Wed Mar 08, 2017 6:36 am

Re: Inserting an image with label from beginning

Post by db5ced »

Well this is getting very confusing.

I changed the code so that it looks like this:

<p>
<img src="../../Resources/Images/Figure 1 - Logging into the Application Server.png" />
</p>
<p class="caption" MadCap:autonum="Figure 1: ">Logging into the Application Server </p>

I typed in the "Logging into the Application Server" part myself. Back in the editor it actually puts the title in before "Figure 1: "

So it ends up with "Logging into the Application ServerFigure 1:"

It really doesn't want anything typed afterwards.

I have noticed that you have a class "keepwithnext" and I don't. I don't think my images and figures are connected in any way. I just click to make the 'p' a 'p.caption' and the next "Figure" comes up. Could this be an issue?
ajturnersurrey
Sr. Propeller Head
Posts: 346
Joined: Fri Nov 05, 2010 3:30 am

Re: Inserting an image with label from beginning

Post by ajturnersurrey »

I would strongly recommend a .keepwithnext class for figures to keep figures and captions together, particularly if you produce any print outputs such as pdf. Your .caption style does not have any reason to glue itself to a picture.

As for the caption text appearing before your label, if you post the definition of your p and your p.caption style from the .css file we might be able to see where it is going wrong.

My own .figurecaption looks like this:

Code: Select all

p.figurecaption
{
	font-weight: bold;
	font-style: normal;
	text-align: right;
	page-break-before: avoid;
	column-break-before: avoid;
	page-break-inside: avoid;
	column-break-inside: avoid;
	margin-bottom: 0.5em;
	margin-top: 1em;
	mc-auto-number-format: 'CF: Figure {chapnum}-{n+} ';
}
db5ced
Propeller Head
Posts: 28
Joined: Wed Mar 08, 2017 6:36 am

Re: Inserting an image with label from beginning

Post by db5ced »

Okay

p
{
margin-bottom: 6pt;
color: #292929;
margin-top: 0pt;
font-size: 10pt;
font-family: 'Bliss Pro';
line-height: 15pt;
}

p.caption
{
margin-top: 10pt;
margin-bottom: 12pt;
font-style: italic;
color: #525252;
font-size: 9pt;
text-align: center;
font-family: 'Bliss Pro';
font-weight: normal;
vertical-align: baseline;
mc-auto-number-position: inside-tail;
mc-auto-number-format: 'GH:Figure {n+}: ';
ajturnersurrey
Sr. Propeller Head
Posts: 346
Joined: Fri Nov 05, 2010 3:30 am

Re: Inserting an image with label from beginning

Post by ajturnersurrey »

And there we have it!

Your caption style chooses mc-auto-number-postion "inside tail" which means put my text first then the auto number content .

Take a look at the Flare help for the array of options open to you - inside tail is defintely not the one you want.

http://webhelp.madcapsoftware.com/flare ... r-position
db5ced
Propeller Head
Posts: 28
Joined: Wed Mar 08, 2017 6:36 am

Re: Inserting an image with label from beginning

Post by db5ced »

I have changed it and it works. ajturnersurrey you are a legend. Thanks for the help and perseverance at my ineptitude.
Post Reply