latex

Coverpage and copyright notice before title in R bookdown?

给你一囗甜甜゛ 提交于 2020-01-13 12:44:49
问题 Back in March, I asked a question and got an answer to including coverpage in a pdf document rendered by R bookdown: R bookdown - cover page and appendix I tried the solution and came up with the following results: using in index.rmd yaml: output: pdf_document: includes: before_body: frontpage.tex number_sections: yes toc: yes toc_depth: 3 site: bookdown::bookdown_site documentclass: book classoption: letterpaper The title still appeared before the coverpage AND the Chapter 'wording' in

How to justify (to both sides) text in R Markdown when knitting in pdf output

帅比萌擦擦* 提交于 2020-01-13 09:39:29
问题 I have looked for ways to control the alignment of the text, however I could not find anything for PDF outputs. There is an existing answer, but related to HTML output only: How to justify the text to both sides when knitting html in rmarkdown. 回答1: R Markdown should default to using justified text. However, if you only want to export to PDF, we can directly use LaTeX commands within the document.using the standard arguments \centering \raggedright and \raggedleft , as explained here. Here is

MathML to LaTeX conversion

 ̄綄美尐妖づ 提交于 2020-01-12 04:58:07
问题 I'm trying to figure out how to convert a MathML representation of a math equation and convert it to the LaTeX representation of that math equation. So for example... <math> <mrow> <mfrac> <mrow><mi>x</mi></mrow> <mrow><mi>y</mi></mrow> </mfrac> </mrow> </math> ... is a simple stacked fraction and it's LaTeX representation would be... \frac{x}{y} I'm guaranteed that the MathML has no presentational markup because I am constructing the MathML string dynamically and I control how/where the

Footnote spacing in LaTeX

笑着哭i 提交于 2020-01-11 15:19:28
问题 I'm writing my dissertation and the grad school says I need a space between multiple footnotes and also the space between the text and the start of the footnotes is too small. Is there a way to do this? Any help is greatly appreciated. 回答1: \footnotesep is the space between footnotes: \setlength{\footnotesep}{0.5cm} \footins is the space between the text body and the footnotes: \setlength{\skip\footins}{2cm} You might want to play around with the actual numbers, I've just chosen some values

Footnote spacing in LaTeX

纵饮孤独 提交于 2020-01-11 15:19:09
问题 I'm writing my dissertation and the grad school says I need a space between multiple footnotes and also the space between the text and the start of the footnotes is too small. Is there a way to do this? Any help is greatly appreciated. 回答1: \footnotesep is the space between footnotes: \setlength{\footnotesep}{0.5cm} \footins is the space between the text body and the footnotes: \setlength{\skip\footins}{2cm} You might want to play around with the actual numbers, I've just chosen some values

Sphinx docs: Remove blank pages from generated PDFs?

江枫思渺然 提交于 2020-01-11 15:13:32
问题 By default, Sphinx documentation outputs a PDF that's formatted for duplex printing. So there is a blank page between the title page and the TOC, the TOC and the introduction, the introduction and the first section, etc. My users are always going to look at the PDF online. So I would like to remove these blank pages. This seems to be a vexed issue in Sphinx. See this email thread. This user suggests two solutions, but neither work for me. Curiously, the first solution: latex_elements = {

Latex入门

不问归期 提交于 2020-01-11 05:32:37
用什么编辑器和用什么编译以及中文支持问题 看 这篇文章 就可以了。 Latex语法入门 看 这篇文章 和 这篇 就可以了。后面这篇文章澄清了一个谣言, Latex只支持eps格式的图片 还有一篇叫LaTeX数学试卷排版指南.pdf的文章也不错,介绍的很详细。 来源: https://www.cnblogs.com/yfish/p/7241644.html

How to cite within a figure caption w/ rmarkdown native citation?

随声附和 提交于 2020-01-11 04:08:31
问题 In R Markdown, I want a figure caption with a linked citation in R Markdown native citation style [@ref] . However, when I insert the [@hawking_thermodynamics_1983] snippet at the end into the caption, it's throwing just an error: ! Missing $ inserted. <inserted text> $ l.94 ...iontextfoo [@hawking_thermodynamics_1983]} pandoc.exe: Error producing PDF Error: pandoc document conversion failed with error 43 Example : This is my code: --- title: "Untitled" author: "Author" output: pdf_document #

Colorize/highlight values of R ftable() output in knitr/Sweave rapports

試著忘記壹切 提交于 2020-01-11 02:57:11
问题 I am generating a lot of ftable() crosstabulations for a descriptive report. Example: AUS BEL BUL EST FRA GEO GER HUN ITA NET NOR ROM RUS 30- primary 0.06 0.03 0.07 0.03 0.02 0.03 0.03 0.02 0.05 0.03 0.05 0.04 0.02 secondary 0.30 0.09 0.16 0.10 0.10 0.14 0.10 0.16 0.11 0.08 0.08 0.09 0.11 tertiary 0.05 0.07 0.04 0.05 0.07 0.06 0.02 0.04 0.02 0.05 0.06 0.02 0.09 30+ primary 0.07 0.16 0.12 0.07 0.16 0.03 0.05 0.11 0.35 0.21 0.09 0.17 0.03 secondary 0.40 0.20 0.30 0.29 0.25 0.35 0.35 0.34 0.27 0

latex的listings宏包常用设置

夙愿已清 提交于 2020-01-10 08:14:16
\documentclass[UTF-8]{article} \usepackage{listings} \usepackage{color,xcolor} \usepackage{fontspec} \usepackage{xeCJK} \setmonofont[Mapping={}]{Monaco} %英文引号之类的正常显示,相当于设置英文字体 \setsansfont{Monaco} %设置英文字体 Monaco, Consolas, Fantasque Sans Mono \setmainfont{Monaco} %设置英文字体 \setCJKmainfont{微软雅黑} %中文字体设置 %\setCJKsansfont{楷体} %设置中文字体 %\setCJKmonofont{} %设置中文字体 \definecolor{mygreen}{rgb}{0,0.6,0} \definecolor{mygray}{rgb}{0.5,0.5,0.5} \definecolor{mymauve}{rgb}{0.58,0,0.82} \lstset{ backgroundcolor=\color{white}, % choose the background color basicstyle=\footnotesize\monaco, % size of fonts used for