Giter Club home page Giter Club logo

everytext2tex's Introduction

everytext2tex

A Simple Tool for Markdown and DocX to Latex Conversion

依赖环境

  • 使用 md2tex 前需要安装markdown2
  • 使用 docx2tex 前需要安装pydocxpython-docx

注:

如果使用docx2tex时报错 AttributeError: module 'collections' has no attribute 'Hashable'

则需要找到源码文件memorize.py,将其中的import collections改成import collections.abc

并将if not isinstance(args, collections.Hashable): 改成 if not isinstance(args, collections.abc.Hashable):

使用方法

打开python文件将md2tex或者docx2tex中的相关路径改成你自己设置的路径

  • md2tex: 使用前要准备好md文件路径,模板路径
  • docx2tex: 使用前要准备好docx文件路径,模板路径

elegant_templates文件夹里附带了几个常用的LaTeX模板,如果你想添加属于自己的模板和相应的宏包设置,直接在template中的beginningpackage文件中更改相应的字典即可

可以转换的格式

  • md2tex: 见example
  • docx2tex: 列表、表格、图片、文本内容、加粗、斜体等

注意:

  1. 在进行md转至tex时,markdown源文件的格式要遵守md2tex中的example格式,否则可能会出现格式错误
  2. docx转tex之前最好确保图片格式均为png,否则转至tex之后会出现图片格式错误
  3. docx转tex之前最后使用mathtype将所有公式转成latex格式,否则可能会出现无法识别或把公式识别成图片

todo:

  1. 自动化docx公式转化成latex格式
  2. 完善docx中更多格式的转化

everytext2tex's People

Contributors

zhangyux1012 avatar

Stargazers

 avatar kenggua211 avatar Jerrysupreme avatar  avatar  avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.