Comments (4)
Perhaps it's not necessary to fork the entire project. You can just create your own configuration and import the docx2tex configuration. Then you could just overwrite the things you don't like and use the command line parameter -c
to pass the path to your custom configuration. Here is a sample configuration that would be sufficient:
<?xml version="1.0" encoding="UTF-8"?>
<set xmlns="http://transpect.io/xml2tex"
xmlns:tr="http://transpect.io"
xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
<import href="docx2tex/conf/conf.xml"/>
<!-- override lines 742 to 749 of docx2tex/conf/conf.xml
applies to real Word equations which are treated by
our mml2tex module -->
<template context="dbk:inlineequation[not(ancestor::dbk:superscript or ancestor::dbk:subscript )]
|dbk:equation[ancestor::dbk:table or ancestor::dbk:informaltable]">
<rule>
<text select="'\begin{math}'"/>
<text/>
<text select="'\end{math}'"/>
</rule>
</template>
<!-- selectively override the character mappings. Please
note that this apply to text characters outside of equations. -->
<charmap ignore-imported-charmaps="false">
<!--DEGREE SIGN -->
<char character="°" string="\begin{math}\circ\end{math}"/>
</charmap>
</set>
from docx2tex.
It's a possible but a bit more complicated since some mappings in our character map contain already Dollar characters. Unfortunately, I'm very busy at the moment, so I cannot give you a time frame for resolving this issue.
from docx2tex.
@mkraetke Thank you very much, it worked perfectly.
from docx2tex.
@mkraetke Would it be simpler if I made a fork and replaced the character map of $
with $$
or something similar?
I'm wanting to do this because I'm wanting to identify where there are inline formulas, but it gets more complicated because the dollar might not be a formula. (ex: $500, $400
)
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
- Produce LaTeX file without \begin{document} and \end{document} HOT 1
- 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
- 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.