<tfoot id='3BV5t'></tfoot>

    <small id='3BV5t'></small><noframes id='3BV5t'>

    <i id='3BV5t'><tr id='3BV5t'><dt id='3BV5t'><q id='3BV5t'><span id='3BV5t'><b id='3BV5t'><form id='3BV5t'><ins id='3BV5t'></ins><ul id='3BV5t'></ul><sub id='3BV5t'></sub></form><legend id='3BV5t'></legend><bdo id='3BV5t'><pre id='3BV5t'><center id='3BV5t'></center></pre></bdo></b><th id='3BV5t'></th></span></q></dt></tr></i><div id='3BV5t'><tfoot id='3BV5t'></tfoot><dl id='3BV5t'><fieldset id='3BV5t'></fieldset></dl></div>
        <bdo id='3BV5t'></bdo><ul id='3BV5t'></ul>
        <legend id='3BV5t'><style id='3BV5t'><dir id='3BV5t'><q id='3BV5t'></q></dir></style></legend>

        如何将 LaTeX 与 Markdown 混合使用?

        How can I mix LaTeX in with Markdown?(如何将 LaTeX 与 Markdown 混合使用?)

            <tbody id='EM09k'></tbody>
          <legend id='EM09k'><style id='EM09k'><dir id='EM09k'><q id='EM09k'></q></dir></style></legend>
              • <bdo id='EM09k'></bdo><ul id='EM09k'></ul>

                <i id='EM09k'><tr id='EM09k'><dt id='EM09k'><q id='EM09k'><span id='EM09k'><b id='EM09k'><form id='EM09k'><ins id='EM09k'></ins><ul id='EM09k'></ul><sub id='EM09k'></sub></form><legend id='EM09k'></legend><bdo id='EM09k'><pre id='EM09k'><center id='EM09k'></center></pre></bdo></b><th id='EM09k'></th></span></q></dt></tr></i><div id='EM09k'><tfoot id='EM09k'></tfoot><dl id='EM09k'><fieldset id='EM09k'></fieldset></dl></div>
              • <small id='EM09k'></small><noframes id='EM09k'>

              • <tfoot id='EM09k'></tfoot>

                  本文介绍了如何将 LaTeX 与 Markdown 混合使用?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着跟版网的小编来一起学习吧!

                  问题描述

                  我一直在使用 Markdown 做课堂笔记,非常棒.我什至对 Markdown 做了一些预处理,这样我就可以做表格之类的事情了.但是这个学期我正在教一门数学课,我希望能够将 LaTeX 公式与 Markdown 结合起来,如下所示:

                  细化关系写成$a sqsubseteq b$,可以是发音为$a$ 近似于 $b$"或$b$ 至少定义为 $a$".

                  我希望能够获取 LaTeX 的每个片段并将其预处理为一个很好的抗锯齿 PNG 文件,然后我可以通过 HTML <img> 标签将其包含在我的 Markdown 中.但是我完全不知道如何获取 LaTeX 的片段并获得一个漂亮的图像

                  • 有正确的边界框
                  • 抗锯齿

                  我只知道如何获取 DVI、PostScript 或 PDF 格式的完整页面.

                  我确信这个问题已经得到解决,但我无法猜出正确的搜索词.有任何建议如何解决它或在哪里寻找现有的解决方案?

                  <小时>

                  编辑:安装了 mathTeX 后,我可以说代码不灵活,它违反了 Linux 文件系统层次结构标准,而且它是业余的工作——无论从好坏的意义上说单词.代码非常复杂,没有明显的错误.我会寻找替代品.

                  此外,很明显,在底部,解决方案基于

                  最后,有一些像这样的开源 LaTeX 模板:https://github.com/Wandmalfarbe/pandoc-latex-template,可用于更好的格式化.

                  与往常一样,如果读者的用例没有此处介绍的那么琐碎,则应该深入挖掘.

                  I've been using Markdown for class notes, and it's great. I even do some preprocessing on the Markdown so I can do things like tables. But this term I'm teaching a class with a lot of math, and I'd love to be able to put LaTeX formulas with Markdown, something like this:

                  The refinement relation is written $a sqsubseteq b$, which can be 
                  pronounced "$a$ approximates $b$" or "$b$ is at least as defined as $a$".
                  

                  I'd like to be able to take each fragment of LaTeX and preprocess it into a nice antialiased PNG file which I could then include in my Markdown via the HTML <img> tag. But I have absolutely no idea how to take a fragment of LaTeX and get a nice image that

                  • Has the right bounding box
                  • Is antialiased

                  All I know how to do is get full pages in DVI, PostScript, or PDF formats.

                  I'm sure this problem has been addressed, but I haven't been able to guess the right search terms. Any suggestions how to solve it or where to look for an existing solution?


                  EDIT: Having installed mathTeX, I can say that the code is inflexible, that it violates the Linux Filesystem Hierarchy standard, and that it is amateur work—in both the good and bad senses of that word. The code is so complex that there are no obvious faults. I will be looking for alternatives.

                  Also, it's clear that at bottom, solutions are based on dvipng.


                  ONE YEAR LATER: I never did get the seamless integration I had been hoping for, but I am limping along on a script of my own devising. It turns out that instead of dvipng it is a little easier to use dvips -E and the convert program of ImageMagick. The benefits are slightly more control of things like scaling, and ease of making a transparent background. The curious can inspect this example.

                  I can't recommend this solution to anyone. But I can't recommend MathTeX either.

                  解决方案

                  Have you tried with Pandoc?

                  EDIT:

                  Although the documentation has become a bit complex, pandoc has supported inline LaTeX and LaTeX templates for 10 years.

                  Documents like the following one can be written in Markdown:

                  ---
                  title: Just say hello!
                  author: My Friend
                  header-includes: |
                      usepackage{tikz,pgfplots}
                      usepackage{fancyhdr}
                      pagestyle{fancy}
                      fancyhead[CO,CE]{This is fancy}
                      fancyfoot[CO,CE]{So is this}
                      fancyfoot[LE,RO]{	hepage}
                  abstract: This is a pandoc test with Markdown + inline LaTeX
                  ---
                  
                  Just say hello!
                  ===============
                  
                  This could be a good example or inlined LaTeX:
                  
                  egin{tikzpicture}
                  egin{axis}
                  addplot[color=red]{exp(x)};
                  end{axis}
                  end{tikzpicture}
                  %Here ends the furst plot
                  hskip 5pt
                  %Here begins the 3d plot
                  egin{tikzpicture}
                  egin{axis}
                  addplot3[
                      surf,
                  ]
                  {exp(-x^2-y^2)*x};
                  end{axis}
                  end{tikzpicture}
                  
                  And now, just a few words to terminate:
                  
                  > Goodbye folks!
                  

                  Which can be converted to LaTeX using commands like this: pandoc -s -i Hello.md -o Hello.tex

                  Following is an image of the converted Hello.md to Hello.pdf file using MiKTeX as LaTeX processor with the command: pandoc -s -i Hello.md -o Hello.pdf

                  Finally, there are some open source LaTeX templates like this one: https://github.com/Wandmalfarbe/pandoc-latex-template, that can be used for better formatting.

                  As always, the reader should dig deeper if he has less trivial use cases than presented here.

                  这篇关于如何将 LaTeX 与 Markdown 混合使用?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持跟版网!

                  本站部分内容来源互联网,如果有图片或者内容侵犯了您的权益,请联系我们,我们会在确认后第一时间进行删除!

                  相关文档推荐

                  quot;Each child in an array should have a unique key propquot; only on first time render of page(“数组中的每个孩子都应该有一个唯一的 key prop仅在第一次呈现页面时)
                  How do I make a TextGeometry multiline? How do I put it inside a square so it wraps like html text does inside a div?(如何制作 TextGeometry 多线?如何将它放在一个正方形内,以便它像 html 文本一样包裹在 div 内?) - IT屋-程序员软件开发技术分享社
                  Scale background image to fit ie8 window(缩放背景图像以适合 ie8 窗口)
                  Safari 5.1 breaks CSS table cell spacing(Safari 5.1 打破 CSS 表格单元格间距)
                  Put in bold part of description in metatag Drupal module(将描述的粗体部分放在元标记 Drupal 模块中)
                  How do I replace a node with an image using D3 and CoffeeScript for a network visualization?(如何使用 D3 和 CoffeeScript 将节点替换为图像以进行网络可视化?)
                    <i id='aEsmP'><tr id='aEsmP'><dt id='aEsmP'><q id='aEsmP'><span id='aEsmP'><b id='aEsmP'><form id='aEsmP'><ins id='aEsmP'></ins><ul id='aEsmP'></ul><sub id='aEsmP'></sub></form><legend id='aEsmP'></legend><bdo id='aEsmP'><pre id='aEsmP'><center id='aEsmP'></center></pre></bdo></b><th id='aEsmP'></th></span></q></dt></tr></i><div id='aEsmP'><tfoot id='aEsmP'></tfoot><dl id='aEsmP'><fieldset id='aEsmP'></fieldset></dl></div>
                      <tbody id='aEsmP'></tbody>

                    <legend id='aEsmP'><style id='aEsmP'><dir id='aEsmP'><q id='aEsmP'></q></dir></style></legend>

                    • <tfoot id='aEsmP'></tfoot>

                        <bdo id='aEsmP'></bdo><ul id='aEsmP'></ul>

                        <small id='aEsmP'></small><noframes id='aEsmP'>