Adding latex element to oxygen with DITA DTD specialization
Post here questions and problems related to editing and publishing DITA content.
-
- Posts: 23
- Joined: Tue Jan 24, 2023 5:40 am
Adding latex element to oxygen with DITA DTD specialization
For our online help, we are using Latex to write our equation. To do that we go on Text editor mode and we use the foreign element :
.
This is not straight forward for our team, since most our team work in author mode.
I'm new with the DITA DTD specialization, and I'd like to know is there a way to create an element Latex in DITA, like Uicontrol, with DITA DTD specialization?
Best regards,
Sitraka
Code: Select all
<p><foreign outputclass="embed-latex">L' = {L}{\sqrt{1-\frac{v^2}{c^2}}}</foreign></p>
This is not straight forward for our team, since most our team work in author mode.
I'm new with the DITA DTD specialization, and I'd like to know is there a way to create an element Latex in DITA, like Uicontrol, with DITA DTD specialization?
Best regards,
Sitraka
-
- Posts: 9439
- Joined: Fri Jul 09, 2004 5:18 pm
Re: Adding latex element to oxygen with DITA DTD specialization
Hi Sitraka,
I am not sure why you are switching to the text editing mode. You can insert a DITA foreign element by pressing ENTER in the Author visual editing mode. You can also use the Attributes side view to set an attribute to the DITA "foreign" element.
It takes time to create a DITA specialization and also all your DITA topic DTDs would need to be changed to refer to the specialized DTDs:
https://www.xiruss.org/tutorials/dita-specialization/
I would suggest to you an alternative:
With a DITA framework customization you can add for example to the content completion window in Oxygen an action named "latex". When the action is invoked it can insert "<foreign outputclass="embed-latex">" in the document.
https://blog.oxygenxml.com/topics/custo ... etion.html
The custom action can also use Oxygen editor variables like ${ask} to show a dialog to the end user asking them to paste the Latex equation in the dialog.
https://www.oxygenxml.com/doc/versions/ ... ables.html
So the custom action could attempt to insert something like:
Or as an alternative you can define a code template in the Oxygen Preferences->"Editor / Content Completion / Code Templates" page. A code template has a name and can insert an XML fragment. All defined code templates appear when pressing ENTER in the Author visual editing page.
https://blog.oxygenxml.com/topics/all_a ... 43_h5d_pkb
Regards,
Radu
I am not sure why you are switching to the text editing mode. You can insert a DITA foreign element by pressing ENTER in the Author visual editing mode. You can also use the Attributes side view to set an attribute to the DITA "foreign" element.
It takes time to create a DITA specialization and also all your DITA topic DTDs would need to be changed to refer to the specialized DTDs:
https://www.xiruss.org/tutorials/dita-specialization/
I would suggest to you an alternative:
With a DITA framework customization you can add for example to the content completion window in Oxygen an action named "latex". When the action is invoked it can insert "<foreign outputclass="embed-latex">" in the document.
https://blog.oxygenxml.com/topics/custo ... etion.html
The custom action can also use Oxygen editor variables like ${ask} to show a dialog to the end user asking them to paste the Latex equation in the dialog.
https://www.oxygenxml.com/doc/versions/ ... ables.html
So the custom action could attempt to insert something like:
Code: Select all
<foreign outputclass="embed-latex">{ask('Please paste Latex equation here', generic, 'default')}</foreign>
https://blog.oxygenxml.com/topics/all_a ... 43_h5d_pkb
Regards,
Radu
Radu Coravu
<oXygen/> XML Editor
http://www.oxygenxml.com
<oXygen/> XML Editor
http://www.oxygenxml.com
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)
- ↳ 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