latex

R, knitr doesn't respect order of chunks and text

橙三吉。 提交于 2019-12-10 14:38:50
问题 Imagine I knit this Rnw file: \documentclass{article} \begin{document} Table1 <<example,results='asis', echo=FALSE>>= require(xtable) nn <- 15 mydata <- data.frame(A=1:nn,C=nn:1, C=runif(nn), D=rnorm(nn)) xtable(mydata, caption="Table1") @ Table2 <<example2,results='asis', echo=FALSE>>= xtable(mydata, caption="Table2") @ Table3 <<example3,results='asis', echo=FALSE>>= xtable(mydata, caption="Table3") @ \begin{obeylines} Just some text \end{obeylines} \end{document} It's a simple example that

sphinx remove chapter title in my pdf with latexpdf?

梦想与她 提交于 2019-12-10 14:34:13
问题 I generate a documentation from rst to pdf with latexpdf and sphinx. How can I remove chapter title before every chapter? ----------- CHAPTER ONE ----------- 回答1: As noted in the sphinx documentation you can change the latex_documents documentclass to a howto documentclass, which will get rid of the "Chaper" before your section. However, this will also change formatting slightly for the whole build. documentclass: Normally, one of 'manual' or 'howto' (provided by Sphinx). Other document

Getting TeXstudio to work in linux mint: File `url.sty' not found.

旧巷老猫 提交于 2019-12-10 14:14:22
问题 just switched to Linux Mint (previous die hard Windows user). I am having some problems trying to get TeXstudio installed. Sudo apt-get install texstudio Gave me a proper installation (at least, that's what I think), but when I try to Build I get the following error: File `url.sty' not found. \let Some googling couldn't help me any further, can you guys help me with this one? 回答1: For people that end up over here, I made the beginner mistake of not having a compiler for LaTeX on my pc. This

Change LaTeX caption language

三世轮回 提交于 2019-12-10 13:45:35
问题 How could I change the default language so that I get something else instead of "Table" or "Figure" before my captions? 回答1: \usepackage[francais]{babel} 回答2: You can also redefine \tablename and \figurename . 回答3: You can change your document's language using babel package. The captions will be updated automatically. As a bonus, you'll get the correct hyphenation for the chosen language. 回答4: You can redefine \figurename and \tablename by using \renewcommand . For example, you can do this

How can I include hyperlinks in a table within an Sweave document?

若如初见. 提交于 2019-12-10 13:33:15
问题 I have a data frame containing hyperlinks that I would like to present as clickable links using Sweave . I know about xtable , but am not sure how to use it to treat the contents of a data frame as LaTeX commands. 回答1: One strategy is to use the sanitize.text.function from the print function in xtable . Setting sanitize.text.function = function(x){x} causes print simply to echo the contents of the data frame for later interpretation by LaTeX: \documentclass{article} \usepackage{hyperref}

Can I use inline raw LaTeX in reStructuredText

 ̄綄美尐妖づ 提交于 2019-12-10 13:14:19
问题 I am trying to embed a LaTeX variable into some reStructuredText. I know about the ".. raw::" directive, but I want this to be embedded in a paragraph of text. Specifically, I am looking to replicate the \numquestions\ and \numpoints\ variables from the template exam document. I have tried using :raw: \numquestions\ , but this does not seem to be valid. Is there any way of doing this? 回答1: You first have to define your own latex role, which allows you then to embed LaTex directly into

How to get rid of zeros in the section numbering in LATEX report document class?

六月ゝ 毕业季﹏ 提交于 2019-12-10 12:58:22
问题 So I'm writing a report using Latex and the document class I am using is report: \documentclass[a4paper]{report} But for some reason the section numbering is written so that it is preceded with "0.", for example it looks like: 0.1 Introduction 0.2 Theory 0.3 Experimental Method and so on. Can somebody help me get rid of those zeros so that it appears how it is supposed to be? Any help is very appreciated, thanks. 回答1: report assumes you'll be using \chapter s as your main sectional unit. As

To make the output of Markdown Pandoc table clearer

南笙酒味 提交于 2019-12-10 12:23:43
问题 Markdown Pandoc Table ---------------------------------------------------------- Protocol of Treatment ---------------------------------------------------------- PAH is classified into 5 groups. Suspect pulmonary hypertension if patients have dyspnea unexplained by another clinically evident cardiac or pulmonary disorder. Chest x-ray, spirometry, ECG, transthoracic Doppler ECHO Confirm the diagnosis by right heart catheterization. Treat group 1 by giving pulmonary vasodilators and, if these

Wrong column spacing due to multicolumn in latex

孤人 提交于 2019-12-10 11:55:37
问题 in the LaTeX table below, the third column gets too way much spacing due to the long \multicolumn cell in the last line. Can anyone think of a way of getting LaTeX to distribute the additional spacing needed evenly across columns? \documentclass[11pt]{article} \usepackage{booktabs} \begin{document} \begin{table}[htbp] \centering \begin{tabular}{lrrr} \toprule & ICE-GB & ICE-SING & ICE-EA \\ \midrule NP & 619 & 595 & 496 \\ \textbf{Arithmetic mean}& \textbf{1.36} & \textbf{1.33} & \textbf{1.22

Latex: Vertical space before and behind the lists

…衆ロ難τιáo~ 提交于 2019-12-10 11:34:17
问题 I cannot get rid of the vertical space before and behind the lists. I have code like below: \begin{list}{-}{} \setlength{\itemsep}{0pt} \setlength{\parskip}{0pt} \setlength{\parsep}{0pt} \item First item \item Second item \end{list} 回答1: Updated answer: now accounts for both single and multi-line list items. One line items (simple) Itemize without itemizing... Some text that is here and I want to see what it does. \\ \indent$\bullet$\,first item \\ \indent$\bullet$\,second item \\ Some text