# Latex embedded in XML

2 views

### Manuel Souto Pico

Nov 4, 2022, 9:32:38 AM11/4/22
to okapi-users
Dear all,

I have some Latex content embedded in XML.

<m:annotation encoding="latex">\textrm{R (thermal resistance)}=\frac{\textrm{thickness of material}}{\textrm{thermal conductivity of the material}}</m:annotation>

I don't see an Okapi filter for Latex, so I can't use a sub-filter in the okf_xml filter.

Would there be any recommended way to handle this? Thanks.

Cheers, Manuel

### Manuel Souto Pico

Nov 4, 2022, 11:35:13 AM11/4/22
to okapi-users
In fact, I have found it in Okapi, I just only looking at the filter plugin for OmegaT, assuming all filters are there.
I see the okf_tex filter in Okapi but no related documentation in the filters page.

Not sure I can use it as a subfilter in my okf_xml:

<?xml version="1.0" encoding="UTF-8"?>
<its:rules
xmlns:its="http://www.w3.org/2005/11/its"
xmlns:itsx="http://www.w3.org/2008/12/its-extensions"
xmlns:okp="okapi-framework:xmlfilter-options"
xmlns:qti="http://www.imsglobal.org/xsd/imsqti_v2p2"
xmlns:pci="http://www.imsglobal.org/xsd/portableCustomInteraction_v1"
version="1.0"
>

<!-- qti / core 1 -->
<its:translateRule selector="//qti:baseValue|//qti:value" translate="no" />

<!-- inline codes -->
<its:withinTextRule selector="//qti:strong|//qti:em|//qti:span|//qti:textEntryInteraction" withinText="yes" />

<!-- xml options -->
<okp:options escapeQuotes="no" escapeGT="yes" />

<its:translateRule selector="//qti:prompt" translate="yes" itsx:idValue="@pid" />

</its:rules>

If the tex filter actually is included in the filters plugin, would there be a way to include it as a subfilter that applies only to the content of the m:annotation tag?

Probably very specific. I'll try with CodeFinder unless/until someone can show how I can do the above. Thanks in advance.

Cheers, Manuel

### Manuel Souto Pico

Dec 19, 2022, 10:19:57 AM12/19/22
to okapi-users
Dear all,

Does anyone know whether it's possible to use the okf_tex as a subfilter of the okf_xml filter?

I keep getting LaTeX fragments in my XML files and it's not really easy to parse them using the CodeFinder.

Thanks.
Manuel