latex

LaTeX equations do not render in google Colaboratory when using IPython.display.Latex

五迷三道 提交于 2019-12-03 14:33:13
In a regular jupyter notebook, running, for example, the following: from IPython.display import display, Math, Latex display(Math(r'F(k) = \int_{-\infty}^{\infty} f(x) e^{2\pi i k} dx')) produces an equation rendered in LaTeX (via Mathjax). Even though LaTeX works fine in markdown cells, LaTeX equations produced as above do not seem to render in Google Colaboratory. The same happens to the output of functions for example from qutip, which would normally render in latex (for example, qutip.basis(2, 0) would normally render in latex, but doesn't in Colaboratory). Why does this happen? Is there a

Possibilities to embed Latex in QML

好久不见. 提交于 2019-12-03 14:10:49
I'm doing a presentation system in QML (with C++ backend) similar to this one . I want to be able to include some Latex code to display some math (only minimum Latex capabilities needed, such as sums, fractions, super- and substript and math fonts). I see the following possibilities to do so: Using latex2e : Compile the Latex code to a DVI document (with latex ) Convert the DVI to SVG (with dvisvgm ) Display this using an Image in QML (which also supports SVG) Using MathJax : Wrap the Latex code in a small HTML file + include the MathJax JS library Display this using WebKit for QML Custom

Org LaTeX preview is fuzzy on retina displays

廉价感情. 提交于 2019-12-03 14:09:09
问题 I have been using Emacs 24.4 for all my math/scientific notes. org-latex-preview is fantastic for this! But recently, I upgraded to a macbook pro with retina display, and I now see that all my equations in org-mode are... fuzzy. Is there a setting I can change to up-res these? Here is a screenshot: Thanks! 回答1: A couple of years back, I decided to fix this and wrote a patch to add dvisvgm as a render option for latex previews. While this worked great, I never submitted it (no time or

img2latex2word

|▌冷眼眸甩不掉的悲伤 提交于 2019-12-03 13:48:47
先使用 mathpix 将图片转为 latex。 mathpix 软件下载地址: https://mathpix.com/ mathpix 的使用是 ctrl+alt+m 。 再将latex 转为 word 公式。 可以将latex 公式代码复制到 https://www.mathjax.org/#demo,再转为 word 公式: 来源: https://www.cnblogs.com/gris/p/11797710.html

How can one turn regular quotes (i.e. ', ") into LaTeX/TeX quotes (i.e. `', ``'')

淺唱寂寞╮ 提交于 2019-12-03 13:43:02
问题 Given a document written with normal quotes, e.g. Ben said "buttons, dear sir". I replied "Did you say 'buttons'?" to him. What ways can one turn these sort of things into LaTeX quotes, with the appropriate semantics. i.e. Ben said ``buttons, dear sir''. I replied ``Did you say `buttons'?'' to him. So that LaTeX produces: Ben said “buttons, dear sir”. I replied “Did you say ‘buttons’?” My first thought is to turn to a regex. However, I'm not getting any hits from Google or the regex libraries

Python matplotlib: Change axis labels/legend from bold to regular weight

心已入冬 提交于 2019-12-03 13:10:33
问题 I'm trying to make some publication-quality plots, but I have encountered a small problem. It seems by default that matplotlib axis labels and legend entries are weighted heavier than the axis tick marks. Is there anyway to force the axis labels/legend entries to be the same weight as the tick marks? import matplotlib.pyplot as plt import numpy as np plt.rc('text',usetex=True) font = {'family':'serif','size':16} plt.rc('font',**font) plt.rc('legend',**{'fontsize':14}) x = np.linspace(0,2*np

Plugin (vim-latex) crashing gVim on startup

江枫思渺然 提交于 2019-12-03 12:32:44
I'm trying to use vim-latex with gVim on Windows XP, but as soon as I open a .tex file (or as soon as I set ft=tex ) gVim crashes with no error messages visible. The crash doesn't occur in console vim. I've followed the setup instructions to a T (as far as I can tell), and I've tried disabling all other plugins and stripping my .vimrc as well. I tried running gvim -V9log.txt file.tex , but the output didn't help me, I'll include it here in case you can get anything useful from it. could not source "$VIM\vimrc" sourcing "$HOME\_vimrc" Searching for "filetype.vim" in "C:\Documents and Settings

LaTeX multicolumn block in Pandoc markdown [duplicate]

风流意气都作罢 提交于 2019-12-03 12:31:49
This question already has an answer here: Slides with Columns in Pandoc 6 answers I want to convert a markdown file to html and pdf using pandoc. For the pdf file, which is intended for printing, I'd like to render a block of (narrow) text in two column format. This is what I came up with (and doesn't work): --- papersize: a4 documentclass: article header-includes: - \usepackage{multicol} ... H1 ============== H2 - A -------------- \begin{multicols}{2} ### H3 - a Blah blah blah... ### H3 - b Blah blah blah... ### H3 - c Blah blah blah... \end{multicols} H2 - B -------------- Blah blah blah...

Add a version number to the title of a LaTeX document

孤人 提交于 2019-12-03 12:27:26
问题 The title section of my LaTeX documents usually look like \title{Title} \author{Me} %\date{} %// Today's date will appear when this is commented out. \begin{document} \maketitle I'd really like to add another line in the title section for a version number: \title{Title} \author{Me} \version{v1.2} %\date{} %// Today's date will appear when this is commented out. \begin{document} \maketitle It doesn't necessarily have to be a command named version , but how can I get a version number to appear

Add in the LaTeX TOC an included PDF

强颜欢笑 提交于 2019-12-03 12:21:35
问题 In my document I include a PDF using \includepdf[pages=-]{./mypdf.pdf} The problem I'm having is how to add a TOC entry for this pdf. It supposed to be an appendix. I tried adding a new section in the appendix but of course the section name can't be printed on the same page than the included pdf, so the resulting TOC line directs to a wrong page. If I use \addcontentsline I loose the numbering and the page is wrong too because the included pdf actually starts at the next page... I'm a bit