Caption an image


pbmac
 

I need to put attributions on all my images/figures in my doc. I attempted to go into HTML and enter the <figure> tag, but that did not work. 

Is there a secret to adding captions to figure/images in LibreText?  It is a requirement for the project I am working on.

Thanks
Pat


Delmar Larsen <dlarsen@...>
 

Definitions:

  • Captions: Texts under an image to be wrapped together within a <figure> block. This is indicated via <figcaption</figcaption> sub-blocks. When you add a Figure template (under elements), the complete block is added.
  • Attributions: We use a "thin attributions" format for images. (License; Author vai Source) after the caption text (same line). Ideally, License, Author and Source are hyperlinks. Our bot can add the hyperlink to the caption if you use standard Creative Commons license forma (e.g., CC BY-SA 4.0 or CC BY-NV-SA 4.0); no need to be too rigid as we will get logical permutations. We will start this bot in a month or so
  • Alt-texts: Description for the visually impaired. This is a 140 character text added to the img code. You can access this by double clicking on the image to get the image properties and pasted in. Alternatively, you can add to the HTML directly.
Ideally, you will want all three of these. Which one are you asking about and I can try to make it easy for you.


Patrick McClanahan
 

Captions....I just need to know the html syntax - I tried and it made a mess...so I have something messed dup in my head about how the syntax works.
Pat

Patrick McClanahan
Professor of Computer Science
Science and Math 252
San Joaquin Delta College
Stockton, CA
(209) 954-5323


From: main@Libretexts-ConstructionForum.groups.io <main@Libretexts-ConstructionForum.groups.io> on behalf of Delmar Larsen via groups.io <dlarsen@...>
Sent: Monday, August 24, 2020 1:26 PM
To: main@Libretexts-ConstructionForum.groups.io <main@Libretexts-ConstructionForum.groups.io>
Subject: Re: [Libretexts-ConstructionForum] Caption an image
 

CAUTION: This email originated from outside of Delta College. Do not click links, open attachments, or reply to emails unless you recognize the sender and know the content is safe.

Definitions:

  • Captions: Texts under an image to be wrapped together within a <figure> block. This is indicated via <figcaption</figcaption> sub-blocks. When you add a Figure template (under elements), the complete block is added.
  • Attributions: We use a "thin attributions" format for images. (License; Author vai Source) after the caption text (same line). Ideally, License, Author and Source are hyperlinks. Our bot can add the hyperlink to the caption if you use standard Creative Commons license forma (e.g., CC BY-SA 4.0 or CC BY-NV-SA 4.0); no need to be too rigid as we will get logical permutations. We will start this bot in a month or so
  • Alt-texts: Description for the visually impaired. This is a 140 character text added to the img code. You can access this by double clicking on the image to get the image properties and pasted in. Alternatively, you can add to the HTML directly.
Ideally, you will want all three of these. Which one are you asking about and I can try to make it easy for you.


Delmar Larsen <dlarsen@...>
 

ok. Go to Elements and templates...


then select the first on the list


and insert template. That will copy the code you want. You can reverse engineer it. If you wan, I can also use the bot to add the sub-block in all your figure block on you book with dummy text and you edit.


Patrick McClanahan
 

Runnin the bot would be AWESOME!!! Save me a boat load of time that way. I can add them from here on, but was not to excited about wading through the first half of the book and manually doing that.
Thanks
Pat

Patrick McClanahan
Professor of Computer Science
Science and Math 252
San Joaquin Delta College
Stockton, CA
(209) 954-5323


From: main@Libretexts-ConstructionForum.groups.io <main@Libretexts-ConstructionForum.groups.io> on behalf of Delmar Larsen via groups.io <dlarsen@...>
Sent: Monday, August 24, 2020 1:33 PM
To: main@Libretexts-ConstructionForum.groups.io <main@Libretexts-ConstructionForum.groups.io>
Subject: Re: [Libretexts-ConstructionForum] Caption an image
 

CAUTION: This email originated from outside of Delta College. Do not click links, open attachments, or reply to emails unless you recognize the sender and know the content is safe.

ok. Go to Elements and templates...


then select the first on the list


and insert template. That will copy the code you want. You can reverse engineer it. If you wan, I can also use the bot to add the sub-block in all your figure block on you book with dummy text and you edit.


Delmar Larsen <dlarsen@...>
 

ok. Quesitons:

Which book?
Which chapters (all is easier)?
Do you want a dynamic Figure number added? (you have to manually number them, but they are synced to the title number so you can rearrange pages without having to deal with Figure numbers (or equations)

I will just add a

<figcaption>text</figcaption>

before all </figure> text in your book/chapters. If you already have a caption in a page, then you have to clean up.


Patrick McClanahan
 

The OERI Linux book

Yes - all chapters...
Pat

Patrick McClanahan
Professor of Computer Science
Science and Math 252
San Joaquin Delta College
Stockton, CA
(209) 954-5323


From: main@Libretexts-ConstructionForum.groups.io <main@Libretexts-ConstructionForum.groups.io> on behalf of Delmar Larsen via groups.io <dlarsen@...>
Sent: Monday, August 24, 2020 1:41 PM
To: main@Libretexts-ConstructionForum.groups.io <main@Libretexts-ConstructionForum.groups.io>
Subject: Re: [Libretexts-ConstructionForum] Caption an image
 

CAUTION: This email originated from outside of Delta College. Do not click links, open attachments, or reply to emails unless you recognize the sender and know the content is safe.

ok. Quesitons:

Which book?
Which chapters (all is easier)?
Do you want a dynamic Figure number added? (you have to manually number them, but they are synced to the title number so you can rearrange pages without having to deal with Figure numbers (or equations)

I will just add a

<figcaption>text</figcaption>

before all </figure> text in your book/chapters. If you already have a caption in a page, then you have to clean up.


Delmar Larsen <dlarsen@...>
 

Let me hold off on this until this evening.

The images I see are not wrapped in a <figure> block and they need to for the caption to be semantically connected to the image. Some are not separated within <p></p>, which may cause some issues.

and

your images are right or left justified, so I need to mock up a new figure class and test it out before I do a massive change on your book (that can go awry if poorly done).


Patrick McClanahan
 

Okay....thanks

Patrick McClanahan
Professor of Computer Science
Science and Math 252
San Joaquin Delta College
Stockton, CA
(209) 954-5323


From: main@Libretexts-ConstructionForum.groups.io <main@Libretexts-ConstructionForum.groups.io> on behalf of Delmar Larsen via groups.io <dlarsen@...>
Sent: Monday, August 24, 2020 1:48 PM
To: main@Libretexts-ConstructionForum.groups.io <main@Libretexts-ConstructionForum.groups.io>
Subject: Re: [Libretexts-ConstructionForum] Caption an image
 

CAUTION: This email originated from outside of Delta College. Do not click links, open attachments, or reply to emails unless you recognize the sender and know the content is safe.

Let me hold off on this until this evening.

The images I see are not wrapped in a <figure> block and they need to for the caption to be semantically connected to the image. Some are not separated within <p></p>, which may cause some issues.

and

your images are right or left justified, so I need to mock up a new figure class and test it out before I do a massive change on your book (that can go awry if poorly done).