latex

LaTeX实用4:伪代码规范(整理)

北慕城南 提交于 2019-12-21 16:40:39
algorithmic和algorithmicx 介绍下algorithmic和algorithmicx,这两个包很像,很多命令都是一样的,只是algorithmic的命令都是大写,algorithmicx的命令都是首字母大写,其他小写(EndFor两个大写)。下面是algorithmic的基本命令 \STATE <text> \IF { <condition> } \STATE { <text> } \ENDIF \FOR { <condition> } \STATE { <text> } \ENDFOR \FOR { <condition> \TO <condition> } \STATE { <text> } \ENDFOR \FORALL { <condition> } \STATE { <text> } \ENDFOR \WHILE { <condition> } \STATE { <text> } \ENDWHILE \REPEAT \STATE { <text> } \UNTIL { <condition> } \LOOP \STATE { <text> } \ENDLOOP \REQUIRE <text> \ENSURE <text> \RETURN <text> \PRINT <text> \COMMENT { <text> } \AND , \OR , \XOR

R stargazer, lme4 and lmerTest incompatibility

杀马特。学长 韩版系。学妹 提交于 2019-12-21 13:11:41
问题 R novice here. I'm having issues working with lmerTest and stargazer . I was following the tutorial here to get stargazer to work with lme4 in R. http://svmiller.com/blog/2015/02/quasi-automating-the-inclusion-of-random-effects-in-rs-stargazer-package/ I ran this example with no issues. library(lme4) library(stargazer) data(cake) summary(M1 <- lmer(angle ~ temp + (1 | replicate) + (1|recipe:replicate), cake, REML= FALSE)) summary(M2 <- lmer(angle ~ factor(temperature) + (1 | replicate) + (1

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

天大地大妈咪最大 提交于 2019-12-21 12:28:18
问题 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}

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

…衆ロ難τιáo~ 提交于 2019-12-21 12:26:30
问题 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}

make LaTeX draw a \hline between each line in tabular without using \hline? [closed]

假装没事ソ 提交于 2019-12-21 07:57:42
问题 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 3 years ago . Is there any obvious or pretty way to have LaTeX automatically put a \hline between each line in a table without having to put a \hline between each line? I thought about creating a command like: \newcommand{\EOL}{\\ \hline} But then I will get non-standard looking tables like this: 3 & 2 & 1 \EOL 1 & 2 & 3 \EOL

From latex math formula to big jpeg file

大城市里の小女人 提交于 2019-12-21 06:08:07
问题 I am wondering whether anyone knows a easy way to convert a latex math formula to a big jpeg file? Here is the latex math formula: \[ \lim_{u\rightarrow 0_+} \int_0^u \ud s \int_{-\infty}^\infty \frac{f(u-s,x-y)}{\sqrt{2\pi s}} \exp\left\{-\frac{y^2}{2s}\right\} \ud y \] Thanks! 回答1: This isn’t really programming related at all, but here’s a way to do this: Use the class standalone in your LaTeX source file. This will produce a document that is exactly as large as needed, and no larger.

suppress section numberings in nbconvert to latex?

我的梦境 提交于 2019-12-21 05:40:55
问题 Is it possible with nbconvert --> latex --> PDF to suppress section numberings? Essentially I would like to keep the simple font size distinctions that the markdown header syntax (#, ##, etc.), and ipynb section headings provide (nbconvert --to latex appears to treat these same), and still use these to define section headings, but without the numberings. Then I also have the option of adding my own numbers manually. I can cope with losing some aspects of general latex document structuring and

R-LaTeX Wide table

跟風遠走 提交于 2019-12-21 05:35:15
问题 I'm writing a report with sweave. I have to put-in a very wide table: from R dim(myData) > 50 60 The R code I wrote to generate the LaTex table is: print(xtable(myData, caption="my wide table", label="tab:myTab", digits=3), tabular.environment="longtable", caption.placement="top", ## floating.environment="sidewaystable", ## a trial size="\\tiny", table.placement="", floating=FALSE) The problem is that the table is too wide for the dimension of the page, so, is there a way to divide the table

Convert Jupyter notebook to PDF - pdflatex not found on PATH

筅森魡賤 提交于 2019-12-21 05:32:15
问题 I'm trying to download my Jupyter notebook as a PDF from the web interface by going to: File -> Download as -> PDF via LaTeX However, I get this error: nbconvert failed: pdflatex not found on PATH I have both pandoc and MacTex installed. Additionally, in the terminal the pdflatex is set. $ which pdflatex /Library/TeX/Distributions/.DefaultTeX/Contents/Programs/texbin/pdflatex I'm running on Mac OS X El Capitan using Jupyter 4.2.0 with Python 2.7.11 回答1: Print it to pdf using your browser

Way to show long division symbol )‾‾‾‾‾‾ in MathJax

纵饮孤独 提交于 2019-12-21 05:22:11
问题 Is there a way to format long division in MathJax so it looks like this: 125 (Explanations) 4)500 4 (4 × 1 = 4) 10 (5 - 4 = 1) 8 (4 × 2 = 8) 20 (10 - 8 = 2) 20 (4 × 5 = 20) 0 (20 - 20 = 0) but obviously correctly formatted? 回答1: Here is a modification of Werner's answer that gets you what you want. It uses MathJax's enclose extension to insert a MathML <menclose> element that handles the long-division symbol. $$ \require{enclose} \begin{array}{rll} 125 && \hbox{(Explanations)} \\[-3pt] 4