latex

Change size of section titles in R Markdown PDF

心不动则不痛 提交于 2019-12-26 02:44:34
问题 Is there a way to change the font size of text of headings in R Markdown? I know how to number the sections of the article; however, in terms of formatting, the font size of the sections that are numbered 1., 2., 3... is too large . As a workaround, I have been using lower-level headers ### Introduction , but these have the wrong numbering. Here is a basic example: --- output: bookdown::pdf_document2 --- # This is too big ### This is the right size but are labelled as 1.0.1 回答1: You can place

Change size of section titles in R Markdown PDF

喜夏-厌秋 提交于 2019-12-26 02:43:09
问题 Is there a way to change the font size of text of headings in R Markdown? I know how to number the sections of the article; however, in terms of formatting, the font size of the sections that are numbered 1., 2., 3... is too large . As a workaround, I have been using lower-level headers ### Introduction , but these have the wrong numbering. Here is a basic example: --- output: bookdown::pdf_document2 --- # This is too big ### This is the right size but are labelled as 1.0.1 回答1: You can place

how to perform automated Unix input?

淺唱寂寞╮ 提交于 2019-12-25 13:09:44
问题 How can you set a string to be used instead of standard input? For example, when running the latex command in Unix it will always find some trivial errors, to skip through all errors you have to enter "r" into the command line (I now know that with latex specifically you can use -interactionmode nonstopmode, but is there a more general solution to do this?) Is there anyway to specify that this should be done automatically? I tried redirecting standard input to read from a file containing "r\n

single style sheet across multiple knitr documents [closed]

孤人 提交于 2019-12-25 09:35:13
问题 Closed . This question needs to be more focused. It is not currently accepting answers. Want to improve this question? Update the question so it focuses on one problem only by editing this post. Closed 5 years ago . I am new to knitr , and I am looking to use it to write many knitr documents which use the same shared "style sheet" for consistency. I am hoping to write my phd thesis appendices in knitr/LaTeX . I am in the process of creating a number of different statistical models which I

rmarkdown::render to compile LaTeX documents

大兔子大兔子 提交于 2019-12-25 09:14:24
问题 This example LaTeX file compiles just fine for me using Rstudio, TexShop, and pdflatex example.tex . But rmarkdown::render does not work. > rmarkdown::render("example.tex", output_format = "pdf_document") /usr/local/bin/pandoc +RTS -K512m -RTS example.utf8.md --to latex --from markdown+autolink_bare_uris+ascii_identifiers+tex_math_single_backslash --output example.pdf --template /Library/Frameworks/R.framework/Versions/3.3/Resources/library/rmarkdown/rmd/latex/default.tex --highlight-style

Implementaion of particular cases in a mathtext to wxbitmap function

放肆的年华 提交于 2019-12-25 04:31:22
问题 I am displaying a bitmap like this using the code : mt =r'$\frac{%.5fx^{2} + %.5fx + %.5f}{%.5fx^{2} + %.5fx + %.5f}$'%(self.z1[-3],self.z1[-2],self.z1[-1],self.z3[-3],self.z3[-2],self.z3[-1]) bm = mathtext_to_wxbitmap(mt) self.picture.SetBitmap(bm) Here the function mathtext_to_wxbitmap is implemented as : from matplotlib.mathtext import MathTextParser mathtext_parser = MathTextParser("Bitmap") def mathtext_to_wxbitmap(s): ftimage, depth = mathtext_parser.parse(s, 150) return wx

How to determine the arrangement of the polynomial when displaying it with latex?

二次信任 提交于 2019-12-25 01:49:45
问题 I am not sure if it is an issue with my python code or with the latex but it keeps rearranging my equation in the output. Code: ddx = '\\frac{{d}}{{dx}}' f = (a * x ** m) + (b * x ** n) + d df = sym.diff(f) df_string = tools.polytex(df) f_string = tools.polytex(f) question_stem = f"Find $_\\displaystyle {ddx}\\left({f_string}\\right)$_" output: In this case a = 9 , b = -4 , c = 4 , m = (-1/2) , n = 3 and I want the output to be in the order of the variable f. I have tried changing the order

Typesetting Math using MathJax for IPython Notebook Web page

青春壹個敷衍的年華 提交于 2019-12-25 01:36:48
问题 I chose to learn to write mathematical expressions in IPython Notebook and sat to explore learning resources. I found this official link. I reproduced the whole tutorial on my IPython NoteBook locally and then published it on my website. I also explained the whole struggle I went into while trying to achieve this in my blog post. Unfortunately, whatever I do, I am not able to get the web page render/display the math expressions at all . I am not sure why the whole notebook failed to show the

Include figure labels in R markdown for side by side plots

柔情痞子 提交于 2019-12-25 01:19:02
问题 In my rmarkdown document, I want to include plots side by side to save space. For example, I want to include: plot(rnorm(100)) hist(runif(100)) or plot(rnorm(100)) hist(runif(100)) I don't really care if there is one caption for both subplots or one caption for each subplot. I just really want to include figures side by side and have some way to refer to them (Figure 1, etc). Does anyone have suggestions? I have this in my header: header-includes: - \usepackage{subfig} When I don't have "fig

subprocess.Popen failing in macOs High Sierra 10.13.6

假如想象 提交于 2019-12-25 01:18:00
问题 Good morning. I'm using the following code to generate pdf documents with LaTeX. cmd = ['pdflatex','-interaction','nonstopmode', name + '.tex'] proc = subprocess.Popen(cmd, stdout = subprocess.PIPE, stderr = subprocess.PIPE) proc.communicate() Variable name is, obviously, the name of a file previously written, and I have perfectly checked that the file exists and it's valid. However, using this code in macOs High Sierra 10.13.6 gives me the following error in the second line ( proc = ... ):