latex

How do I create a new Beamer environment with a verbatim environment?

生来就可爱ヽ(ⅴ<●) 提交于 2019-12-22 18:21:32
问题 I'm creating a Beamer presentation that has a lot of example LaTeX in it, which has to go in a verbatim environment. I'm getting tired of typing \begin{example} \begin{verbatim} Verbatim Text \end{verbatim} \end{example} I wish to create a new command or environment that will shorthand this for me. I also need this for blocks and theorems, since I'm using those frequently as well. But if I can figure it out for examples, it should be easy to translate to another example. I can't create a new

Sublime Text 2 LatexTools not launching SumatraPDF

大兔子大兔子 提交于 2019-12-22 14:14:53
问题 I'm trying to run the LaTexTools plugin in Sublime Text 2.0.2, build 2221. I'm running a 64-bit, Windows 8.1 computer. LaTexTools is installed and working - it produces a compiled PDF, which is viewable in SumtraPDF and Adobe Reader if I open it manually from the windows folder location. However after building the Tex file, the PDF does not automatically launch. When I try to shift the view to the PDF, Sublime Text throws the following error: Cannot launch Viewer. Make sure it is on you PATH.

Sublime Text 2 LatexTools not launching SumatraPDF

强颜欢笑 提交于 2019-12-22 14:14:33
问题 I'm trying to run the LaTexTools plugin in Sublime Text 2.0.2, build 2221. I'm running a 64-bit, Windows 8.1 computer. LaTexTools is installed and working - it produces a compiled PDF, which is viewable in SumtraPDF and Adobe Reader if I open it manually from the windows folder location. However after building the Tex file, the PDF does not automatically launch. When I try to shift the view to the PDF, Sublime Text throws the following error: Cannot launch Viewer. Make sure it is on you PATH.

Why does \\ not break lines in this R markdown example?

帅比萌擦擦* 提交于 2019-12-22 11:35:12
问题 The file ./vignettes/foo.Rmd in an R package contains: --- title: Foo author: Marius Hofert vignette: > %\VignetteEngine{knitr::rmarkdown} %\VignetteIndexEntry{Foo} --- \[ \begin{align} X_t &= \mu_t + \sigma_t Z_t\\ \mu_t &= \mu + \sum_{k=1}^{p_1} \phi_k (X_{t-k}-\mu) + \sum_{k=1}^{q_1} \theta_k (X_{t-k}-\mu_{t-k})\sigma_t^2\\ &= \alpha_0 + \sum_{k=1}^{p_2} \alpha_k (X_{t-k}-\mu_{t-k})^2 + \sum_{k=1}^{q_2} \beta_k \sigma_{t-k}^2. \end{align} \] However, this is the output: So the line breaks

Converting webGL html to SVG

夙愿已清 提交于 2019-12-22 10:57:40
问题 I am using R, with the misc3d and rpanel libraries, to create a 3d image in webGL. I then need to embed the image into a PDF via Latex. The 3d image renders fine and looks great - but I'm thinking I need to convert the webGL HTML file into an SVG or some other kind of vector graphics file which can be embedded in Latex. Any suggestions on how to accomplish this? 回答1: Maybe I am wrong but this way doesn't make sense to me. You have 3D coordinates You render objects based on 3D coordinates to a

Latex: \bibliographystyle{abbrv} order citations based on appearance [closed]

懵懂的女人 提交于 2019-12-22 10:56:38
问题 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 4 years ago . I am using Latex's \bibliographystyle{abbrv} command for references. But the order of citations is not in the sequence they appear in the document. Is there anyway, I can get citations in the order they appear in my document using abbrv style? Thanks! 回答1: The sorting=none option disables sorting: \usepackage

How to Parse LaTex file

十年热恋 提交于 2019-12-22 10:30:27
问题 I just finished to write the summary for calculus in Latex. The main problem now is that the files contains many things I don't really need now. The .tex files contains many definitions and theorems that i need to study by heart. The definitions have their own definition in the tex file, so any definition in the file will start with: \begin{definition} and ends with \end{definition} And the same for theorems. I need to write something to take out whatever is inside the \begin{}...\end{} . For

Increment section numbers in PDF output

百般思念 提交于 2019-12-22 09:59:36
问题 I'm trying to increment the section headers in my rMarkdown (PDF output) file by 1. Instead of # First resulting in 1 First , I'd like 2 First. I found a way to define the offset in html_output using the following syntax, but it doesn't work for pdf_output. --- title: "Untitled" author: "author" date: "date" output: html_document: toc: true pandoc_args: [ "--number-sections", "--number-offset=1" ] --- # First Header # First SubHeader This results in 2 First Header 2.1 First Subheader However,

header width on the last page of the chapter

笑着哭i 提交于 2019-12-22 09:46:58
问题 I'm trying to turn off marginpar when starting a new multicols environment with this new environment, which uses the multicols and chngpage packages: \newenvironment{multi}[1]{% \newlength{\newtextwidth}% \setlength{\newtextwidth}{\marginparwidth}% \addtolength{\newtextwidth}{-1cm}% \addtolength{\headheight}{.5cm}% \let\oldheadrule\headrule% \addtolength{\headwidth}{\newtextwidth}% \begin{adjustwidth}{}{-\newtextwidth}\begin{multicols}{#1}}% {\end{multicols}\end{adjustwidth}} Which works

Extract only body text from arXiv articles formatted as .tex

ぐ巨炮叔叔 提交于 2019-12-22 09:22:03
问题 My dataset is composed of arXiv astrophysics articles as .tex files, and I need to extract only text from the article body, not from any other part of the article (e.g. tables, figures, abstract, title, footnotes, acknowledgements, citations, etc.). I've been trying with Python3 and tex2py, but I'm struggling with getting a clean corpus, because the files differ in labeling & the text is broken up between labels. I have attached a SSCCE, a couple sample Latex files and their pdfs, and the