latex

Matplotlib 2 mathtext: Glyph errors in tick labels

送分小仙女□ 提交于 2019-12-05 06:13:04
I've observed errors when rendering math in matplotlib 2.0.2, when using the default mathtext as opposed to the LaTeX math rendering engine. It seems that some glyphs (in my case the minus and the multiplication sign) is not recognized by mathtext. What makes it really weird is that the error only occurs when these particular glyphs appear in tick labels. When I deliberately type some mathy expression into e.g. the figure title, it works fine. Consider the below example and the resultant image: import matplotlib import matplotlib.pyplot as plt # Customize matplotlib matplotlib.rcParams.update(

Emacs - how do I automatically enter minor modes when I enter a major mode?

三世轮回 提交于 2019-12-05 06:12:11
I'm kind of a newb when it comes to emacs. I know about the .emacs file but have very little idea as to do anything more advanced than elementary stuff. Whenever I enter latex-mode, I'd also like to automatically turn on flyspell-mode, reftex-mode, auto-fill-mode, and also set fill-column to 120. How do I edit my .emacs file to do this? Thanks! (add-hook 'latex-mode-hook (function (lambda () (flymake-mode) (reftex-mode) (auto-fill-mode) (setq fill-column 120)))) for example should work. You can set a so-called hook to a major mode. Have a look at this page of the manual for some examples. 来源:

Vim syntax and Latex math inside markdown

我怕爱的太早我们不能终老 提交于 2019-12-05 05:29:52
I write documentation in markdown using ViM and I also put math using the latex $$ symbol (I compile using pandoc). The thing is that ViM syntax wouldn't ignore the underscores _ inside the dollar symbols and it is pretty annoying. For instance if I write this: $$ a_1 = 0 $$ Then Vim will highlight all the following text as italics due to to the underscore used. How can I change that? Also it would be nice if I could highlight what's inside $ with a different format. I have put these lines in my .vimrc. It works for inline math on the same line and block-mode math. " This gets rid of the nasty

MathJax 数学公式

半腔热情 提交于 2019-12-05 05:01:19
公式表示方法 行间公式使用 \[...\] 或 $$...$$ 行内公式使用 \(...\) http://docs.mathjax.org/en/latest/basic/mathematics.html#tex-and-latex-input 行间公式示例 \[\frac{-b \pm \sqrt{b^2-4ac}}{2a}\] 行内公式示例 \(\sqrt{a^2+b^2}\) Online LaTeX Equation Editor http://latex.codecogs.com/eqneditor/editor.php 来源: https://www.cnblogs.com/hjbreg/p/11908088.html

Pandoc Syntax Highlighting in PDF not working

落花浮王杯 提交于 2019-12-05 04:55:06
问题 pandoc --version yields: pandoc 1.12.2.1 Compiled with texmath 0.6.5.2, highlighting-kate 0.5.5.1. Syntax highlighting is supported for the following languages: actionscript, ada, apache, asn1, asp, awk, bash, bibtex, boo, c, changelog, clojure, cmake, coffee, coldfusion, commonlisp, cpp, cs, css, curry, d, diff, djangotemplate, doxygen, doxygenlua, dtd, eiffel, email, erlang, fortran, fsharp, gnuassembler, go, haskell, haxe, html, ini, java, javadoc, javascript, json, jsp, julia, latex, lex,

Drawing path diagrams with R package 'sem' using Graphviz

☆樱花仙子☆ 提交于 2019-12-05 04:40:07
问题 I use the sem package to do my analysis. To draw a path diagram I use the pathDiagram function in sem to get the code and then use it in Graphviz to get the diagram. I have two questions: library(sem) R.DHP <- readMoments(diag=FALSE, names=c('ROccAsp', 'REdAsp', 'FOccAsp', 'FEdAsp', 'RParAsp', 'RIQ', 'RSES', 'FSES', 'FIQ', 'FParAsp')) .6247 .3269 .3669 .4216 .3275 .6404 .2137 .2742 .1124 .0839 .4105 .4043 .2903 .2598 .1839 .3240 .4047 .3054 .2786 .0489 .2220 .2930 .2407 .4105 .3607 .0186

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

How to debug vim mapping overlaps?

坚强是说给别人听的谎言 提交于 2019-12-05 04:03:36
In general how to debug and solve key bindings overlapping? I had this problem.. Recently I add vim-latex plugin to my vim dir. After that I noticed that my ctrl-j bind is overlapped by vim-latex/plugin/imaps.vim and lost a lot of time until solved that. By the way: there is a bug in imaps.vim i think, because there is written " map only if there is no mapping already" and my example shows opposite. You can get fine-grained info from the :map command: To show only mappings relevant to a particular key (in this case ctrl-J): :map <c-j> or, better, to show mappings for particular key as well as

How to get a latex table of sympy expressions in ipython-notebook?

你。 提交于 2019-12-05 03:12:27
问题 I'm using sympy to collect terms from several expressions and would like to format the results (within ipython-notebook) in a table with the terms down the left most column and each subsequent column representing one expression. The entries in the column are from the dict returned by sympy.collect(syms, evaluate=False) So far I have: from IPython.display import display, Latex import pandas as pd import sympy as sym sym.init_printing() x,y,z = sym.symbols('x,y,z') da,db,dc = sym.symbols('{

Replace a character with a string in LaTeX

时光总嘲笑我的痴心妄想 提交于 2019-12-05 02:47:50
I'm looking for a way to do a substring replace on a string in LaTeX. What I'd like to do is build a command that I can call like this: \replace{File,New} and that would generate something like \textbf{File}$\rightarrow$\textbf{New} This is a simple example, but I'd like to be able to put formatting/structure in a single command rather than everywhere in the document. I know that I could build several commands that take increasing numbers of parameters, but I'm hoping that there is an easier way. Edit for clarification I'm looking for an equivalent of string.replace(",", "$\rightarrow$)