Tag Info

New answers tagged

3

The character # in the link defined in the caption needs to be escaped with a double backslash. Try this: \documentclass{article} \usepackage{hyperref} \begin{document} <<TestPlot, fig.cap="\\href{http://amor.cms.hu-berlin.de/~schulzgu/gentri/\\#mieteaenderung}{If you escape the character \\# in the link with a double backslash, then everything is ...


11

It is also easy with pgfplots \documentclass{standalone} \usepackage{pgfplots} \pgfplotsset{compat=1.12} \begin{document} \begin{tikzpicture} \begin{axis} \addplot+[domain=0:360,samples=101,no marks] ({sin(x)},{cos(3*x)}); \end{axis} \end{tikzpicture} \end{document}


9

I think the best way to achieve this is the following: Add a line TEXMFDISTRO = /usr/share/texmf to /usr/local/texlive/2015/texmf.cnf, creating it if it is not present. Copy the definition of TEXMF and TEXMFDBS from /usr/local/texlive/2015/texmf-dist/web2c/texmf.cnf to /usr/local/texlive/2015/texmf.cnf Add TEXMFDISTRO between TEXMFLOCAL and !!$TEXMFDIST in ...


1

As a longer comment, I have no problems here \documentclass[a4paper]{memoir} \usepackage{listings} \lstset{basicstyle=\ttfamily} \begin{document} \begin{lstlisting}[language=R] n<- c(10, 15, 20, 35) w <- c(300, 500, 700,100) i <- c(1, 1, 2, 2) j <- c(1, 2, 1, 2) beta <- c(1, 1) for (iter in 1:20) { alpha <- ...


0

I do not know where to find simplemargins so I've commented that out. I still get compilation errors. However, here are some hints: \hypersetup needs to be in the preamble: right now, it complains that you are setting things up too late and it is ignoring e.g. colorlinks (if it still works, that is just because that's default); page layout needs to be done ...


2

The problem comes from the fact that you are using \mathbb in your y label, and the mathbb fonts require some math font to be loaded. In this case, amsfonts will do the trick, so you have to tell TikZdevice to load that package. To do that use: options(tikzLatexPackages =c(getOption( "tikzLatexPackages" ),"\\usepackage{amsfonts}")) You can add as ...


4

First, short of calling R (which some packages can do), no tex-based solution is going to be able to imitate the brevity of the R command for statistical analysis; that is one of R's strong points. That having been said, here's an attempt to redo your first image (including the statistical analysis) using Asymptote. Note that the statistical analysis ...


1

Have a look at the pgfplots package. It's probably easiest to compute the regression plane in R. A minimal example (without adornments) to get you started is below, where try.dat contains the data you provided. \documentclass{article} \usepackage{pgfplots} \begin{document} \begin{tikzpicture} \begin{axis} \addplot3[only marks] table[x index=2, y ...


0

Ok so thanks to Adam's help, I was able to see there actually is a workaround for this. However, it involves a fair bit of tweaking in order to make the chunks appear the same way as my other chunks do. So for now, my solution was to set tidy=FALSE and eval=FALSE in the chunk options, and put this in the chunk: boxplot(fumeurs$imc, horizontal=TRUE, ...


1

RStudio by default uses Sweave for .Rnw files and adds the line \SweaveOpts{concordance=TRUE} after \begin{document}. Set "Sweave" from Global or Project Options (from the Tool menu) to specify knitr processing instead of Sweave.


1

TeX is a text for knitr, so you can use any text-generating function, e.g. cat(). To include the text into the document, add echo=FALSE, results='asis' to the chunk options, e.g. <<echo=FALSE,results="asis">>= title="Introduction" cat(paste("\\section{",title,"}",sep="")) @ which adds to your document \section{Introduction}


0

Add $$ around the number, which was written out in scientific notation by knitr. $`r f$null.chisq`$


1

When converting from Sweave to knitr, there are some syntax differences. If you have running Sweave code blocks in an *.Rnw file then you can. Open R Change directory to the location of the *.Rnw file Load the package knitr with library('knitr') Now run the command Sweave2knitr("*.Rnw") This will create a file called *-knitr.Rnw that now has correct knitr ...



Top 50 recent answers are included