Comments (17)
Thank you for the report. I've changed the entry for the reference to the resolver in the calabash.bat
. Should work now.
from docx2tex.
Can you give your whole invocation line and also the full path of the directory from which you invoke it? In addition, the output of java -version
, please.
You can try to invoke it from a directory that has no space or special characters, and also avoid these characters in the file name.
from docx2tex.
The docx2tex directory is located in C:/ and the file that I want to convert is in C:/docx2tex.
I tried:
C:\docx2tex>d2t.bat "01 Technik.docx"
After that, the terminal showed the following messages:
starting docx2tex
[info] Unzipping: C:/docx2tex/01 Technik.docx ==> C:/docx2tex/01 Technik.docx.tmp
[info] Unzipped 40 files
[info] Unzip finished successfully.
Errors encountered while running docx2tex. Please see C:/docx2tex/01 Technik.log for details.
The log says:
[main] INFO com.xmlcalabash.runtime.XAtomicStep - xml2tex/xpl/load-config.xpl:60:15:params: coll-xsl yes || elt-name: xsl:param || att-name: name
[main] INFO com.xmlcalabash.runtime.XAtomicStep - xml2tex/xpl/load-config.xpl:60:15:params: coll-xsl yes || elt-name: xsl:key || att-name: name
[main] INFO com.xmlcalabash.runtime.XAtomicStep - xml2tex/xpl/load-config.xpl:60:15:params: coll-xsl yes || elt-name: xsl:variable || att-name: name
[main] INFO com.xmlcalabash.runtime.XAtomicStep - xml2tex/xpl/load-config.xpl:60:15:params: coll-xsl yes || elt-name: xsl:template || att-name: name
[main] INFO com.xmlcalabash.runtime.XAtomicStep - xml2tex/xpl/load-config.xpl:60:15:params: coll-xsl yes || elt-name: xsl:template || att-name: match
[main] INFO com.xmlcalabash.runtime.XAtomicStep - xml2tex/xpl/load-config.xpl:60:15:params: coll-xsl yes || elt-name: xsl:function || att-name: name
Message: Mode: insert-xpath debugs into file:///C:/docx2tex//01.debug/docx2hub/01/01.insert-xpath.xml
Warning at xsl:function on line 157 column 92 of numbering.xsl:
The option xsl:function/@saxon:memo-function is ignored because it requires a Saxon-PE license
Warning at xsl:output on line 88 column 7 of main.xsl:
XTSE0090 Unrecognized attribute in Saxon namespace: saxon:suppress-indentation
Message: Mode: insert-doc-defaults debugs into file:///C:/docx2tex//01.debug/docx2hub/01/01a.insert-doc-defaults.xml
Message: Mode: docx2hub:resolve-tblBorders debugs into file:///C:/docx2tex//01.debug/docx2hub/01/03b.docx2hub_resolve-tblBorders.xml
Message: Mode: docx2hub:add-props debugs into file:///C:/docx2tex//01.debug/docx2hub/01/04.docx2hub_add-props.xml
Message: Mode: docx2hub:props2atts debugs into file:///C:/docx2tex//01.debug/docx2hub/01/05.docx2hub_props2atts.xml
Message: Mode: docx2hub:remove-redundant-run-atts debugs into file:///C:/docx2tex//01.debug/docx2hub/01/07.docx2hub_remove-redundant-run-atts.xml
Message: Mode: docx2hub:join-instrText-runs debugs into file:///C:/docx2tex//01.debug/docx2hub/01/08.docx2hub_join-instrText-runs.xml
Message: Mode: docx2hub:field-functions debugs into file:///C:/docx2tex//01.debug/docx2hub/01/14.docx2hub_field-functions.xml
[main] INFO com.xmlcalabash.runtime.XAtomicStep - xproc-util/xslt-mode/xpl/xslt-mode.xpl:116:27:Number of lookaround paragraphs for inline field functions: 0
Message: Mode: wml-to-dbk debugs into file:///C:/docx2tex//01.debug/docx2hub/01/20.wml-to-dbk.xml
java.lang.NullPointerException: Cannot invoke "java.io.Reader.read(char[], int, int)" because "reader" is null
at net.sf.saxon.functions.UnparsedTextFunction.readFile(UnparsedTextFunction.java:182)
at net.sf.saxon.functions.UnparsedTextFunction.readFile(UnparsedTextFunction.java:76)
at net.sf.saxon.functions.UnparsedText.evalUnparsedText(UnparsedText.java:142)
at net.sf.saxon.functions.UnparsedText.call(UnparsedText.java:49)
at net.sf.saxon.functions.UnparsedText.call(UnparsedText.java:33)
at net.sf.saxon.expr.FunctionCall.iterate(FunctionCall.java:548)
at net.sf.saxon.expr.Expression.evaluateItem(Expression.java:852)
at net.sf.saxon.expr.parser.Evaluator$6.evaluate(Evaluator.java:173)
at net.sf.saxon.expr.SystemFunctionCall.evaluateArguments(SystemFunctionCall.java:454)
at net.sf.saxon.expr.FunctionCall.iterate(FunctionCall.java:546)
at net.sf.saxon.expr.parser.Evaluator$11.evaluate(Evaluator.java:290)
at net.sf.saxon.expr.parser.ExpressionTool.eagerEvaluate(ExpressionTool.java:317)
at net.sf.saxon.expr.TryCatch.iterate(TryCatch.java:279)
at net.sf.saxon.expr.instruct.ForEach.map(ForEach.java:584)
at net.sf.saxon.expr.ContextMappingIterator.next(ContextMappingIterator.java:61)
at net.sf.saxon.om.MemoSequence$ProgressiveIterator.next(MemoSequence.java:228)
at net.sf.saxon.functions.Exists$1.effectiveBooleanValue(Exists.java:69)
at net.sf.saxon.expr.instruct.Choose.choose(Choose.java:966)
at net.sf.saxon.expr.instruct.Choose.processLeavingTail(Choose.java:940)
at net.sf.saxon.expr.LetExpression.processLeavingTail(LetExpression.java:746)
at net.sf.saxon.expr.instruct.NamedTemplate.expand(NamedTemplate.java:264)
at net.sf.saxon.expr.instruct.CallTemplate.process(CallTemplate.java:372)
at net.sf.saxon.expr.parser.ExpressionTool.getIteratorFromProcessMethod(ExpressionTool.java:643)
at net.sf.saxon.expr.instruct.Instruction.iterate(Instruction.java:374)
at net.sf.saxon.expr.CardinalityChecker.evaluateItem(CardinalityChecker.java:283)
at net.sf.saxon.expr.ItemChecker.evaluateItem(ItemChecker.java:255)
at net.sf.saxon.expr.parser.Evaluator$6.evaluate(Evaluator.java:173)
at net.sf.saxon.expr.LetExpression.eval(LetExpression.java:545)
at net.sf.saxon.expr.LetExpression.processLeavingTail(LetExpression.java:737)
at net.sf.saxon.expr.instruct.TemplateRule.applyLeavingTail(TemplateRule.java:384)
at net.sf.saxon.trans.Mode.applyTemplates(Mode.java:568)
at net.sf.saxon.trans.rules.TextOnlyCopyRuleSet.process(TextOnlyCopyRuleSet.java:72)
at net.sf.saxon.trans.Mode.applyTemplates(Mode.java:530)
at net.sf.saxon.trans.XsltController.applyTemplates(XsltController.java:661)
at net.sf.saxon.s9api.AbstractXsltTransformer.applyTemplatesToSource(AbstractXsltTransformer.java:360)
at net.sf.saxon.s9api.XsltTransformer.transform(XsltTransformer.java:349)
at com.xmlcalabash.library.XSLT.run(XSLT.java:230)
at com.xmlcalabash.runtime.XAtomicStep.run(XAtomicStep.java:388)
at com.xmlcalabash.runtime.XCompoundStep.run(XCompoundStep.java:267)
at com.xmlcalabash.runtime.XTry.run(XTry.java:104)
at com.xmlcalabash.runtime.XPipeline.doRun(XPipeline.java:232)
at com.xmlcalabash.runtime.XPipeline.run(XPipeline.java:142)
at com.xmlcalabash.runtime.XPipelineCall.run(XPipelineCall.java:94)
at com.xmlcalabash.runtime.XPipeline.doRun(XPipeline.java:232)
at com.xmlcalabash.runtime.XPipeline.run(XPipeline.java:142)
at com.xmlcalabash.runtime.XPipelineCall.run(XPipelineCall.java:94)
at com.xmlcalabash.runtime.XPipeline.doRun(XPipeline.java:232)
at com.xmlcalabash.runtime.XPipeline.run(XPipeline.java:142)
at com.xmlcalabash.drivers.Main.run(Main.java:369)
at com.xmlcalabash.drivers.Main.run(Main.java:112)
at com.xmlcalabash.drivers.Main.main(Main.java:83)
Message: Internal error evaluating template rule at line 627 in module file:/C:/docx2tex/docx2hub/xsl/wml2dbk.xsl
Message: DEBUG: RUNNING XSLT FOR docx2hub/01/20.wml-to-dbk
java.lang.NullPointerException: Cannot invoke "java.io.Reader.read(char[], int, int)" because "reader" is null
at net.sf.saxon.functions.UnparsedTextFunction.readFile(UnparsedTextFunction.java:182)
at net.sf.saxon.functions.UnparsedTextFunction.readFile(UnparsedTextFunction.java:76)
at net.sf.saxon.functions.UnparsedText.evalUnparsedText(UnparsedText.java:142)
at net.sf.saxon.functions.UnparsedText.call(UnparsedText.java:49)
at net.sf.saxon.functions.UnparsedText.call(UnparsedText.java:33)
at net.sf.saxon.expr.FunctionCall.iterate(FunctionCall.java:548)
at net.sf.saxon.expr.Expression.evaluateItem(Expression.java:852)
at net.sf.saxon.expr.parser.Evaluator$6.evaluate(Evaluator.java:173)
at net.sf.saxon.expr.SystemFunctionCall.evaluateArguments(SystemFunctionCall.java:454)
at net.sf.saxon.expr.FunctionCall.iterate(FunctionCall.java:546)
at net.sf.saxon.expr.parser.Evaluator$11.evaluate(Evaluator.java:290)
at net.sf.saxon.expr.parser.ExpressionTool.eagerEvaluate(ExpressionTool.java:317)
at net.sf.saxon.expr.TryCatch.iterate(TryCatch.java:279)
at net.sf.saxon.expr.instruct.ForEach.map(ForEach.java:584)
at net.sf.saxon.expr.ContextMappingIterator.next(ContextMappingIterator.java:61)
at net.sf.saxon.om.MemoSequence$ProgressiveIterator.next(MemoSequence.java:228)
at net.sf.saxon.functions.Exists$1.effectiveBooleanValue(Exists.java:69)
at net.sf.saxon.expr.instruct.Choose.choose(Choose.java:966)
at net.sf.saxon.expr.instruct.Choose.processLeavingTail(Choose.java:940)
at net.sf.saxon.expr.LetExpression.processLeavingTail(LetExpression.java:746)
at net.sf.saxon.expr.instruct.NamedTemplate.expand(NamedTemplate.java:264)
at net.sf.saxon.expr.instruct.CallTemplate.process(CallTemplate.java:372)
at net.sf.saxon.expr.parser.ExpressionTool.getIteratorFromProcessMethod(ExpressionTool.java:643)
at net.sf.saxon.expr.instruct.Instruction.iterate(Instruction.java:374)
at net.sf.saxon.expr.CardinalityChecker.evaluateItem(CardinalityChecker.java:283)
at net.sf.saxon.expr.ItemChecker.evaluateItem(ItemChecker.java:255)
at net.sf.saxon.expr.parser.Evaluator$6.evaluate(Evaluator.java:173)
at net.sf.saxon.expr.LetExpression.eval(LetExpression.java:545)
at net.sf.saxon.expr.LetExpression.processLeavingTail(LetExpression.java:737)
at net.sf.saxon.expr.instruct.TemplateRule.applyLeavingTail(TemplateRule.java:384)
at net.sf.saxon.trans.Mode.applyTemplates(Mode.java:568)
at net.sf.saxon.trans.rules.TextOnlyCopyRuleSet.process(TextOnlyCopyRuleSet.java:72)
at net.sf.saxon.trans.Mode.applyTemplates(Mode.java:530)
at net.sf.saxon.trans.XsltController.applyTemplates(XsltController.java:661)
at net.sf.saxon.s9api.AbstractXsltTransformer.applyTemplatesToSource(AbstractXsltTransformer.java:360)
at net.sf.saxon.s9api.XsltTransformer.transform(XsltTransformer.java:349)
at com.xmlcalabash.library.XSLT.run(XSLT.java:230)
at com.xmlcalabash.runtime.XAtomicStep.run(XAtomicStep.java:388)
at com.xmlcalabash.runtime.XCompoundStep.run(XCompoundStep.java:267)
at com.xmlcalabash.runtime.XChoose.run(XChoose.java:135)
at com.xmlcalabash.runtime.XCompoundStep.run(XCompoundStep.java:267)
at com.xmlcalabash.runtime.XTry.run(XTry.java:199)
at com.xmlcalabash.runtime.XPipeline.doRun(XPipeline.java:232)
at com.xmlcalabash.runtime.XPipeline.run(XPipeline.java:142)
at com.xmlcalabash.runtime.XPipelineCall.run(XPipelineCall.java:94)
at com.xmlcalabash.runtime.XPipeline.doRun(XPipeline.java:232)
at com.xmlcalabash.runtime.XPipeline.run(XPipeline.java:142)
at com.xmlcalabash.runtime.XPipelineCall.run(XPipelineCall.java:94)
at com.xmlcalabash.runtime.XPipeline.doRun(XPipeline.java:232)
at com.xmlcalabash.runtime.XPipeline.run(XPipeline.java:142)
at com.xmlcalabash.drivers.Main.run(Main.java:369)
at com.xmlcalabash.drivers.Main.run(Main.java:112)
at com.xmlcalabash.drivers.Main.main(Main.java:83)
[main] ERROR com.xmlcalabash.drivers.Main - Pipeline failed: Internal error evaluating template rule at line 627 in module file:/C:/docx2tex/docx2hub/xsl/wml2dbk.xsl
[main] ERROR com.xmlcalabash.drivers.Main - Underlying exception: Cannot invoke "java.io.Reader.read(char[], int, int)" because "reader" is null
C:\docx2tex>java -version outputs:
java version "21.0.2" 2024-01-16 LTS
Java(TM) SE Runtime Environment (build 21.0.2+13-LTS-58)
Java HotSpot(TM) 64-Bit Server VM (build 21.0.2+13-LTS-58, mixed mode, sharing)
from docx2tex.
Did you tried to replace the whitespace with an underscore in the filename? Does this work?
from docx2tex.
Did you tried to replace the whitespace with an underscore in the filename? Does this work?
Yes, I tried again with the file named "01.docx". However, the errors still occur.
from docx2tex.
Can you send us the Word file? You can email it to [email protected]
from docx2tex.
This is an error that is caused by Calabash 1.5.7. I addressed this error only in our mirror of the Calabash/Saxon10 repo, https://subversion.le-tex.de/common/github-mirror/calabash_saxon_10/, by reverting to Calabash 1.4.1.
I fixed another bug only in the mirror: Saxon 10.8 that was bundled had another issue, therefore I reverted to Saxon 10.7 (disguised as Saxon-HE-10.8.jar because the Calabash distro apparently has the jar name baked into it).
The relevant commits are r11405 for the Saxon jar and r10707 for the Calabash downgrade (plus today’s r11791 for calabash.bat because I forgot to refer to Calabash 1.4.1 instead of 1.5.7 in calabash.bat – we usually pay more attention to calabash.sh; calabash.bat often comes second wrt testing or bug fixing):
gerrit@Ada:~/w/Dev/tmp/docx2tex$ svn log -l9 https://subversion.le-tex.de/common/github-mirror/calabash_saxon_10/
------------------------------------------------------------------------
r11791 | gimsieke | 2024-02-17 10:12:14 +0100 (Sat, 17 Feb 2024) | 1 line
reflect downgrade to Calabash 1.4.1 due to 'java.io.Reader.read' error as reported in https://github.com/transpect/docx2tex/issues/105
------------------------------------------------------------------------
r11734 | gimsieke | 2024-02-13 15:17:33 +0100 (Tue, 13 Feb 2024) | 1 line
sync a bit with https://www.w3.org/TR/xproc/schemas/xproc.rng and https://www.w3.org/TR/xproc/schemas/steps.rng (wrapper-prefix etc.)
------------------------------------------------------------------------
r11632 | gimsieke | 2024-01-31 15:57:21 +0100 (Wed, 31 Jan 2024) | 1 line
commons-imaging-1.0-alpha3 in the classpath for image-props-extension
------------------------------------------------------------------------
r11405 | gimsieke | 2024-01-09 17:40:37 +0100 (Tue, 09 Jan 2024) | 1 line
Saxon HE 10.7 disguised as 10.8 because a 'Cannot copy a variable reference whose binding is unknown' (https://saxonica.plan.io/issues/4886) seems to reappear in 10.8
------------------------------------------------------------------------
r11404 | mkraetke | 2024-01-09 17:01:17 +0100 (Tue, 09 Jan 2024) | 1 line
catch exception because of buggy eps files
------------------------------------------------------------------------
r11402 | mkraetke | 2024-01-09 13:41:58 +0100 (Tue, 09 Jan 2024) | 1 line
revert to commons-imaging-1.0-alpha2 because of issues with eps files
------------------------------------------------------------------------
r11393 | ciuser | 2024-01-08 16:51:08 +0100 (Mon, 08 Jan 2024) | 1 line
fix classpath of image transform extension
------------------------------------------------------------------------
r10814 | fr4nze | 2023-11-07 16:21:22 +0100 (Tue, 07 Nov 2023) | 1 line
added row- and columnspacing for mtables
------------------------------------------------------------------------
r10707 | gimsieke | 2023-10-09 12:07:59 +0200 (Mon, 09 Oct 2023) | 1 line
revert to 1.4.1 and related http libs because there was 'java.lang.NullPointerException: Cannot invoke java.io.Reader.read(char[], int, int) because reader is null' when using unparsed-text()
------------------------------------------------------------------------
@mkraetke, you can either use the mirror or we can downgrade our calabash repos on Github to reflect the downgrades to Calabash and Saxon that I did in the mirror.
Calabash 1.5.7 is the most recent version on https://github.com/ndw/xmlcalabash1/releases
@XtrumE, may we forward the docx that you sent us to Norman Walsh so that he may look into the issue? I’d file a Calabash issue then. But a fix might take a long time.
For the time being, I don’t see an alternative to the downgrades that I did in the mirror repo, either by using the mirror repo itself or by applying them to the Github repo, too.
@XtrumE, if you need a quick fix and if you have an svn client, you can delete the calabash directory in docx2tex and instead
svn co https://subversion.le-tex.de/common/github-mirror/calabash_saxon_10/ calabash
from docx2tex.
Hi @XtrumE,
I've downgraded Calabash from 1.5.7 to 1.4.1. Please update to the latest version and confirm whether this resolves the issue.
Best, Martin
from docx2tex.
Thanks for your efforts. @gimsieke, please feel free to forward the file. I'd appreciate a solution in Calabash.
I have now updated to the latest version with the downgraded Calabash using git (I don't use svn at the moment). The error now does not occur anymore. But, I am afraid that another Calabash error arose. The log says:
'1.5.@SETLOCAL' is not recognized as an internal or external command,
operable program or batch file.
[main] ERROR com.xmlcalabash.drivers.Main - java.lang.ClassNotFoundException: org.xmlresolver.Resolver
[main] ERROR com.xmlcalabash.drivers.Main - Underlying exception: org.xmlresolver.Resolver
So, I need your help once more.
Best wishes!
from docx2tex.
... one additional remark: I have now tried it using an Ubuntu VM where it worked perfectly!
from docx2tex.
Martin prepended the '1.5.' to the line by accident I guess. I removed it in the master branch.
from docx2tex.
The line was reintroduced because of the downgrade mentioned above. Perhaps these mirrors should be also synced with our GitHub mirror to avoid these issues.
from docx2tex.
Facing the same issues unfortunately, but then the other way around ;-). Cloned the full repo today, so everything should be up-to-date.
OS: Windows 10
First issue:
'1.5.@SETLOCAL' is not recognized as an internal or external command, operable program or batch file.
Resolved this by installing Java 17:
java version "17.0.10" 2024-01-16 LTS
Java(TM) SE Runtime Environment (build 17.0.10+11-LTS-240)
Java HotSpot(TM) 64-Bit Server VM (build 17.0.10+11-LTS-240, mixed mode, sharing)
Now I'm faced with:
PS C:\phd\Practical\docx2tex> .\d2t.bat .\Test_file.docx
starting docx2tex
Errors encountered while running docx2tex. Please see C:/phd/Practical/docx2tex/Test_file.log for details.
Log file:
[main] ERROR com.xmlcalabash.drivers.Main - java.lang.ClassNotFoundException: org.xmlresolver.Resolver
[main] ERROR com.xmlcalabash.drivers.Main - Underlying exception: org.xmlresolver.Resolver
When checking Calabash the version file says 1.3.2-100, which differs from the suggested 1.4.1 here.
The docx file is just a few words scribbled down, nothing special.
from docx2tex.
Reverted to the initial 1.9 release (https://github.com/transpect/docx2tex/releases/tag/v.1.9) and everything works fine. Tried this as the errors seemed to have to do with Saxon or Calabash versions being too old.
Maybe trying to fix this issue made it worse? :P
from docx2tex.
While cloning the repository, do you added --recursive
so that the Git submodules are checked out as well?
$ git clone https://github.com/transpect/docx2tex --recursive
from docx2tex.
from docx2tex.
Used Master and that seems to work without errors now.
from docx2tex.
Related Issues (20)
- tabularray? HOT 1
- NoClassDefFoundError ? HOT 2
- Double Exponent - Brace Issue HOT 2
- Error: Could not create the Java Virtual Machine. HOT 4
- ole/wml equation can't transfer into tex, but \includegraphics HOT 4
- Space after formula HOT 5
- Incomplete heuristics for 'formula' HOT 3
- Chinese document error HOT 4
- run with windows HOT 8
- Can I control which files are exported? HOT 4
- Something wrong with table generation. HOT 5
- Mexican Spanish HOT 5
- "A sequence of more than one item is not allowed as the third argument of fn:concat()" while conversion from docx HOT 5
- Tranlation error probably related to nested tables HOT 2
- Could not load file:/mnt/c/docx2tex/conf/conf.csv HOT 3
- Issues in Overset and Double Exponents HOT 1
- docx2tex 1.7.2 has vulnerable log4j-core-2.16.0 HOT 6
- Is it possible to change the inline math delimiter? HOT 4
- Convert to LaTeX only math formulas and the like HOT 2
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from docx2tex.