# gitbook-plugin-tex-without-tears **Repository Path**: sdk-apis/gitbook-plugin-tex-without-tears ## Basic Information - **Project Name**: gitbook-plugin-tex-without-tears - **Description**: gitbook 的数学公式渲染 - **Primary Language**: Unknown - **License**: Apache-2.0 - **Default Branch**: master - **Homepage**: None - **GVP Project**: No ## Statistics - **Stars**: 0 - **Forks**: 0 - **Created**: 2021-10-02 - **Last Updated**: 2021-11-12 ## Categories & Tags **Categories**: Uncategorized **Tags**: None ## README Math typesetting using Tex ============== 目前此版是自定义的,测试项目在 /Users/Emery/tmp/gitbook-sample/gitbook-demo/node_modules/gitbook-plugin-katex ## 国内 gitee的拉取 如果使用官方的设置,访问速度非常慢,可使用以下的方式,其中 - tex-without-tears 代表此插件的名称 - `git+https://gitee.com/sdk-apis/gitbook-plugin-tex-without-tears.git` 代表此插件的地址,用于拉取到项目下面 ```json "plugins": [ "tex-without-tears@git+https://gitee.com/sdk-apis/gitbook-plugin-tex-without-tears.git" ], ``` 完整的`book.json` 例子如 ```json { "title": "测试数学公式", "description": "gitbook math demo", "author": "emery", "language": "zh-hans", "root": ".", "plugins": [ "tex-without-tears@git+https://gitee.com/sdk-apis/gitbook-plugin-tex-without-tears.git" ], "pluginsConfig": { } } ``` ## 本地的拉取 如果使用官方的设置,访问速度非常慢,可使用以下的方式,其中 - tex-without-tears 代表此插件的名称 - `git+http://yanmacpro.local:3939/dev/gitbook-plugin-tex-without-tears.git` 代表此插件的地址,用于拉取到项目下面 ```json "plugins": [ "tex-without-tears@git+http://yanmacpro.local:3939/dev/gitbook-plugin-tex-without-tears.git" ], ``` 完整的`book.json` 例子如 ```json { "title": "测试数学公式", "description": "gitbook math demo", "author": "emery", "language": "zh-hans", "root": ".", "plugins": [ "tex-without-tears@git+http://yanmacpro.local:3939/dev/gitbook-plugin-tex-without-tears.git" ], "pluginsConfig": { } } ``` ## 使用方法 ```shell gitbook install ./ gitbook serve # 编译书籍 gitbook epub ./ ./mybook.epub ``` GitBook can generates a website, but can also output content as ebook (ePub, Mobi, PDF). ```bash # Generate a PDF file $ gitbook pdf ./ ./mybook.pdf # Generate an ePub file $ gitbook epub ./ ./mybook.epub # Generate a Mobi file $ gitbook mobi ./ ./mybook.mobi ``` ## Usage 使用方法 例子 ``` Inline math: $$\int_{-\infty}^\infty g(x) dx$$ Block math: $$ \int_{-\infty}^\infty g(x) dx $$ Or using the templating syntax: {% math %}\int_{-\infty}^\infty g(x) dx{% endblock %} ``` ### Comparison with [MathJax](https://github.com/GitbookIO/plugin-mathjax) - Faster