latex

Latex table rotate is not working

独自空忆成欢 提交于 2019-12-13 07:06:40
问题 I am trying to rotate table but I could not do that. See my code below, I tried with rotate, sidewaystable and landscape. Nothing is working for me. Either it gives me error or work like the image. I want to show the table in a single page and rotated. Please help me to make it work. \begin{table*} \centering %\begin{rotate}{90} %\begin{sidewaystable} %\begin{landscape} \caption{Some description} \label{tab:the_table} \begin{tabular}{|c|c|c|} \hline Text A & Text B & Test C \\\hline

Iteratively producing latex tables in knitr

我的未来我决定 提交于 2019-12-13 06:38:38
问题 I'm working on iteratively producing LaTeX tables using knitr. All is well except I'm left with extra markup before each table. Here's a simple example, though this would ideally work as a template for more complex problems, ie different-size tables, varying data sets etc. What can I do to get rid of the extra text before each table? \documentclass{article} \usepackage{setspace, relsize} \usepackage[margin=.5in, landscape]{geometry} \usepackage{pdfpages} \begin{document} <<setup, include

Trouble rendering some latex syntax in MathJax with Jekyll on github pages

瘦欲@ 提交于 2019-12-13 03:39:55
问题 I found that some of latex syntaxes are not rendered with MathJax with Jekyll in my git page. For example, in this post this line: $z = \overbrace{\underbrace{x} \text{real} +\underbrace{iy} \text{imaginary}}^\text{complex number}$ should look like this Some other latex syntax works well, like this What should I add to solve this problem? I guess MathJax is not loading the required library (e.g. \usepackage{amsmath} in the above case). The code of the page is here. The following code shows

How to write complex kable and ggplot in sections (row and column alignment) to pdf using R Markdown?

邮差的信 提交于 2019-12-13 03:22:38
问题 I am trying to knit several kable and ggplot in sections in one page, details are in the minimal and reproducible example below. I have tried cat("\\twocolumn") kable_styling(position = "float_right") \usepackage{multicol} (Previous Question) Below is the code --- title: "Untitled" output: pdf_document classoption: landscape --- \newpage ```{r cars, echo=FALSE, results="asis", fig.width=3, fig.height=2, message=FALSE} library(dplyr) library(knitr) suppressWarnings(library(kableExtra)) library

compiling latex file generated by RStudio

浪子不回头ぞ 提交于 2019-12-13 02:22:55
问题 I am trying to edit the latex file generated by RStudio but it seems the file generated by RStudio does not compile out of the box. Here is the template rmarkdown (edited a little as I want to show code in my slides) --- title: "Untitled" author: "SN248" date: "April 17, 2016" output: beamer_presentation: keep_tex: true theme: "CambridgeUS" --- ```{r setup, include=FALSE} knitr::opts_chunk$set(echo = TRUE) ``` ## R Markdown This is an R Markdown document. Markdown is a simple formatting

Problems with Latex and fancyhdr

岁酱吖の 提交于 2019-12-13 02:07:29
问题 I hope also Latex questions are welcome here on Stackoverflow since it's not really programming related. I have a problem in defining the correct style for the header using the fancyhdr package. What I'd like to achieve is to have On odd pages on the left side the following text "My paper title" On even pages on the right side the text "Firstname Surname" (Replaced with the correct text of course). At the moment I have the following "test" Latex document: \documentclass[a4paper,12pt,T2A

control digits printed by Hmisc::latex on a psych object

徘徊边缘 提交于 2019-12-13 01:47:18
问题 I've produced a comparison of correlation matrices using psych::cortest.mat. I'd like to put the output in a Sweave file for production with knitr. When I use the Hmisc::latex() function, it works, but it also produces about 7 digits for each result, which makes it really unattractive. I could just produce the output with the markup argument within knitr, but all the other tables in my document are more efficiently produced with latex output (results='asis') . Thoughts? #Sample data variable1

RStudio will not write a .bbl file when compiling .Rnw file with citations in natbib

风流意气都作罢 提交于 2019-12-13 01:27:02
问题 I have a .Rnw file (Test.Rnw) in RStudio with citations. The .bib file is in the same folder as the .Rnw file, but when I compile the .Rnw file, no .bbl file is written out and I get the error: There were undefined citations And checking the log, I find, as expected: No file Test.bbl This is the code I'm trying to compile: \documentclass[12pt, oneside]{article} \usepackage{amsmath,amsfonts,amssymb} \usepackage{graphicx} \usepackage{float} \usepackage[sort,comma,numbers,super]{natbib}

In an R Markdown document, “includes” for docx output?

时光毁灭记忆、已成空白 提交于 2019-12-12 22:57:41
问题 In the .Rmd below I have includes: in_header: for pdf output and includes: before_body: for docx output. Is there something analogous for docx output? My current hack is to include the <!--- For DOCX Only ---> code chunk conditionally when producing docx output. But I'd prefer not to have this clutter up the body of my .Rmd and move it out into some sort of preamble-word.tex file. tinytextest.Rmd --- title: "TinyTeX Test" author: "Me" date: "5/3/2019" output: word_document: default html

LaTeX printing only first two pages of a document

风流意气都作罢 提交于 2019-12-12 20:33:08
问题 I am working in LaTeX, and when I create a pdf file (using LaTeX button or pdfLaTeX button or using yap) the pdf has only the first two pages. No errors. It just stops. If I make the first page longer by adding text, it still stops at end of 2nd page. Any ideas? OK, responding to first comment, here is the code \documentclass{article} \title{Outline of Book} \author{Peter L. Flom} \begin{document} \maketitle \section*{Preface} \subsection*{Audience} \subsection*{What makes this book different