writex:基于Markdown的工作流程,用于使用LaTeX创建文档

  • l6_774158
    了解作者
  • 8.2KB
    文件大小
  • zip
    文件格式
  • 0
    收藏次数
  • VIP专享
    资源类型
  • 0
    下载次数
  • 2022-05-21 06:43
    上传日期
威力士 使用Markdown创建漂亮的LaTeX文档 WriTeX为您提供了超级轻松地创建打印文档(PDF)的工作流程; LaTeX的强大功能以及Markdown的简单性。 设置 使用npm全局安装WriTeX CLI: npm install -g writex WriTeX使用和LaTeX。 。 LaTeX有不同的发行版。 我建议使用Linux版 ,Mac OS X版和Windows版 。 脚手架一个新项目 除了WriTeX CLI,您还将需要一个WriTeX模板用于您的文档。 模板是通过npm安装的,您可以。 目前,项目脚手架尚未实施。 但是,您可以手动安装模板并将配置文件复制到项目目录,如下所示(以writex-article模板为例): 安装模板npm install --save-dev writex-template 复制配置文件cp node_modules/wr
writex-master.zip
  • writex-master
  • src
  • tasks.js
    3.2KB
  • utils.js
    1KB
  • lib.js
    4.6KB
  • build.sh
    1.4KB
  • LICENSE
    1.1KB
  • README.md
    4.8KB
  • .gitignore
    29B
  • index.js
    1.7KB
  • package.json
    824B
内容介绍
# WriTeX > Create beautiful LaTeX documents with Markdown WriTeX gives you a workflow for creating print documents (PDF) super-easily; the power of LaTeX with the simplicity of Markdown. ## Setup Install the WriTeX CLI globally using npm: ``` npm install -g writex ``` WriTeX makes use of [Pandoc](http://johnmacfarlane.net/pandoc/) and LaTeX. [Download and install Pandoc from here.](http://johnmacfarlane.net/pandoc/installing.html). LaTeX comes in different distributions; I recommend [TeX Live](http://www.tug.org/texlive/) for Linux, [MacTeX](https://tug.org/mactex/) for Mac OS X, and [MiKTeX](http://miktex.org/) for Windows. ## Scaffolding a new project Besides the WriTeX CLI, you will also need a WriTeX template for your document. Templates are installed via npm and you can [find a list of available templates here](https://www.npmjs.com/browse/keyword/writex-template). > At the time being, project scaffolding is not yet implemented. However, you can manually install the template and copy the config file into the project directory as follows (using the writex-article template as an example): > 1. Install the template `npm install --save-dev writex-template` > 2. Copy config file `cp node_modules/writex-template/writex.yaml ./` ## Writing and Configuring If your project is set up, you can start writing. All your content belongs in Markdown files with the `.md` suffix. The filenames should be prefixed by a number, so that they are ordered properly (otherwise, WriTeX will not compile them into the `\begin{document} ... \end{document}` area of your LaTeX document): ``` my-project/ - 0-introduction.md - 1-research.md - 2-design.md - 3-implementation.md - 4-evaluation.md - 5-conclusion.md - references.bib - writex.yaml ``` ### Configuration You can configure some basic parameters of your project in the `writex.yaml` file. Some parameters are necessary for every WriTeX project, some are specific to a certain template. The values under `document` are used by the template to fill certain fields. They depend very much on the used template; an article needs different metadata than, for example, a letter. An exemplary WriTeX config file: ```yaml template: article abstract: false bibtex: false engine: xelatex document: author: Arthur Authory date: \today title: A splendid article subtitle: How to write a headline that means absolutely nothing ``` In this example, both `document` and `abstract` are specific to the template ([writex-article](https://github.com/tvooo/writex-article)). All other parameters are universal WriTeX parameters. ### Bibliographies For the time being, WriTeX supports BibLaTeX bibliographies via `biber`. You can enable them in the config file, setting `bibtex` to `true`. The BibLaTeX file **must** be named `references.bib`. WriTeX will automatically take care of the proper compilation: `latex->biber->latex->latex`. This is intented to become more flexible in the future, with support for `bibtex` and configurable filenames as well. ### Special content There are some occasions where your template provides space for special content that does not belong into the regular flow of your document. One such example is an *abstract*, as implemented by the [writex-article](https://github.com/tvooo/writex-article) template. Special content must not be prefixed by a number, so that it is not included in the `\begin{document} ... \end{document}` area of your LaTeX document. > **Example:** To enable the use of an *abstract* in the [writex-article](https://github.com/tvooo/writex-article) template, you have to create a file `abstract.md`, fill it with your abstract, and set the `abstract` field in the `writex.yaml` config file to `true`. For information on the special content that is supported by your template, refer to your template's README. ## Compiling So you are all set, a first draft is written and you want to see how your PDF looks? Simply run WriTeX in your project folder: ``` writex ``` It will run through all the steps necessary and spit out your PDF in the end. ### Watch and compile WriTeX can watch for changes to your Markdown files and compile the new version of your PDF document automatically, which is quite convenient: ``` writex watch ``` ## Future plans I've got quite a bit planned for WriTeX, mostly for my own convenience: * `writex-acm`, a template for creating ACM research papers * `writex-book`, a template based on KOMA-Script's `scrbook` document type * `writex-tvooo-book`, a variation of `writex-book` with custom fonts and a custom title page, glossaries etc. * `writex-tvooo-article`, a variation of `writex-article` with custom fonts * Scaffolding of your own WriTeX templates * Scaffolding of a project using an existing template * A little website with a nice, illustratory explanation * Maybe offer the whole process online; on-the-fly PDF generation from pasted Markdown, with your chosen template
评论
    相关推荐
    • installer-for-windows.zip
      elm编译器0.19版本安装文件 for windows 64位。exe直接安装,除npm外的最佳选择。
    • windows-zip:在Windows上压缩和解压缩
      npm install windows-zip 用法 zipSync const { zipSync } = require ( 'windows-zip' ) ; const path = [ '<path>' , '<path>' ] ; const dest = '<path>' ; zipSync ( path , dest ) ; 解压缩同步 const { ...
    • tray-windows:npm模块可在Windows上创建系统任务栏应用程序
      npm模块可在Windows上创建系统任务栏应用程序 安装 > npm install --save tray-windows 用法 有关更多信息,请参见example.js var tray = require ( 'tray-windows' ) tray ( { name : 'Tooltip title' , items...
    • windows-sizes:Windows 屏幕尺寸
      $ npm install windows-sizes 用法 var size = require ( 'windows-sizes' ) ; size ( function ( err , sizes ) { if ( ! err ) console . log ( sizes ) ; // [{ "width": "768", "height": "1366" }] } ) ; ...
    • win32:Windows特定的节点功能
      npm install win32 --save 用 读取(路径,选项) 读取路径,如果是根路径,则在win32上返回volumes getVolumes() 获取Windows平台量 const win = require ( 'win32' ) ; const volumes = await win . ...
    • npm-windows-upgrade:在Windows上升级npm
      Windows上升级NPMWindows上升级npm需要手动步骤,以确保PowerShell / CMD找到新版本的npm。 这是一个用 :red_heart: 对于npm和Node,将过程简化为一个简单的命令。 用法 首先,通过从提升的PowerShell中运行...
    • trayballoon:在Windows上创建托盘气球
      Windows上创建托盘气球 安装 $ npm install --save trayballoon 用法 var trayballoon = require ( 'trayballoon' ) ; trayballoon ( { text : 'Unicorns & rainbows' , icon : 'ponies.ico' , timeout : ...
    • phantomjs-1.9.7-windows.zip
      phantomjs因为网络问题导致的安装不成功,解决办法就是手动下载phantomjs-1.9.7-windows.zip,复制到C:\Users\ADMINI~1\AppData\Local\Temp\phantomjs\目录,再次执行npm install mocha-phantomjs,安装成功
    • WINDOWS下的node绿色版
      解压到D盘,追加用户变量 node 值 D:\node\nodejs 好了,你的node已安装好了。 C:\Users\dell>node -v v0.10.33 C:\Users\dell>npm -v 1.4.28 C:\Users\dell>
    • window-calculator:Windows计算器
      窗口计算器 项目设置 npm install 编译和热重装以进行开发 npm run serve 编译并最小化生产 npm run build 整理和修复文件 npm run lint 自定义配置 请参阅。