Latex embedded in XML

6 ogledov
Preskoči na prvo neprebrano sporočilo

Manuel Souto Pico

neprebran,
4. nov. 2022, 09:32:384. 11. 22
do 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

neprebran,
4. nov. 2022, 11:35:134. 11. 22
do 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:xlink="http://www.w3.org/1999/xlink"
    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

neprebran,
19. dec. 2022, 10:19:5719. 12. 22
do 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
Odgovori vsem
Odgovori avtorju
Posreduj
0 novih sporočil