latex

How to get makefile to depend on any files inside a folder

旧城冷巷雨未停 提交于 2019-12-11 08:10:57
问题 I have a simple makefile that I use to build some latex files. The syntax looks like this: pdf: thesis.tex chapters/a.tex chapters/b.tex chapters/c.tex latexmk -pdf -pdflatex="pdflatex thesis.tex open: open thesis.pdf The files inside chapters folder can increase further with d.tex , e.tex and may even contain subfolders f\section1.tex , f\section2.tex etc. I manually add all the requried tex files inside my thesis.tex like this which is not a problem. \input{chapters/a.tex} \input{chapters/b

configure org-mode to use one package if compile with beamer another else (article)

痴心易碎 提交于 2019-12-11 08:06:09
问题 I want to use one package if I compile with beamer or another one if I compile with pdflatex (org-latex-pdf-process): if compile-with-beamer: \usepackage{my_beamer_package} else: \usepackage{my_article_package} NB: C-c C-e l P (org-beamer-export-to-pdf) Export as LaTeX and then process to PDF. 回答1: A possible starting point: use the LaTeX macro \@ifclassloaded. More precisely, in your org file use a local package #+LATEX_HEADER: \usepackage{myPackage} and in this package have the following

Paragraph filling for org-mode inside latex environment

旧时模样 提交于 2019-12-11 07:55:50
问题 I started using org-mode to write mathematical papers so I make a heavy use of latex environments such as proof , theorem , lemma , etc. For example I often write \begin{proof} a very long proof follows \end{proof} The problem is that in org-mode the fill-paragraph (or M-q ) doesn't work inside latex environments. This complicates my life because some proofs can be very long, reaching several pages when compiled to pdf, and I am unable to efficiently format them in org-mode. I couldn't find

Infering the size of a minipage from the containing tikz node for rmarkdown

纵然是瞬间 提交于 2019-12-11 07:46:57
问题 This is a follow-up question to Using bullets list in tikz's node label in rmarkdown. I had some TikZ code that works fine in pure LaTex but NOT when I transport it to rmarkdown where the error ! LaTeX Error: Something's wrong--perhaps a missing \item. is raised. This was solved in the answer to Using bullets list in tikz's node label in rmarkdown but another issue arises applying the solution I got in there. You can refer to the original question (Using bullets list in tikz's node label in

run shell script/bash commands in Sublime Text latex build without any file arguments

浪子不回头ぞ 提交于 2019-12-11 06:53:13
问题 I have a sublime text build system for running latex. I am using a shell script (with no arguments) to delete the various extensions that are generated by latex. The problem is that sublime-text thinks filename.tex is the argument to the script. So I tried the following script: { // General settings "target": "make_pdf", "selector": "text.tex.latex", "cmd": ["latexmk", "-e","\\$dvipdf = 'dvipdfmx %O -o %D %S'", "-e", "\\$latex = 'latex %O -interaction=nonstopmode -synctex=1 %S'","-f", "

LaTeX - How to keep parts in the table of contents

こ雲淡風輕ζ 提交于 2019-12-11 06:51:02
问题 I want to create section without numbers using the command \section*{Section Name}, but doing this omits them from the table of contents. The same thing happens using \part*{Part Name}. Is there a way to omit the section number and keep the section title in the table of contents? 回答1: You can add a line to the toc with this command: \addcontentsline{toc}{chapter}{Your Title} 来源: https://stackoverflow.com/questions/2459298/latex-how-to-keep-parts-in-the-table-of-contents

gnuplot epslatex unable to get replot

馋奶兔 提交于 2019-12-11 06:33:38
问题 When I use replot in the epslatex terminal, anything I replot is not showing up in the final output. reset session set terminal epslatex size 5.0in,4in color colortext font ',10' standalone set output 'plots.tex' set size square plot sin(x) replot cos(x) set output When I use , and plot in the same line, I get correct outputs. reset session set terminal epslatex size 5.0in,4in color colortext font ',10' standalone set output 'plots.tex' set size square plot sin(x), cos(x) set output replot is

knitr: Chapter name is the name of R chunk code

余生长醉 提交于 2019-12-11 06:29:23
问题 I want to use the R chunk code output as the Chapter Name but could not figured out how to do this. Below is my minimum working example. \documentclass{book} \usepackage[T1]{fontenc} \begin{document} \chapter{cat( << label=Test1, echo=FALSE, results="asis">>= 2+1 @ ) } Chapter name is the output of R chunk Code. \end{document} 回答1: This works for me << label=Test1, echo=FALSE>>= cn <- 2+1 @ \chapter*{Chapter \Sexpr{cn}} 回答2: In RMarkdown you can use the following code # `r I(1+2)` 来源: https:/

apsrtable for sarlm class

江枫思渺然 提交于 2019-12-11 06:23:25
问题 I love apsrtable() , and have found it somewhat simple to extend to other classes (in particular, I have adapted it for mlogit objects. But for some reason, the apsrtableSummary.sarlm() function doesn't work quite like other hacks I have written. Typically, we need to redefine the coefficients matrix so that apsrtable() knows where to find it. The code for this is "apsrtableSummary.sarlm" <- function (x){ s <- summary(x) s$coefficients <- s$Coef return(s) } We also need to redefine the

Show multiple footnotes in xtable

廉价感情. 提交于 2019-12-11 06:19:50
问题 My question is very similar to this one on showing footnotes in xtable , although the suggested updated solution isn't working for me. I presume this is because I am missing something in my own setup, hence the separate question. I don't think the issue is what is described in this question, as I am using the sanitize.text.function in the print call rather than the xtable call. Below is an image of the PDF output. As can be seen, the actual footnote text does not appear in the PDF output,