latex

Embed a pdf in a R Markdown file and adapt pagination

假装没事ソ 提交于 2020-01-05 12:30:32
问题 I am finishing my PhD, and I need to embed some papers (in pdf format) in somewhere in the middle of my R Markdown text. When converting the R Markdown into PDF, I would like those PDF papers to be embed in the conversion. However, I would like those PDF papers to be also numbered according to the rest of the Markdown text. How can I do it? UPDATE: New error By using \includepdf , I get this error: output file: Tesis_doctoral_-_TEXTO.knit.md ! Undefined control sequence. l.695 \includepdf

matplotlib not saving pdf w/ latex

为君一笑 提交于 2020-01-05 05:36:07
问题 I am having an issue simular to Error saving matplotlib figures to pdf: 'str' object has no attribute 'decode', but without the cyrillic letters. My code is below: # -*- coding: utf-8 -*- import matplotlib as mpl mpl.rcParams['backend'] = 'pdf' mpl.rc('font',**{'family':'serif'}) mpl.rc('text', usetex=True) mpl.rc('text.latex',unicode=True) import pandas as pd import seaborn as sns import matplotlib.pyplot as plt import numpy as np from matplotlib.ticker import FuncFormatter millionFormatter

How to place labels correctly and use cross-reference in latex to be able to convert to html(5) using pandoc?

白昼怎懂夜的黑 提交于 2020-01-05 04:32:07
问题 Introduction I'd like to create source code in latex in order to produce pdf via pdflatex and html page(s) via pandoc. I use the following source \documentclass[12pt,a4paper]{article} \usepackage[T1]{fontenc} \usepackage[utf8]{inputenc} \usepackage[magyar]{babel} \usepackage{hyperref} \begin{document} \begin{enumerate} \item \label{itm:thefirst} First example point \end{enumerate} This is an example to demonstrate how \textbackslash label\{\} and \textbackslash ref\{\} are not working with

RMarkdown xelatex !Missing & Inserted

不打扰是莪最后的温柔 提交于 2020-01-05 03:57:05
问题 I originally posted with issues here: Rmarkdown with xelatex I have since reinstalled, but now I'm having an entirely new issue. Using the following code (inside a .Rmd file): --- header-includes: - \usepackage{graphicx} output: pdf_document: latex_engine: xelatex --- ```{r} knitr::include_graphics("F:/Big Folder/My Folder/image.png") ``` I get the following error: ! Missing $ inserted. <inserted text> $ l.134 .../Big Folder/My Folder/image} pandoc.exe: Error producing PDF Error: pandoc

Using hex values for colors in LaTex/MathJax

空扰寡人 提交于 2020-01-05 02:59:14
问题 I have a couple variables in my javascript that hold color values, i.e. var color = #ABCDEF I'm trying to use these variables to color some text that I have, but it seems that MathJax doesn't support hex color values. Is there anyway to circumvent this in order to use the variable in the \color? 回答1: You can try \color[HTML]{ABCDEF} . You need to add \usepackage{xcolor} to the preamble. 回答2: it seems that MathJax doesn't support hex color values Sure it does. E.g., \color{#ABCDEF}{x+1} works

xslt 2.0 how replace $ by escaped dollar (for conversion to LaTeX)

让人想犯罪 __ 提交于 2020-01-05 02:58:25
问题 I am new to XSLT. I googled extensively but couldn't figure out how to do the following: I am transforming XML to LaTeX. Of course, LaTeX needs to escape characters such as $ and #. I tried the following in the replace function but it does not work. (They do work without the replace function.) <xsl:template match="xyz:doc"> \subsubsection{<xsl:value-of select="replace( xyz:headline, '(\$)', '\$1' )"/>} ... </xsl:template> <xsl:template match="xyz:doc"> \subsubsection{<xsl:value-of select=

what are the influences after cancelling \hypersetup in org-mode?

我怕爱的太早我们不能终老 提交于 2020-01-04 09:01:35
问题 I make pdf in org-mode with my own preamble, but the PDF or tex file generated always appear the information resulting from: (format "\\hypersetup{\n pdfkeywords={%s},\n pdfsubject={%s},\n pdfcreator={%s}}\n" (org-export-latex-fontify-headline keywords) (org-export-latex-fontify-headline description) (concat "Emacs Org-mode version " org-version)) those cods locate in ~/.emacs.d/org-7.8.11/lisp/org-latex.el I cancelled it to prevent the useless information appearing at the first page of its

Stargazer and gam - how to include the whole summary output?

北城以北 提交于 2020-01-04 01:51:20
问题 When fitting a generalized additive model with smoothed splines stargazer only returns the main effects and not the smooth terms which you can see in summary(pros.gam) . Can stargazer return these as well? Or is there another function or package that can do the job? library(ElemStatLearn) library(mgcv) library(stargazer) pros.gam=gam(lpsa~s(lcavol)+s(lweight)+s(age)+s(lbph)+svi +s(lcp)+gleason+s(pgg45),data=prostate) summary(pros.gam) # Table should include the smooth terms that are visible

Library to convert latex to png in Java

孤人 提交于 2020-01-03 19:14:09
问题 What is the best library to do this? I am surprised this question has not been asked before. Is it impossible? That would be surprising too. Thanks for your help. 回答1: Displaying fancy equations with Java Generate Images for formulas in Java Roughly I'd say your options are: Use one of the Java libraries mentioned for the first question, if they suit the your application and the form of the Latex (e.g., is it whole documents with macros, style files and BibTex or just single equations).

how to replace a character INSIDE the text content of many files automatically?

和自甴很熟 提交于 2020-01-03 11:58:16
问题 I have a folder /myfolder containing many latex tables. I need to replace a character in each of them, namely replacing any minus sign - , by an en dash – . Just to be sure: we are replacing hypens INSIDE all of the tex file in that folder. I dont care about the tex file names. Doing that manually would be a nightmare (too many files, too many minuses). Is there a way to loop over the files automatically and do the replacement? A solution in Python/R would be great. Thanks! 回答1: sed -i -e 's/