latex

Video embedded into pdf with Latex does not play correctly

故事扮演 提交于 2021-01-05 09:11:41
问题 I want to embed an mp4 video (with H.264 codec) into a pdf with Latex, using the media9 package. There are no error messages during compilation. Before activating the video in the pdf, there is a still image (as intended), but after activation, there is just a black window, without the video being played properly. A minimal example to illustrate is given below. It is a shortened version of an Overleaf template for embedding mp4 files into pdf documents with Latex. I have attached the still

string variable as latex in pyplot

感情迁移 提交于 2021-01-02 06:44:26
问题 It is possible to have Latex formatting in pyplot diagrams, i.e. for title, labels etc. #some dummy code plt.plot(x,y,label = r"$a < \gamma$") It is generated by adding an r before the actual latex string. Now, pyplot accepts variables as inputs for strings, i.e. #some dummy code foo = "some fancy label" plt.plot(x,y, label = foo) I would like to combine the two worlds, however the only answer I found on SO is for Julia. How can I make this work? 回答1: The example would look like: foo = r"some

Getting R printed texts to have color esp. in R markdown knits?

感情迁移 提交于 2021-01-02 05:56:34
问题 Very simple question: I love writing R notebooks/markdowns, and with something like highlight: tango I can give background color to codes when I knit my notebook to pdfs. However, I don't know how to give colored backgrounds or colored fonts to printed outputs in R. For example, suppose I have the following chunk. ```{r, echo = FALSE} writeLines("Help") ``` I'd like to see the word Help to be highlighted, say in red font with gray background. How can I achieve this? Many thanks in advance.

Getting R printed texts to have color esp. in R markdown knits?

若如初见. 提交于 2021-01-02 05:56:11
问题 Very simple question: I love writing R notebooks/markdowns, and with something like highlight: tango I can give background color to codes when I knit my notebook to pdfs. However, I don't know how to give colored backgrounds or colored fonts to printed outputs in R. For example, suppose I have the following chunk. ```{r, echo = FALSE} writeLines("Help") ``` I'd like to see the word Help to be highlighted, say in red font with gray background. How can I achieve this? Many thanks in advance.

Make an unbreakable block in TeX [closed]

自古美人都是妖i 提交于 2020-12-29 08:52:14
问题 Closed. This question is off-topic. It is not currently accepting answers. Want to improve this question? Update the question so it's on-topic for Stack Overflow. Closed 10 years ago . Improve this question I want to do something like the following in TeX: \begin{nobreak} Text here will not split over pages, it will remain as one continuous chunk. If there isn't enough room for it on the current page a pagebreak will happen before it and the whole chunk will start on the next page. \end

Make an unbreakable block in TeX [closed]

不羁岁月 提交于 2020-12-29 08:51:59
问题 Closed. This question is off-topic. It is not currently accepting answers. Want to improve this question? Update the question so it's on-topic for Stack Overflow. Closed 10 years ago . Improve this question I want to do something like the following in TeX: \begin{nobreak} Text here will not split over pages, it will remain as one continuous chunk. If there isn't enough room for it on the current page a pagebreak will happen before it and the whole chunk will start on the next page. \end

LaTeX 中的花体字母

坚强是说给别人听的谎言 提交于 2020-12-25 11:58:59
LaTeX 中的花体字母 注意:除 script 花体需要添加额外宏包,其余花体均不需要额外宏包。 1. 添加 Euler 宏包: \usepackage[mathscr]{eucal} \begin{table*} \begin{tabular}{ll} \texttt{"normal"} & ABCDEFGHIJKLMNOPQRSTUVWXYZ\\ \texttt{"blackboard"} &$\mathbb{ABCDEFGHIJKLMNOPQRSTUVWXYZ}$\\ \texttt{"boldface"} &$\mathbf{ABCDEFGHIJKLMNOPQRSTUVWXYZ}$\\ \texttt{"typewriter"} &$\mathtt{ABCDEFGHIJKLMNOPQRSTUVWXYZ}$\\ \texttt{"roman"} &$\mathrm{ABCDEFGHIJKLMNOPQRSTUVWXYZ}$\\ \texttt{"sans-serif"} &$\mathsf{ABCDEFGHIJKLMNOPQRSTUVWXYZ}$\\ \texttt{"calligraphic"}&$\mathcal{ABCDEFGHIJKLMNOPQRSTUVWXYZ}$\\ \texttt{"script"} &$\mathscr

常见content-type对应表

狂风中的少年 提交于 2020-12-17 21:32:48
常使用的几种   种类 文件扩展名 Content-Type(Mime-Type) 2003 Excel .xls application/vnd.ms-excel 2010 Excel .xlsx application/vnd.openxmlformats-officedocument.spreadsheetml.sheet 文本文件 .txt text/plain 图片 .png/.jpg/.gif image/* 页面 .htm/.html text/html 视频 .avi/ .mpg/ .mpeg/ .mp4 video/* 音频 .mp3/ .wav/ audio/* PDF .pdf application/pdf Office 文件扩展名 Content-Type(Mime-Type) .doc application/msword .dot application/msword .docx application/vnd.openxmlformats-officedocument.wordprocessingml.document .dotx application/vnd.openxmlformats-officedocument.wordprocessingml.template .docm application/vnd.ms-word.document

R Sweave (Rnw) won't produce a PDF file - exit code 1

只谈情不闲聊 提交于 2020-12-15 05:16:32
问题 I've recently been learning how to use sweave in R to create PDF files out of Rstudio, and my machine has suddenly stopped being able to create a PDF using sweave. It can still create PDFs in rMarkdown, but it gives the exit code one when it fails to do so in sweave. There are maybe a dozen questions that I've found online that ask similar questions, but none of the answers have helped. I've tried changing the %PATH% in my environment window, I've uninstalled and reinstalled rStudio and

Inkscape “PDF + Latex” export

*爱你&永不变心* 提交于 2020-12-01 10:53:09
问题 I'm using inkscape to produce vector figures, save them in SVG format to export them later as "PDF + Latex" much in the vein of TUG inkscape+pdflatex guide. Trying to produce a simple figure, however, turns out to be extremely frustating. The first figure http://i.stack.imgur.com/jIo3z.png is an example of the figure I would like to export in the form of "PDF + Latex" (shown here in PNG format). If I export this to a PDF figure without latex macros the PDF produced looks exactly the same,