latex

Print LaTeX Table Directly to an Image (PNG or other)

北慕城南 提交于 2019-12-04 01:41:54
Is there a way to print, from within R, a LaTeX table directly to an image file (for inclusion in another document/webpage). Basically, I'd like to supply LaTeX code to a function that saves it as an image to the working directory. Pipe dreams? There are various LaTeX-to-Image converter scripts, designed to do things like convert equations into images for including on web pages. If you can find one of those (dvipng perhaps?) then you can go from a table in R to LaTeX easy enough and then from LaTeX to png. If you have dvipng, you can leverage Hmisc's latex conversions to make a neater function

How do I generate LaTeX from Isabelle/HOL? [closed]

邮差的信 提交于 2019-12-04 01:31:39
How can I use Isabelle/HOL to automatically generate LaTeX from my source theory files? Isabelle/HOL's tutorial.pdf is very beautiful. I'm going to write a paper in LaTeX with a lot of Isabelle code in it. You should first have a look at the existing documentation and come back with more specific questions afterwards (if there remain any; but I'm sure there will ;)). What you want to do is called document preparation in Isabelle. The first place to look is Chapter 4 Presenting Theories of the Isabelle System Manual . (Actually it is also a good idea to first read the previous chapter on

Wrapping custom notes in texreg output

一世执手 提交于 2019-12-04 01:30:44
问题 I'm trying to add a fairly long note to the bottom of a table created by texreg ; I want this to simply wrap around, but there doesn't seem to be any functionality built into the function for doing so. Take, e.g.: texreg(lm(speed~dist,data=cars), custom.note=paste("%stars. This regression should be", "intepreted with strong caution as", "it is likely plagued by extensive", "omitted variable bias")) Which, when compiled, gives something like: The formatting is atrocious; much better would be

How do I use TeX/LaTeX formatting for custom data tips in MATLAB?

只谈情不闲聊 提交于 2019-12-04 01:28:51
问题 I'm trying to annotate a polar plot with data tips labelled with 'R:...,Theta:...' where theta is actually the Greek symbol, rather than the word spelled out. I'm familiar with string formatting using '\theta' resulting in the symbol, but it doesn't work in this case. Is there a way to apply the LaTeX interpreter to data tips? Here's what I have so far: f1=figure; t=pi/4; r=1; polar(t,r,'.'); dcm_obj = datacursormode(f1); set(dcm_obj,'UpdateFcn',@polarlabel) info_struct = getCursorInfo(dcm

Preserve line breaks in title using pandoc

吃可爱长大的小学妹 提交于 2019-12-04 01:02:31
Consider the following title block in pandoc-flavored Markdown: % Higgelty Pigglety Pop! or There Must Be More to Life % Maurice Sendak Here, line breaks are part of the title. It is possible to reformat the title in order to insert it into regular text flow, e.g. "Higgelty Pigglety Pop! Or, There Must Be More to Life", but when not talked about but used on the title page of a document, preserving the line breaks is crucial. Depending on the style, it might look like this: Higgelty Pigglety Pop! or There Must Be More to Life Maurice Sendak My question: How can I achieve a proper multi-line

Redefining commands in a new environment

99封情书 提交于 2019-12-04 00:27:58
Two questions: Does LaTeX allow one to (re)define commands within a \newenvironment ? I've tried using \renewcommand , \newcommand and \def in the before declaration but to no avail. How would one redefine \item when creating a new list environment? I've created a new type of list environment from scratch using \newenvironment while using another token instead of \item for each but I'd really like to keep things consistent by using \list and redefining \item . Sure; it's hard to know what went wrong without seeing your code. As an answer to your two questions, see if this helps: \documentclass

remove italics in latex subscript in matplotlib

梦想与她 提交于 2019-12-04 00:24:31
I would like to remove the italics font that appears when I use subscripts in labels. For example, the "Teff" in the x-label has "eff" in italics. I would like latex not render it in such a way. Generally, in latex this can be achieved with the \rm{} command. However, that does not work in matplotlib. Please help. import numpy as np import matplotlib.pyplot as plt x = np.arange(10) y = x plt.plot(x,y,'ro') plt.xlabel('Primary T$_{eff}$') Brian I have encountered this problem many times and it can be solved with this trick plt.xlabel(r'Primary T$_{\rm eff}$') 来源: https://stackoverflow.com

pandoc-generated docx misses italic variables in equations

独自空忆成欢 提交于 2019-12-03 23:01:18
问题 I have the following segment of Markdown with embedded LaTeX equations: # Fisher's linear discriminant \newcommand{\cov}{\mathrm{cov}} \newcommand{\A}{\mathrm{A}} \renewcommand{\B}{\mathrm{B}} \renewcommand{\T}{^\top} The first method to find an optimal linear discriminant was proposed by Fisher (1936), using the ratio of the between-class variance to the within-class variance of the projected data, $d(\vec x)$, as a criterion. Expressed in terms of the sample properties, the $p$-dimensional

Emacs/AUCTeX prefix arguments

强颜欢笑 提交于 2019-12-03 21:47:42
问题 In LaTeX mode C-c C-c is bound to: (TeX-command-master &optional OVERRIDE-CONFIRM) Normally this interactive function runs a command, perhaps a LaTeX compilation, asking for confirmation . In tex-buf.el it reads: If a prefix argument OVERRIDE-CONFIRM is given, confirmation will depend on it being positive instead of the entry in `TeX-command-list'. This is a bit cryptic for me and reading C-h v TeX-command-list didn't help. How can I pass the prefix argument to "TeX-command-master" so that I

R-LaTeX Wide table

这一生的挚爱 提交于 2019-12-03 21:24:39
I'm writing a report with sweave. I have to put-in a very wide table: from R dim(myData) > 50 60 The R code I wrote to generate the LaTex table is: print(xtable(myData, caption="my wide table", label="tab:myTab", digits=3), tabular.environment="longtable", caption.placement="top", ## floating.environment="sidewaystable", ## a trial size="\\tiny", table.placement="", floating=FALSE) The problem is that the table is too wide for the dimension of the page, so, is there a way to divide the table in different pages, such as LaTeX longtable environment but, by the width?? I hope I have been able to