tex

Python: Unable to Render Tex in Matplotlib

匿名 (未验证) 提交于 2019-12-03 02:16:02
可以将文章内容翻译成中文,广告屏蔽插件可能会导致该功能失效(如失效,请关闭广告屏蔽插件后再试): 由 翻译 强力驱动 问题: I recently upgraded my laptop to Snow Leopard, updated TeX to Version 3.1415926 (TeX Live 2011/MacPorts 2011_5), and installed Python 2.7.3. After all these installs, I ran macport selfupdate and macport upgrade outdated. However, now when I try to use TeX in matplotlib, I receive the following: LaTeX was not able to process the following string : 'lp' Here is the full report generated by LaTeX : This is pdfTeX , Version 3.1415926 - 2.3 - 1.40 . 12 ( TeX Live 2011 / MacPorts 2011 _5 ) restricted \write18 enabled . entering extended

Three.js r72 - Texture marked for update but image is undefined?

匿名 (未验证) 提交于 2019-12-03 01:45:01
可以将文章内容翻译成中文,广告屏蔽插件可能会导致该功能失效(如失效,请关闭广告屏蔽插件后再试): 问题: Three.js r72 I'm trying to use the same texture with different offsets and repeats, but after I clone the texture and apply needsUpdate I keep getting an error "Texture marked for update but image is undefined". I check the cloned texture and the image property is undefined. Shouldn't the clone method have referenced the source image from the texture in the textures Object. var textures = {} var materials = {} textures.skin = THREE.ImageUtils.loadTexture('skin.png'); textures.skin.minFilter = THREE.NearestFilter; textures.skin.magFilter =

Knitr hook to add code before \\documentclass line in tex file to avoid options clash with xcolor

匿名 (未验证) 提交于 2019-12-03 01:39:01
可以将文章内容翻译成中文,广告屏蔽插件可能会导致该功能失效(如失效,请关闭广告屏蔽插件后再试): 问题: I am trying to create a pdf document using rmarkdown and knitr . I need to use the xcolor tex package with some options (eg: [table] or [svgnames] ). Whenever I try to do so either using - \usepackage[table]{xcolor} in the YAML header or in a preamble tex file mentioned under the pdf_document includes in_header: , I am getting the following error: ! LaTeX Error: Option clash for package xcolor The option clash is because, the knitr engine pdf_document is also loading the xcolor package either directly or indirectly through another package. I

Emacs latexmk function throws me into an empty buffer

匿名 (未验证) 提交于 2019-12-03 01:38:01
可以将文章内容翻译成中文,广告屏蔽插件可能会导致该功能失效(如失效,请关闭广告屏蔽插件后再试): 问题: This is a follow up to How do I bind latexmk to one key in Emacs and have it show errors if there are any . I'm using a function in Emacs to compile LaTeX documents with latexmk but it does not behave exactly as I want. The function I use is came up with: (defun run-latexmk () (interactive) (let ((TeX-save-query nil) (TeX-process-asynchronous nil) (master-file (TeX-master-file))) (TeX-save-document "") (TeX-run-TeX "latexmk" "latexmk" master-file) (if (plist-get TeX-error-report-switches (intern master-file)) (TeX-next-error t) (minibuffer

Is a successor for TeX/LaTeX in sight? [closed]

早过忘川 提交于 2019-12-03 01:30:39
问题 Closed . This question is opinion-based. It is not currently accepting answers. Want to improve this question? Update the question so it can be answered with facts and citations by editing this post. Closed 6 years ago . TeX/LaTeX is great, I use it in many ways. Some of its advantages are: it uses text files, this way the input-files can be diffed and many tools exist to work with text it is very flexible it has a stable layout: if I change something at the start of the document, it doesn't

Call a function in Vim’s `autocmd` command

匿名 (未验证) 提交于 2019-12-03 00:54:02
可以将文章内容翻译成中文,广告屏蔽插件可能会导致该功能失效(如失效,请关闭广告屏蔽插件后再试): 问题: I want to use the expand function in an autocmd . In particular, I am adapting a tip by Paul Biggar and I wanted to use the following auto command in my .gvimrc : autocmd FileType tex set makeprg=rubber-info\ expand("%:t:r").log tex file, the makeprg variable is set to the value of rubber-info filename.log where filename is the name of the TeX file without its file extension. How can I accomplish this? 回答1: You can try something like this; untested, may not be exactly right, but using exe is generally how I get around this kind of problem.

Passing command-line arguments to LaTeX document

一曲冷凌霜 提交于 2019-12-03 00:22:02
问题 Sometimes, I define new commands such as the following. \newcommand{\comment}[1]{\textbf{#1}} %\necommand{\comment}[1]{\emph{#1}} The above commands enable me to change the style of parts of my code all at once. If I want to generate both of the possible styles, I have to compile my LaTeX document two times each time modifying the source code to enable the desired style. Is there a way to avoid the source code modification in such cases? That is, can I pass latex some command-line arguments

Get started with Latex on Linux [closed]

喜你入骨 提交于 2019-12-02 23:58:27
问题 Closed. This question is off-topic. It is not currently accepting answers. Want to improve this question? Update the question so it's on-topic for Stack Overflow. Closed 2 years ago . Impressed by is-latex-worth-learning-today, and many how-to's on Windows, How do you have someone started with LaTeX on Linux? How do you generate a pdf out of it and give up the OOO Word processer? Update: Thanks to all the suggestions given in here. I was able to create an awesome ppt using the Beamer class:

matplotlib - write TeX on Qt form

旧时模样 提交于 2019-12-02 19:36:07
I'd like to add some TeX text to my Qt form, like label - just text, no graph, no lines, no borders, just TeX. I thought something like this: render TeX to bitmap and then place that bitmap on form, e.g. into QLabel. Or even better - use some backend, add it to form and use something tex_label.print_tex(<tex code>) . Seems matplotplot has TeX parsers, but I can't figure out how to use them... Thanks. demalexx As a variant: from matplotlib.figure import Figure from matplotlib.backends.backend_qt5agg import FigureCanvasQTAgg # Get window background color bg = self.palette().window().color() cl =

Passing command-line arguments to LaTeX document

时间秒杀一切 提交于 2019-12-02 14:01:50
Sometimes, I define new commands such as the following. \newcommand{\comment}[1]{\textbf{#1}} %\necommand{\comment}[1]{\emph{#1}} The above commands enable me to change the style of parts of my code all at once. If I want to generate both of the possible styles, I have to compile my LaTeX document two times each time modifying the source code to enable the desired style. Is there a way to avoid the source code modification in such cases? That is, can I pass latex some command-line arguments so that I can choose which style to use based on that argument? That is, can I pass latex some command