latex

Use isotope latex-package inside Rnw (r-exams)

有些话、适合烂在心里 提交于 2021-01-28 21:02:53
问题 I want to load and use isotope package in my .Rnw file: \exname{foo} \extype{schoice} \exsolution{0001} \usepackage{isotope} \begin{question} Foo \isotope[A][Z]{H}\ bar \begin{answerlist} \item a \item b \item c \item d \end{answerlist} \end{question} But when I render it into Moodle's XML ( exams2moodle ) the \isotope disappear and appears only Foo bar . I'm using MathML rendering. How can I load and use correctly? 回答1: This short answer is: There is no way (that I know of) of rendering the

Create Matlab figures in LaTeX using matlabfrag or alternatives

廉价感情. 提交于 2021-01-28 19:28:24
问题 I want to include Matlab figures into latex preferably with vectorised formats but with LaTeX MATLAB fonts for all text. I have been using the MATLAB function matlab2tikz which worked perfect for simple figures, but now my figures have too many data points which cause an error. So matlab2tikz is not suitable. I've been looking at matlabfrag which I think will accomplish what I want, but when I run the script in LaTeX as detailed by the user guide it has an error File not found . This is my

Latex symbols in pandas dataframe

妖精的绣舞 提交于 2021-01-28 19:06:47
问题 I have a dataframe that I'm gonna use some special latex symbol for its columns and indeces. Something like this : pd.DataFrame({"a":[1,2,3],"b":[4,5,6]}) With a small difference that instead of a and b as the columns I want to have $\diamond$ and $\dagger$ symbols respectively. Any kind of help would be appreciated. 来源: https://stackoverflow.com/questions/53377554/latex-symbols-in-pandas-dataframe

Pandoc Markdown to Latex PDF: table merges rows in single row?

|▌冷眼眸甩不掉的悲伤 提交于 2021-01-28 18:24:25
问题 Consider this example for test.md Markdown file: --- title: "Testing" author: Bob Alice date: July 07, 2010 geometry: margin=2cm documentclass: extarticle fontsize: 12pt output: pdf_document --- Here is a test of a table: +----------+-------------------+-----------------+ | Box name | Another parameter | The IP address | +==========+===================+=================+ | Test 1 | random-string-01 | 10.0.0.20 | | Test 2 | random-string-02 | 10.0.0.30 | +----------+-------------------+-------

Stargazer: changing line style

混江龙づ霸主 提交于 2021-01-28 17:43:31
问题 Is is possible to change line style in stargazer table in Rstudio, or does one need to change if "by-hand" in latex source code: for example: library(stargazer) library(dplyr) mtcars[1:10, ] %>% stargazer(type = "text", summary = F) if I want last line to be double line, do I have to change it in latex code or can it be done in Rstudio? 来源: https://stackoverflow.com/questions/60636700/stargazer-changing-line-style

R gt package: error in latex (“there's no line here to end”)

半腔热情 提交于 2021-01-28 12:40:32
问题 I am trying to include a table generated with the gt() function in a tex file. I create a .Rnw file, then weave it with knitr and compile with pdflatex. During compilation I get an error: "there no line here to end", caused by a newline inserted by gt() in the table header. This is a MWE: \documentclass{article} \usepackage[utf8]{inputenc} \usepackage{booktabs} \usepackage{longtable} \usepackage{caption} \begin{document} <<setup, include=FALSE>>= library(knitr) library(tidyverse) library(gt)

Rotating a table in PDF output from RMarkdown with more than one page

半腔热情 提交于 2021-01-28 12:01:18
问题 I want to rotate a wide table in my PDF output. I came across this fantastic question, but my table is longer. When I copy/paste one of the examples shown in that question, it works nice using RMarkdown. library(kableExtra) kable(iris[1:5,], format = "latex", booktabs = TRUE) %>% kableExtra::landscape() However, if we remove the subsetting we see that the table exceeds the dimension of the page. library(kableExtra) kable(iris, format = "latex", booktabs = TRUE) %>% kableExtra::landscape() So

Manually indent references in an R Markdown document

廉价感情. 提交于 2021-01-28 10:40:38
问题 I am trying to manually indent references in an R Markdown document. It is for a CV and includes things that I don't presently have in BibTeX format. Here is an example: --- title: "Untitled" author: "Joshua Rosenberg" date: "10/20/2018" output: pdf_document: default html_document: default --- ### Journal Article \begingroup \setlength{\parindent}{-0.2in} \setlength{\leftskip}{0.2in} \setlength{\parskip}{8pt} Blois, M. S. (1958). Antioxidant determinations by the use of a stable free radical.

RStudio: Disable output of a code in Source Window while writing RMarkdown Document

浪子不回头ぞ 提交于 2021-01-28 09:27:18
问题 I recently updated my RStudio and while writing an R Markdown document in the Source Window, whenever I run a code in a chunk of the RMD, the output is shown in the source window itself in the following manner. It gets too messy when there are huge plots. Would like to disable this feature if possible and revert back to good old style of displaying output in the Console/Plot viewer window only. Output executed and visible below the Chunk in the Source Window Thanks 回答1: Try this in Rstudio.

How can I get block quotes inside org-mode footnotes?

好久不见. 提交于 2021-01-28 02:41:51
问题 Footnotes in org-mode are annoyingly different from the normal non-footnote environment. One difference is that one has to use "\par" instead of blank lines to separate paragraphs. Annoying, but at least it works. Another difference is that they don't seem to work with block quotes ("#+BEGIN_QUOTE" and "#+END_QUOTE"). Since I am mostly interested in exporting to Latex, I tried just using Latex's "\footnote" command instead of the org-mode "[fn:: ... ]" syntax. But that did not help. I got a