latex

How can I omit interactions using stargazer or xtable?

随声附和 提交于 2019-12-04 08:19:40
Is it possible to omit interactions in stargazer using the omit option? Normally I would write the variable name into the omit=c('varname') but in the case of an interaction I do not know what to write. Any hints on that? How do you solve this problem in other packages like xtable ? \documentclass{article} \begin{document} %Load dataset and run regression << lm, echo=FALSE >>= load('dataset.RData') library(stargazer) lm1 <- lm(y~ x + factor(v)*z ,data=dataset) @ << table_texstyle, echo=FALSE, comment=NA, results='asis' >>= stargazer(lm1 ,omit=c('???'), omit.labels=c('Omitted interactions'),

How do I put a question mark above \leq?

南楼画角 提交于 2019-12-04 08:17:05
问题 How can I put a question mark above a less-than-or-equal-to symbol( \leq ) in LaTeX? 回答1: You can use stackrel : \begin{equation} 2 \stackrel{?}{\le} 3 \end{equation} \end{document} Or, if you use the amsmath package, you can use overset as follows: \documentclass{article} \usepackage{amsmath} \begin{document} \begin{equation} 2 \overset{?}{\le} 3 \end{equation} \end{document} 回答2: \stackrel{\text{\tiny ?}}{=} 回答3: Use the accents package. You can do more fun stuff with TeX primitives, but

inset \\footnote{} into header with xtable and tabular.environment

心不动则不痛 提交于 2019-12-04 07:46:50
Can I control the add.to.row command in xtable to place an \footnote{} in the LaTeX table output header? This is how far I've gotten it. (I would like to find a solution using xtable and not `Hmisc') require(xtable) x <- matrix(rnorm(60), ncol = 10) x.big <- xtable(x,label='tabbig', caption='Example of longtable') names(x.big) <- LETTERS[1:10] print(x.big,tabular.environment='longtable',floating=FALSE, add.to.row = list(pos = list(seq(1,nrow(x.big), by = 2), 0, 1), command = c("\\rowcolor[gray]{.95} ", "\\hline \\endhead ", "\\footnote{This is the first footnote that I would like to have in

glossaries package and footnote in LaTeX

这一生的挚爱 提交于 2019-12-04 07:40:40
I am currently stuck, having two separate glossaries: main & acronyms . Acronyms glossary prints footnotes on first use in the text, but main glossary does not. Is there any way to make any other glossary than acronyms to print footnote on first use of the term? I don't get how to do it. Here is the code example compiled with TeXnic Center and MiKTeX 2.7: \documentclass{article} \usepackage{index} \usepackage[toc,style=long3colheaderborder,footnote,acronym]{glossaries} \makeindex \makeglossaries \newglossaryentry{appdomain}{name={application domain}, description={app Domain Description...}}

I've heard that LaTeX is Turing complete. Are there any programs written in LaTeX?

故事扮演 提交于 2019-12-04 07:36:44
问题 It's possible to do interesting things with what would ordinarily be thought of as typesetting languages. For example, you can construct the Mandelbrot set using postscript. It is suggested in this MathOverflow question that LaTeX may be Turing-complete. This implies the ability to write arbitrary programs (although it may not be easy!). Does anyone know of any concrete example of such a program in LaTeX, which does something highly unusual with the language? 回答1: In issue 13 of The Monad

Two statements next to curly brace in an equation

狂风中的少年 提交于 2019-12-04 07:29:18
问题 I want to write an equation with one curly brace ( { ) on the right hand side and, next to the curly, two statements in two different lines. How do I do it? Thanks. 回答1: You can try the cases env in amsmath. \documentclass{article} \usepackage{amsmath} \begin{document} \begin{equation} f(x)=\begin{cases} 1, & \text{if $x<0$}.\\ 0, & \text{otherwise}. \end{cases} \end{equation} \end{document} 回答2: That can be achieve in plain LaTeX without any specific package. \documentclass{article} \begin

How do I remove blank pages coming between two chapters in Appendix?

北城余情 提交于 2019-12-04 07:27:24
问题 Is there a way to remove blank pages appearing between two chapters, in Appendix? 回答1: Your problem is that all chapters, whether they're in the appendix or not, default to starting on an odd-numbered page when you're in two-sided layout mode. A few possible solutions: The simplest solution is to use the openany option to your document class, which makes chapters start on the next page, irrespective of whether it's an odd or even numbered page. This is supported in the standard book

Inline math mode on iPython notebook

丶灬走出姿态 提交于 2019-12-04 07:12:02
In iPython notebook, how can I write a mathematic formula such as r^2 in a line (inline math mode in latex vocabulary). ie. Is it possible to not go on a new line when the formula is printed. If like in LaTeX, it should be \(r^2\) but it doesn't work... Thanks for your help ! In a markdown cell you can use $s, e.g. $r^2$. This requires MathJax from CDN or a local MathJax installation. If you have an internet connection it should work right out of the box. see e.g. Typesetting Equations example notebook 来源: https://stackoverflow.com/questions/19412644/inline-math-mode-on-ipython-notebook

math in axes labels for gnuplot (epslatex terminal) not formatted correctly

拈花ヽ惹草 提交于 2019-12-04 06:38:12
问题 Using the following script in gnuplot (v 5.0) to generate a graph set terminal epslatex unset key set xlabel "$\zeta$" set ylabel "$\rho$" set output "strange_graph.tex" plot sin(x) set terminal wxt set o along with a latex document to include it, \documentclass{article} \usepackage{amssymb} \usepackage{graphicx} \begin{document} \begin{figure} \begin{center} \include{strange_graph} \end{center} \end{figure} \end{document} the Greek letters rho and zeta do not appear on the axes, and

Latex Formulas or symbols in table cells using knitr and kableExtra in R-Markdown,

丶灬走出姿态 提交于 2019-12-04 06:25:24
Thanks to jaySf I was able to create a pdf file containing beautiful tables with footnotes showing formulas and symbols with R Markdown, Latex, knitr and kableExtra (below his example): --- title: "Untitled" output: pdf_document --- ```{r tab} library(knitr) library(kableExtra) df <- data.frame(v1=rnorm(6), v2=runif(6), v3=rbinom(6, 1, .33), row.names=LETTERS[1:6]) kable(df, "latex", align="c", booktabs=TRUE) %>% footnote(general=c("$a^2+b^2=c^2,$", "$\\\\sigma^2=\\\\frac{1}{n-1}\\\\sum_{i=1}^n(x_i-\\\\bar{x})^2;$", "1,000 \\\\$;", "100\\\\%."), number=c("Hello\ there! \\\\textit{Hello\ there!