FAQ Database Discussion Community

Generating LaTeX tables instead of text in Rstudio

r,latex,rstudio
I am new to latex, and would like to generate PDF tables instead of text so my example is: in my METHOD.tex file I have this text: In the first group there were: AAA: items: BBB: items2 and: CCC: items3. We assessed: EEE: implementations. Of the total: VVV: objects to...

how to use cleveref package to get Fig. in latex

latex
When I use the cleveref package in latex, if I use \cref{fig1}, I got fig. 1 and if I use \Cref{fig1} I got Figure 1. But what I really want is Fig. 1. How can I do that?

Preserve line breaks in title using pandoc

latex,markdown,pandoc
Consider the following title block in pandoc-flavored Markdown: % Higgelty Pigglety Pop! or There Must Be More to Life % Maurice Sendak Here, line breaks are part of the title. It is possible to reformat the title in order to insert it into regular text flow, e.g. "Higgelty Pigglety Pop!...

vertical line between latex minipages

latex,markup
right now I have a latex section that looks like \begin{minipage}{0.35\textwidth} %left column ... \end{minipage} \hfill \begin{minipage}{0.55\textwidth} %right column ... \end{minipage} This makes a nice looking two column layout, but I would like to add a vertical bar between the two minipages (where I currently have \hfill). What is the...

Latex how to quote command

latex
Could you please help me, how to quote command in Latex? for example In my work I describe what "\usepackage{tikz}" does,but it compile me as command and show as an error, not as part of my text.

Extract average model from MuMIn for latex output

r,latex,stargazer,texreg
I'm trying to extract two different averaged models from MuMIn for output to latex via texreg or stargazer. I'd like to have one table where I can compare two species' response to different sets of abiotic variables, that looks the same as one created from two model objects using glmtable...

Using latex in Python(matplotlib)

matplotlib,latex
I was trying to use latex to label my plot, some work fine, like: plt.xlabel('$\omega$') plt.ylabel('$\mathcal{F}g$') plt.legend(('$t_{H}=10$', '$t_{H}=20$'), loc = 'best') but this one does not work: plt.title('$\frac{1}{\sqrt \pi t_{H}} \exp(-(\frac{t}{t_{H}})^{2})$') it keeps giving me this error: File "C:\Python27\lib\site-packages\matplotlib\mathtext.py", line 2049, in raise_error raise ParseFatalException(msg + "\n" +...

How to add a math character (lozenge) to a ggplot title

r,ggplot2,latex
I am trying to add a \lozenge to a ggplot2 title. Some example code would be: tmp = data.frame(x = rnorm(100), y = rnorm(100)) ggplot(tmp, aes(x, y)) + geom_point() + ggtitle(expression(lozenge)) But I cannot get the lozenge to appear. It simply prints the word lozenge. I also need to be...

Knitr preamble error results in “pandoc document conversion failed with error 43”

r,latex,knitr,rmarkdown,tex
Rstudio Version 0.99.441; Windows 7 enterprise; knitr 1.10.5; MiKTex 0.4.5 r.1280 (2.9 64-bit) I have a an error on my office computer when trying to knit PDF's in Rstudio, there are no problems knitting to HTML or word. The problem may be related to updates because knitting used to work...

How can I output this table with indexes in latex?

latex
How can I outputthis table exactly like that in LaTeX? I'm using the latest versions of WindEdt and LaTeX. Thank you....

In Emacs: how to reference latex equation in text by its number .dvi?

emacs,latex,equation
Suppose, I use Emacs to write a function in latex: $$\label{eq:myeq} x=2y$$ that gives me x = 2y (1) in a resulting .dvi. And suppose I have dozens of such equations. Here is the problem: if I have to reference this equation but don't remember its name I...

How to use greek letters in fig.caption using RMarkdown?

latex,rmarkdown,caption
This code produces an error when I try to knit a pdf using RMarkdown in RStudio. How can I write a greek letter in fig.caption as for example $\beta$? --- title: "Untitled" author: "SB" date: "Thursday, January 29, 2015" output: pdf_document: fig_caption: yes --- {r var, echo=FALSE, fig.cap="Cars variation rate...

Latex \newcommand in kramdown

github,latex,jekyll,kramdown

texvc does not render latex math in Mediawiki

latex,mediawiki,mediawiki-extensions
I have the Math extension installed in my MediaWiki 1.19. After I updated Ubuntu Server from 12.04 to 14.04 something seems to have messed it up and it has stopped working. Basically I get the following error when I try to display anything between the $and$ tags: Failed...

pyreport LaTeX formulae not working

python,ubuntu,latex,pyreport

What does this required empty parameter mean, when defining something?

latex
\newenvironment{nameOfEnvironment}[1][]% Can someone explain the empty bracket?...

split an equation with multicols on

compiler-errors,latex,equation,multicol
I would like to split my large equation in two column. But my file fails to compile when I try to use \{amsmath} and then split, multline, etc... The error says: Package amsmath Error: \begin{multline} allowed only in paragraph mode. \begin{multline} Does someone knows how to split a large equation...

Converting Tex string in Tex number

string,numbers,latex,tex

RStudio internal PDF viewer

latex,rstudio
Over RStudio documentation, it mentions an internal PDF viewer (using PDF.js): https://support.rstudio.com/hc/en-us/articles/200552066-PDF-Preview-and-SyncTeX I have no such option. Only "Evince" or "No Preview". Using Ubuntu / RStudio 0.98.1102. How do I activate the internal viewer?...

kable() in knit pdf appears oversized

r,table,pdf,latex,knitr
I am using the kable() function to output a table in a Rmd knit pdf document. I am however experiencing an issue with it. When I knit pdf, the table that it's outputting is oversized by width and ends-up being cropped. Please see below a mock code to run in...

Subscript and superscript alignment using only HTML markup

html,latex,html4
The following picture can be easily produced using a latex rendering software: In particular superscript and subscript parts are one over the other. Is it possibile getting the same result using only HTML 4 syntax by some clever use of <sup> and <sub> tags, without use of CSS or MathML?...

Is it possible to include an input box within a LaTeX equation with MathJax?

html,latex,mathjax
I have the document: <!DOCTYPE html> <html lang="en"> <head> <meta charset="UTF-8"> <title>Distribution</title> <script type="text/x-mathjax-config"> MathJax.Hub.Config({ tex2jax: {inlineMath: [['$','$'], ['\$','\$']]} }); </script> <script type="text/javascript" src="https://cdn.mathjax.org/mathjax/latest/MathJax.js?config=TeX-AMS-MML_HTMLorMML"></script> <script src="distrib.js"></script> <link href="distrib.css" rel="STYLESHEET">...

(datatool in LaTeX)DTLforeach: Can't assign XXX there is no keys in XXX?

latex
i am a beginner for LaTeX, and currently trying to create tables from text files(just for some reason the data was generated from an other program and written in a .txt file) And here is one of the text file:(just integrated it into latex) \begin{filecontents*}{d11.csv} Zeit/s AMES\_13 AMES\_14 AMES\_15 AMES\_16...

Typesetting Math using MathJax for IPython Notebook Web page

html,latex,ipython-notebook,mathjax
I chose to learn to write mathematical expressions in IPython Notebook and sat to explore learning resources. I found this official link. I reproduced the whole tutorial on my IPython NoteBook locally and then published it on my website. I also explained the whole struggle I went into while trying...

Error: missing \begin{document} in LaTeX [closed]

latex
I have error in my LaTeX document, when run my file, have a error ! LaTeX Error: Missing \begin{document}. and this tag \begin{document} exists in my code \documentclass[12pt‎, ‎a4paper]{article}‎ \usepackage{graphicx} % inserting images \usepackage[top=3cm,right=3cm,bottom=2.5cm,left=2.5cm]{geometry} \usepackage[colorlinks,linkcolor=blue,citecolor=red]{hyperref} \usepackage{multirow} \usepackage{subfig} \usepackage{algorithm} \usepackage{algorithmic} %\usepackage[utf8]{inputenc} %\usepackage{color, pdfcolmk} %\usepackage{sweave} %...

Mathjax: how to deal with this strange behavior?

web,latex,mathjax
I am using the markdown editor and I have loaded Mathjax in all pages of my website like this: <script type="text/x-mathjax-config"> MathJax.Hub.Config({ tex2jax: { inlineMath: [["$$","$$"],["$","$"],["\$","\$"]] } }); </script> <script src='https://cdn.mathjax.org/mathjax/latest/MathJax.js?config=TeX-AMS-MML_HTMLorMML'></script> I have realized that this line of latex works well: $(u_1)$ However, this one does not work (basically latex...

using source(“X.R”) in Sweave file

r,latex,sweave
I need to use a function in my Sweave file to execute chunk codes. For example, I have function MEAN <- function(x) mean(x) in my directory, then I want use the chunk code x=c(1,2,3,4) MEAN(x) in my Sweave file. Does anyone know how can I do that? Thanks....

Error in applying a for loop to an xtable in knitr

r,latex,knitr,xtable
I'm preparing a pdf using knitr that contains a table produced using xtable. I'm adding a bold typeface to certain cells in the table so I've written the following function: bold <- function(x, matrix){ x[] <- lapply(x, as.character) for (i in 1:ncol(x)) { yes <- matrix[,i] x[yes,i] <- paste('\\textbf{', x[yes,i],...

I want to use figures as [item] in latex

latex,tex
In latex, I can use itemize and \item as follows. \begin{itemize} \item ... \end{itemize} I also can write as follows. \begin{itemize} \item[(any strings)] ... \end{itemize} However I can't write as follows. \begin{itemize} \item[\includegraphics{imagename}] ... \end{itemize} I want to use figures as \item of itemize in latex. Any ideas?...

Convert Mathematica equations into R code

r,latex,wolfram-mathematica,mathml
Is there an easy way to convert Mathematica equations into R code? I have several equations that consist of dozens of terms with subscripts, superscripts, and greek letters. For example, here's a small part of one equation in Latex format: m_2_2= 48 b_1 c_2^2 d_1 \rho ^4+48 b_2 c_1^2 d_2...

latex
I have a problem with latex. I want to create a heading with a special name and aumomatic numbering of the chapters. I use the \chapter{Introduction} command to create the chapter named Introduction. In the Content it is listed as "1 Introduction" which is right. In the text I get...

Greek symbols in labels for bar chart in MATLAB

matlab,latex,bar-chart,matlab-figure
I would like to use greek symbols in the ylabels for my barh() chart. I tried the following but it didn't really work: tplot = barh(mdata, 'BarWidth', 0.3); set(gca,'xgrid','on') lbl = {'$$\hat{\sigma}_1$$', '$$\hat{\sigma}_2$$', '$$\hat{\sigma}_3$$'}; box off set(gca,'yticklabel',lbl) h=findobj(gca,'type','text'); set(h,'Interpreter','latex') I also tried: set(gca,'TicklLabelInterpreter', 'tex') When I do get(gca), the property...

How can I use values and charts in a knitr / LaTeX document before R has calculated them?

r,latex,knitr
A knitr document contains sections of R and LaTeX. My boss wants to read the summary (in LaTeX), but doesn't want to read the R. However the R should be available in an appendix, so the code can be checked if needs be (see below). How to I make values...

Concatenation of Matlab strings

matlab,latex,string-concatenation
I want to make a Matlab function that takes two matrices A and B (of the same size) and combines them in a certain way to give an output that can be used in Latex - table. I want the first row of the output matrix to consist of the...

adding author emails and affiliation on 2nd second line not as a footnote [closed]

latex
Latex code that i have executed, insert emails as a footnote which i want to insert under the author name or on the same line with affiliation. i have insert an image of the required format as well. \documentclass[a4,12pt,twosided,reqno]{article} \usepackage[T1]{fontenc} \usepackage[utf8]{inputenc} \usepackage{authblk} \title{More than one Author with different Affiliations} \author[1]{Sadique...

formatting,latex

Latex: too much space after first line in table in beamer class

image,table,latex,tabular,beamer
I'm working in Latex beamer class and have a table environment in there. For some reason the space between the 1st and the 2nd line is huge and I have no idea where that comes from. Here's my code: \documentclass{beamer} \usepackage{beamerthemeshadow} \usepackage{longtable} \usepackage[ngerman, english]{babel} \usepackage[utf8]{inputenc} \usepackage[T1]{fontenc} \setbeamertemplate{caption}{\insertcaption} \setbeamertemplate{caption label separator}{}...

PDF page number clashes with LaTeX page number when included

r,pdf,latex
Another day, another question! I have created a documentation of an R package using R CMD Rd2pdf workdir/. The documentation is done in roxygen2 comments. I now wanted to include this pdf into my LaTeX script, which I have managed as follows: \usepackage{pdfpages} \includepdf[pages=-,pagecommand={\thispagestyle{plain}}]{docu.pdf} which means that I included all...

Unable to render some equations from latex to html using Mathquill

latex,mathquill
<!DOCTYPE html> <html> <head> <title>Mathquill</title> <meta http-equiv="Content-Type" content="text/html; charset=UTF-8" /> <meta http-equiv="X-UA-Compatible" content="IE=edge" /> <link rel="stylesheet" type="text/css" href="mathquill-0.9.4/mathquill.css"> <script src="jquery-1.9.1.min.js"></script> <script src="mathquill-0.9.4/mathquill.min.js"></script> <script> function clickMe() { \$('#taOne').mathquill('latex', 'x^2');...

statsmodels summary to latex

python,latex,statsmodels
I'm a newbie to latex and I want to import a statsmodels(python-package) summary to my report in latex. I found that it's possible to transform a summary into a latex tabular with the following method: latex_as_tabular. Until now everything is working. Now I have to store the tabular, but I...