tex

Render TeX with KaTeX or MathJax

柔情痞子 提交于 2019-12-08 10:15:52
问题 I have a html document <div> <p>One paragraph</p> <p>Another paragraph</p> </div> and in some of the paragraphs, I have <p>Some text and a formula $a = b + c$.</p> and I want the text withing the $-signs to be rendered as TeX math using KaTeX. The problem is that if I want to use it in the browser, I have to use katex.render("c = \\pm\\sqrt{a^2 + b^2}", element); so I need to assign an element. So should I really write my html document like this or are there any other options: <div> <p>One

Add TeX path to R Studio - Ubuntu

不想你离开。 提交于 2019-12-07 09:48:46
问题 I'm having the same issue as this question: When I open any .Rnw file, R Studio says that I have no TeX Distribution installed: I'm using Ubuntu 14.04 w/ Gnome and TeXLive 2014. I include the line PATH=/usr/local/texlive/2014/bin:${PATH} in the Renviron.site file, which now looks like: ## Emacs please make this -*- R -*- ## empty Renviron.site for R on Debian ## ## Copyright (C) 2008 Dirk Eddelbuettel and GPL'ed ## ## see help(Startup) for documentation on ~/.Renviron and Renviron.site # ##

To escape many _ in LaTeX efficiently

女生的网名这么多〃 提交于 2019-12-06 17:07:20
问题 How can you escape _ without the use of \_ ? This is the example of the question word_a_a_a_a_a_b_c_dd There is one function which you can use for this. However, I cannot remember its name. 回答1: Are you thinking of the underscore package, which redefines the underscore symbol so that you don't have to escape it in text mode? See here. 回答2: Other than verbatim I wouldn't know. Verbatim environment: \begin{verbatim} word_a_a_a_a_a_b_c_dd \end{verbatim} Inline: \verb|word_a_a_a_a_a_b_c_dd| 回答3:

MATPLOTLIB: How do I have to provide font metrics files for rendering text by TeX?

冷暖自知 提交于 2019-12-06 14:30:54
I have a problem with Python (WinPython-64bit-3.6.5.0Qt5)/MATPLOTLIB (version 2.2.2) when rendering text with TeX (MikTeX 2.9) and application of the font "Times", which is in the list of standard fonts (see https://matplotlib.org/users/customizing.html ) In the minimal example below, I get the following error message: File "C:\WinPython-64bit-3.6.5.0Qt5\python-3.6.5.amd64\lib\site-packages\matplotlib\dviread.py", line 471, in _fnt_def_real raise error_class("missing font metrics file: %s" % fontname) FileNotFoundError: missing font metrics file: rsfs10 Here is an example to reproduce the

How to add other languages to TeX

不问归期 提交于 2019-12-06 07:38:23
问题 In MediaWiki if you add in formulas non english text it cuts. For example if you write \text{щfбb} ( щ and б russian (cyrillic) symbols) output will be fb not щfбb . 回答1: First of all if you have MediaWiki version lower than 1.18 then open file includes/Math.php and find (this code for version 1.16): escapeshellarg( $wgTmpDirectory ).' '; escapeshellarg( $this->tex ).' '; and replace with: escapeshellarg( $wgTmpDirectory ).' '; setlocale(LC_CTYPE, "en_US.utf8"); $cmd .= escapeshellarg( $this-

how to create parser for TEX?

橙三吉。 提交于 2019-12-06 05:09:38
问题 I am looking to develop a TEX parser, now problem is there is no Context Free Grammar and there can not be one, because its not context free language, I heard that it is some sort of macro language and that builds on its own. So now I need direction of what kind of grammar this macro language has and how to build anything upon in c#. I will write the tokenizer and parser, but I need some rules of macro in TEX which are quite hard to find, everywhere else there is documentation about how to

How to underline section-headings in LaTeX?

*爱你&永不变心* 提交于 2019-12-05 20:35:54
问题 EDIT : As I see in the first answer, underline is the wrong word. I want a line under the section heading, separating the heading from the following text. I want to separate section headings from the following text with a horizontal line. At the moment I use the following: \newcommand{\tmpsection}[1]{} \let\tmpsection=\section \renewcommand{\section}[1]{\tmpsection{#1}\hrule\nobreak} But that produces a line, that is too far away from the section-heading and to near to the following text. Has

Add tex distribution to PATH for R studio

笑着哭i 提交于 2019-12-05 15:05:17
I have recently begun using knitr with Rstudio. I ran into the "No tex installation detected. Please install TeX before compiling." error in both my Ubuntu and windows OS's. After some research I was able to amend the issue in Ubuntu by adding the directory of my tex installation to PATH . I did this by including the following line in Renviron.site PATH=/usr/local/texlive/2013/bin:${PATH} However, the issue remains for my windows installation. I was unable to find the Renviron.site file, so I created one in the same directory of Renviron, and added the location of my tex installation in

Add TeX path to R Studio - Ubuntu

雨燕双飞 提交于 2019-12-05 12:36:36
I'm having the same issue as this question : When I open any .Rnw file, R Studio says that I have no TeX Distribution installed: I'm using Ubuntu 14.04 w/ Gnome and TeXLive 2014. I include the line PATH=/usr/local/texlive/2014/bin:${PATH} in the Renviron.site file, which now looks like: ## Emacs please make this -*- R -*- ## empty Renviron.site for R on Debian ## ## Copyright (C) 2008 Dirk Eddelbuettel and GPL'ed ## ## see help(Startup) for documentation on ~/.Renviron and Renviron.site # ## Example ~/.Renviron on Unix # R_LIBS=~/R/library # PAGER=/usr/local/bin/less # ## Example .Renviron on

Knitr preamble error results in “pandoc document conversion failed with error 43”

痞子三分冷 提交于 2019-12-05 04:12:19
Rstudio Version 0.99.441; Windows 7 enterprise; knitr 1.10.5; MiKTex 0.4.5 r.1280 (2.9 64-bit) I have a an error on my office computer when trying to knit PDF's in Rstudio, there are no problems knitting to HTML or word. The problem may be related to updates because knitting used to work fine and my home computer can knit to pdf without issue, however I took my computer home to update and the problem is still there. My error message was as follows "pandoc.exe: Error producing PDF from TeX source Error: pandoc document conversion failed with error 43" I created a new file using the template