latex

ESS/AucTeX/Sweave integration

青春壹個敷衍的年華 提交于 2019-12-20 23:27:12
问题 I'm using GNU/Linux distro (Arch, if that's relevant), Emacs v23.2.1, ESS v5.9 and AucTeX v11.86. I want to setup AucTeX to recognize .Rnw files, so I can run LaTeX on .Rnw files with C-c C-c and get .dvi file automatically. I reckon it's quite manageable by editing .emacs file, but I still haven't got a firm grasp on Elisp . Yet another problem is quite annoying - somehow, LaTeX is not recognizing \usepackage{Sweave} in preambule, so I actually need to copy Sweave.sty file (in my case

Control font size in graphics in LaTeX when scaling in minipage/subfig?

假装没事ソ 提交于 2019-12-20 20:16:09
问题 I am using pgf/tikz graphics and I'm wondering how one can control the scaling of font sizes in the graphics when using them in minipage/subfig environments? Is there a way to manually set a permanent font size for pgf/tikz graphics or in latex in general so as to make font sizing invariant to scaling? Ideally I'd like to be able to manually specify a font size per graphic or for all graphics or subfig/minipage environments? Here is an example of the usage as suggested. Thanks for the help.

How to automatically create BibTex citations for R packages in knitr file?

寵の児 提交于 2019-12-20 17:34:32
问题 I am not sure whether this an R, LaTeX, or BibTex problem. I am trying to automatically generate a .bib file containing citations for R packages and then list them at the end. I am able to generate the BibTex file and I don't see anything wrong with the BibTex file, but the entries don't appear when I compile the PDF. I'm not sure if R is not producing a BibTex file correctly, if some LaTeX syntax is wrong, or if the BibTex file needs to be pre-compiled or whatever. I noticed that

How to use Mercurial for version control of text documents?

半世苍凉 提交于 2019-12-20 14:35:10
问题 This is not exactly a programming question, however I think it fits here better than in the TeX group I want to use version control for keeping track of changes of text files (which are used to create LaTeX output. (As I am no programmer, I don't have deeper experience with version control system yet.) I'd like to use Mercurial for that, and I'm working on MacOS X 10.6. The files are about job applications, so mostly 3 files for each company: a letter of motivation a CV and one file with the

pandoc not converting latex style citations correctly

大兔子大兔子 提交于 2019-12-20 12:24:00
问题 I want to use latex-style citations \cite{key} in my markdown so that I can create tex and pdf documents nicely using pandoc. However, when I cite something, it shows the keyword in brackets instead of the citation style, such as author name or citation number. In other words, I want it to show up in the PDF as "This is my citation [1]" but instead it is appearing as "This is my citation [mykey]". Also, my references list isn't showing up after I add my # References header. What is going on

LaTeX: dollar sign vs \( \)

走远了吗. 提交于 2019-12-20 10:46:26
问题 Is there any reason to prefer the syntax \(myformula\) to the usual $myformula$ in LaTeX? Edit : The same question was asked, and answered, on tex.stackexchange. 回答1: LaTeX can catch nesting errors with \( ... \) but in practise there's no real advantage to using them over $ ... $ . If you do use \( ... \) , then make sure to load the fixltx2e package to make them robust (i.e., e.g., usable in captions and section headings). As others have said, on the other hand, \[ ... \] should be used

How do you extend article document class in LaTeX?

ぃ、小莉子 提交于 2019-12-20 10:33:43
问题 I don't really need a lot of changes to the default article document class. All I want is: redefine page margins (I want them to be the same on all pages, but different from the default values); use title page; add more elements on the title page ( title , author and date is not enough for me, I want company and company logo to be on the title page as well); change styles of the sections , subsections and subsubsections (I don't want the numbers to be shown, otherwise - they're good). Perhaps

R / Sweave formatting numbers with \Sexpr{} in scientific notation

一曲冷凌霜 提交于 2019-12-20 10:33:07
问题 I am just starting to write some documents with Sweave/R and I like the \sexpr{} command that lets one tow write numbers directly within text. If I have a number like mus=0.0002433121 , well I can say round it to a number of decimal places e.g. \Sexpr{round(mus,7)} How to write it in the scientific notation i.e. as LaTeX would be outputting 2.43 \times 10^{-4} and can we control the number of significant digits to be outputted like 3 in this example? I note that a number like sigma = 2000000

Knitr: R code within LaTeX environment in a Markdown document

自古美人都是妖i 提交于 2019-12-20 10:24:38
问题 I have a document in Markdown, which incorporates R code via Knitr . For rendering equations I use LaTeX, simply writing its commands in the text. Say I have the following LaTeX code: \begin{displaymath} \mathbf{X} = \begin{bmatrix} 2 & 12\\ 3 & 17\\ 5 & 10\\ 7 & 18\\ 9 & 13\\ \end{bmatrix} \end{displaymath} Which renders me a nice mathematical matrix representation (in square brackets), when I convert everything to PDF (the full workflow is then: RMD -> knitr -> MD -> pandoc -> TeX -> pandoc

Generating LaTeX output from R data frame

徘徊边缘 提交于 2019-12-20 09:53:55
问题 I am running R v2.14.1 on Ubuntu. I am writing a script that will generate a data frame, which represents a table of results. I would like to output this 'table' as a .tex file so that I can create an 'academic publication' quality table, for printing. I have heard of Sweave (and read some overview docs about Sweave) - so I think this is the way to proceeed. However having said that I have not actually seen an example where Sweave outputs a dataframe as a tex file - all of the Sweave examples