-
Notifications
You must be signed in to change notification settings - Fork 7
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Trying to convert OLE objects to Latex. #15
Comments
The error is raised due to an import URIs that cannot be resolved because the module
Then edit <?xml version="1.0" encoding="UTF-8"?>
<catalog xmlns="urn:oasis:names:tc:entity:xmlns:xml:catalog">
nextCatalog catalog="../xproc-util/xmlcatalog/catalog.xml"/>
</catalog> When you invoke XML Calabash with Java, don't forget to pass the XML catalog as option with |
Please see also the mml2tex docs here: https://github.com/transpect/mml2tex |
If you download a docx2tex release, you’ll have the correct catalog settings already in place – when using calabash.sh or calabash.bat; otherwise you need to set |
Thank you very much, @mkraetke, for such a timely teaching. Follow your instructions, I succeed. The final command is something like this, if someone needs:
@gimsieke Yes, I had downloaded docx2tex before. All things went right while using Thanks for your great job again. |
I am getting this error by running this command: |
@hardtrivedi See for example transpect/xml2tex#5 (comment) and transpect/xml2tex#3 (comment) |
Hi, @gimsieke I try to run cmd using file URI but I am getting the same error. java "-Dxml.catalog.files=file:///C:/Users/Mr.Trivedi/test/xmlcatalog/catalog.xml;" -cp %MATHTYPE_CP% com.xmlcalabash.drivers.Main -c C://Users//Mr.Trivedi//test//calabash-frontend//extensions//transpect//transpect-config.xml C://Users//Mr.Trivedi//test//calabash-frontend/extensions//transpect//mathtype-extension//xpl//mathtype-example.xpl file=file:///F://oleObject1.bin > oleObject1-mml.xml OUTPUT can you please elaborate cmd? |
Can you paste the content of test/xmlcatalog/catalog.xml? |
Hi @gimsieke Yes the directory test/xproc-util/store-debug is present and it has two folders with this files xmlcatalog-->catalog.xml and xpl-->store-debug.xpl |
Then I’m afraid without a full archive of your test directory we cannot debug this adequately. Have you tried calling calabash-frontend/calabash.bat instead of the explicit Java invocation yet? |
@gimsieke |
@gimsieke Now I am getting this after changing calabash.bat file |
Apparently you are using a Calabash with Saxon 9.9. I recommend that you use the Saxon 9.8 branch. I just had a look at the catalog screenshot that you sent above. Is it true that nextCatalog is just text, without an opening angle bracket? The second screenshot indicates that you didn’t supply a pipeline to invoke (or that something else doesn’t meet the requirements of invoking XML Calabash). |
Hi @gimsieke I am facing same issue while converting oleObject into mathml I followed @mkraetke instruction as well as you mentioned in one of above reply to use docx catalog and use all the nextCatalog entries. I cloned repo of docx2tex and gave path of docx2tex catalog while executing java cmd.
java -cp %MATHTYPE_CP% -Dfile.encoding=UTF8 -Dsun.jnu.encoding=UTF-8 -Dxml.catalog.files=.\docx2tex\xmlcatalog\catalog.xml com.xmlcalabash.drivers.Main -E org.xmlresolver.Resolver -U org.xmlresolver.Resolver -c .\calabash-frontend\extensions\transpect\transpect-config.xml .\calabash-frontend\extensions\transpect\mathtype-extension\xpl\mathtype-example.xpl file=file:///C:\Users\gaura\Desktop\parser\oleObject1.bin This is my catalog.xml
And also, when I tried to set MATHTYPE_CP env variable /path/to/calabash/extensions/transpect/mathtype-extension/ruby/stdlib this folder missing in repo. can you please guide me where I was wrong in process Thanks |
An issue could be that in many places, file URIs instead of directory paths are expected, in particular for the |
Hi @gimsieke I also tried with file uri in xml.catalog.files flag |
Did you leave out |
Yes @gimsieke, I tried by removing -E -U both flags, but nothing happens. I also tried to execute dirrect calabash.bat file I am getting error Error: Could not find or load main class com.xmlcalabash.drivers.Main |
Ah, now I see. The classpath refers to @mkraetke Can you preproduce & fix this? |
This looks good so far. Now try to run a pipeline. |
Please zip the whole |
Hi @gimsieke , I share a link of google drive of test folder. https://drive.google.com/file/d/1L3wIe23Nb3e5SHAQaVJH0Szh9Og7MHMF/view?usp=sharing |
@gimsieke I've changed the classpath of the calabash.bat and updated the v1.4 release zip |
It might take a couple hours until I can further look into this. |
Hi @gimsieke |
It is absolutely unnecessary that you change calabash.bat. Just give the pipeline name and the parameter Then you named the expected file Since @mkraetke said that he fixed https://github.com/transpect/docx2tex/releases/download/v1.4/docx2tex-1.4-release.zip, I recommend that you download the zip again and try the calabash/calabash.bat (it is called calabash instead of calabash-frontend – it’s a bit arbitrary how you name this directory) and xmlcatalog/catalog.xml that shipped with that release. No need for any of your customizations. Note that the docx2tex directory that is in that zip replaces your test directory, it need not be extracted below your test directory. |
@gaurav-bothra I've also just created the 1.5 release of docx2tex which fixed also some other recent issues. |
Hello @mkraetke and @gimsieke , But I am getting error
|
When running higher-level pipelines, such as docx2hub.xpl or docx2tex.xpl, files like Except that unrecognized OLE |
You see that you don’t need to fumble with calabash.bat at all. The invocation is like:
at least on my Cygwin. I also tried it on Windows
|
Sorry @cannshui for all the noise. You probably have already muted this thread. @gaurav-bothra Please open a new issue next time, even if you think that your issue is related to an existing issue (except when the other issue is still open and you notice exactly the same error that was reported in the other issue). |
ok @gimsieke , Thanks for your help 👍 |
Env: CentOS 7.4 with root login, latest calabash-frontend
I'm trying to just convert OLE objects to LaTeX, not the whole word/docx. I think the process can be this: OLE objects -> MathML -> Latex. Seems transpect/mathtype-extension and transpect/mml2tex are necessary.
After cloned calabash-frontend into calabash recursively(
git clone https://github.com/transpect/calabash-frontend.git calabash --recursive
),MATHTYPE_CP
was set.Follow the example in transpect/mathtype-extension, I run the command under calabash directory:
I got ERROR output:
I find a similar problem Catalog related problem, but can't figure it out.
Is even my idea about "convert OLE objects to LaTeX" OK?
Thank you.
The text was updated successfully, but these errors were encountered: