#Latex for word output code
You may have noticed some obscure \foreignlanguage code that doesn't match the actual language used in your TeX document. If you invoke the docx2tex XProc pipeline ( xpl/docx2tex.xpl), you can specify the fontmap directory with the option custom-font-maps-dir.
#Latex for word output how to
Please find further documentation on how to create a fontmap here.Īfter you created your fontmap, store it in a directory and pass the path of the directory to docx2tex with the -f option. If you want to map characters from Unicode to LaTeX, please use the character map in the xml2tex configuration instead. Please note that this is just needed for fonts that are not unicode-compatible. The docx conversion supports individual fontmaps for mapping non-unicode characters to unicode. (For paragraphs that are not removed during evolve-hub, this can also be done in the -x stylesheet.) It is strongly advised to xsl:import the default evolve-hub customization (see example). headings from arbitrary docx paragraphs, you should add a template that sets the paragraph’s attribute to Heading1, Heading2, etc. If you want to create \chapter, \section, etc. This example was created in response to a user request. There is an example for such an XSLT that retains empty paragraphs that will otherwise be removed by default, in one of the XSLT passes that comprise evolve-hub. Contrary to custom-xsl which is passed as an option, this is passed to the pipeline on the input port custom-evolve-hub-driver, or using the -e option of d2t. In case you need to influence what evolve-hub does, you can provide a custom stylesheet for this. This processing is applied before the xml2tex configuration, so your XSLT should transform Hub (DocBook namespace) to Hub. The additional XSLT’s URI may be provided by the custom-xsl option.
#Latex for word output windows
d2t.bat does not have all the flags if you are confined to Windows and don’t have Cygwin, WSL, or MinGW, you may invoke calabash/calabash.bat yourself, see above.
The location of this XSLT file (absolute URI or path relative to the main directory that d2t and d2t.bat reside in) may be provided to d2t via the -x option. debug/evolve-hub/70.docx2tex-postprocess.xml). You can provide an XSLT that works on the result of evolve-hub (if debugging is enabled, on the file. If you want to configure docx2tex for other styles, you can edit this file or pass a custom configuration file with the conf option. The configuration in conf/conf.xml is used by default and works with the styles defined in Microsoft Word's normal.dot. docx2tex will apply the configuration to the intermediate Hub XML file and generates the LaTeX output. xml2texĭocx2tex can also be configured by means of an xml2tex configuration file. You can edit CSV files either with a simple text editor or with a spreadsheet application.
Only some of the modes are used by docx2tex, orchestrated by evolve-hub.xpl and configured in detail by evolve-hub-driver.xsl. This is a bag of XSLT modes that, among other things, transform paragraphs with list markers and hanging indentation to proper nested lists, create a nested section hierarchy, group images with their figure titles, etc. It transforms a docx file to a Hub XML representation. The docx2tex pipeline consists of 3 macroscopic steps:
Calabash\calabash.bat -o result=myfile.tex -o hub=myfile.xml xpl/docx2tex.xpl docx=myfile.docx conf=conf/conf.xml