Equation-Figure in Output
Post here questions and problems related to editing and publishing DITA content.
-
- Posts: 90
- Joined: Tue Mar 31, 2015 10:43 pm
Equation-Figure in Output
We wrap our equations in the <equation-figure> element, and assign it a title. By default, in the responsive webhelp output, <equation-figure> title's appear as Figure 1: equation title. We instead need equation titles to start with Equation 1: equation title.
Also, when cross-referencing an <equation-figure>, we would want the link text to start with "Equation 1: equation title".
How do we make this happen?
Also, when cross-referencing an <equation-figure>, we would want the link text to start with "Equation 1: equation title".
How do we make this happen?
-
- Site Admin
- Posts: 275
- Joined: Thu Dec 24, 2009 11:21 am
Re: Equation-Figure in Output
Hello,
We have reported this issue to the DITA-OT development team. Until a fix is available you can use a custom CSS that hides the "Figure" static text and displays "Equation" instead.
This procedure in our User Manual describes how the WebHelp output can be customized using an additional CSS: https://www.oxygenxml.com/doc/versions/ ... n-css.html
You can use the following CSS fragment as a starting point:
Regards,
Alin
We have reported this issue to the DITA-OT development team. Until a fix is available you can use a custom CSS that hides the "Figure" static text and displays "Equation" instead.
This procedure in our User Manual describes how the WebHelp output can be customized using an additional CSS: https://www.oxygenxml.com/doc/versions/ ... n-css.html
You can use the following CSS fragment as a starting point:
Code: Select all
.equation-figure .figtitleprefix {
display: none;
}
.equation-figure > .figcap:before {
content: "Equation:";
display: inline-block;
padding-right: 5px;
}
Alin
Alin Balasa
Software Developer
<oXygen/> XML Editor
http://www.oxygenxml.com
Software Developer
<oXygen/> XML Editor
http://www.oxygenxml.com
-
- Posts: 90
- Joined: Tue Mar 31, 2015 10:43 pm
Re: Equation-Figure in Output
.equation-figure .figtitleprefix {
display: none;
}
does not remove Figure. I tried:
.equation-figure .fig--title-label {
display: none;
}
but that remove the number, which is pretty important.
display: none;
}
does not remove Figure. I tried:
.equation-figure .fig--title-label {
display: none;
}
but that remove the number, which is pretty important.
-
- Posts: 90
- Joined: Tue Mar 31, 2015 10:43 pm
Re: Equation-Figure in Output
I was able to successfully use JS to make these changes.
To change the figure title prefix from "Figure" to "EQ." I added the following JS:
To change the cross reference prefix from "Figure" to "EQ." I first assigned the <xref> element the outputclass="equ", and then added the following JS:
To change the figure title prefix from "Figure" to "EQ." I added the following JS:
Code: Select all
$(".equation-figure .figcap span").text(function (_, ctx) {
return ctx.replace("Figure", "EQ.");
});
To change the cross reference prefix from "Figure" to "EQ." I first assigned the <xref> element the outputclass="equ", and then added the following JS:
Code: Select all
$("a.equ").text(function (_, ctx) {
return ctx.replace("Figure", "EQ.");
});
Return to “DITA (Editing and Publishing DITA Content)”
Jump to
- Oxygen XML Editor/Author/Developer
- ↳ Feature Request
- ↳ Common Problems
- ↳ DITA (Editing and Publishing DITA Content)
- ↳ Artificial Intelligence (AI Positron Assistant add-on)
- ↳ SDK-API, Frameworks - Document Types
- ↳ DocBook
- ↳ TEI
- ↳ XHTML
- ↳ Other Issues
- Oxygen XML Web Author
- ↳ Feature Request
- ↳ Common Problems
- Oxygen Content Fusion
- ↳ Feature Request
- ↳ Common Problems
- Oxygen JSON Editor
- ↳ Feature Request
- ↳ Common Problems
- Oxygen PDF Chemistry
- ↳ Feature Request
- ↳ Common Problems
- Oxygen Feedback
- ↳ Feature Request
- ↳ Common Problems
- Oxygen XML WebHelp
- ↳ Feature Request
- ↳ Common Problems
- XML
- ↳ General XML Questions
- ↳ XSLT and FOP
- ↳ XML Schemas
- ↳ XQuery
- NVDL
- ↳ General NVDL Issues
- ↳ oNVDL Related Issues
- XML Services Market
- ↳ Offer a Service