FAQ Database Discussion Community

## improper matrix print out latex

matrix,printing,latex

## 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...

## ValueError in matplotlib when using \: LaTeX horizontal spacing

python,matplotlib,latex
See MWE below: import matplotlib.pyplot as plt import matplotlib.offsetbox as offsetbox fig = plt.figure() ax = fig.add_subplot(111) text1 = r'$a\,=\,{}\pm{}$'.format(0.01, 0.002) # Works. text2 = r'$a\;=\,{}\pm{}$'.format(0.01, 0.002) # Works. text3 = r'$a\:=\,{}\pm{}$'.format(0.01, 0.002) # Does not work. text = text3 ob = offsetbox.AnchoredText(text, pad=1, loc=6, prop=dict(size=13)) ob.patch.set(alpha=0.85) ax.add_artist(ob) plt.show() While...

## Creating template on vim-latex suite (Ubuntu)

templates,ubuntu,vim,latex
I have asked a same question on tex stack overflow, but I had no responses for two days, so I will post it here instead (it is more of a technical problem than tex problem). I will delete the question on tex overflow in two hours. http://tex.stackexchange.com/questions/230881/creating-templates-on-vim-latex-suit-template Here are the...

## How to export a table from R to latex and include dimension names?

r,latex
I have a simple table with dimension names that I want to export from R to Latex. I'm looking for a straightforward way to do this that doesn't requiring additional editing in latex. This seems like it should be easy, but I've found a number of other unsolved questions on...

## Matlab - How to generate LaTeX out of a transfer function?

matlab,latex
I have a transfer function as: TF = 0.00995 z^7 - 0.02786 z^6 + 0.03611 z^5 - 0.0293 z^4 + 0.01565 z^3 - 0.005669 z^2 + 0.001274 z - 0.0001554 ---------------------------------------------------------------------------------------------------------- z^8 - 2.4 z^7 + 3.16 z^6 - 2.664 z^5 + 1.585 z^4 - 0.666 z^3 + 0.1975 z^2...

## 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} %...

## printing inline latex equations from variable in R, trouble with \beta

r,latex,rmarkdown
I'd like to store a string of inline latex math in an r object, then output this string so that when rmarkdown is knitted, a latex equation is output in pdf. I have an error when I include "\beta" in the string. Here's the example: --- title: "Untitled" author: "Tedward"...

## I can't find the format file pdflatex.fmt'!

php,latex,fedora,pdflatex,php-5.2
I want to run pdflatex from php on user request. Running from terminal works fine [php file.php] and creates pdf file. But when I try to run from browser by sending request to php, It gives this error "I can't find the format file `pdflatex.fmt'!" I am working with php5.2.6,...

## Using sympy's latex() function without calculating the input

math,python-3.x,latex,sympy
I want to get latex output from a sympy expression without calculating the expression. For instance if I do latex((2+3)/7) the output would be 5/7 (with latex), but what I am after is for it to just output (2+3)/7 with latex. Like this: \frac{2+3}{7}

## Problems cross referencing in LaTex with knitr and xtable

r,latex,knitr,xtable,cross-reference
I am currently working with R Studio to produce PDF documents with R/knitr in LaTex. Within these documents I want to present part of my results in tables that I want to refer to in the text. I produce these tables using the xtable package within R and it is...

## 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" +...

formatting,latex

## 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...

## Add sections to beamer presentation using rmarkdown and knitr

r,latex,markdown,knitr,rmarkdown
I am trying to add section slides to a beamer presentation written in rmarkdown using the latex command \section{}. However, it gets inserted between a \begin{frame} & \end{frame} automatically during the conversion, which causes the compilation to fail. Is there any way to stop this happening so that the section...

## 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],...

## File q.sty not found Latex Linux

latex,xelatex
I'm trying to compile this document (Plasmati Graduate CV) I got with xelatex and it complains about not finding q.sty. For all the other missing files I could just Google or search in the Synaptic Package Manager but I guess with the short filename it's hard to find. Anybody know...

## How to count Tabular

latex,pdflatex
for some reason i need to make many tables with latex, and non of them should have caption nor labels, but they need to be numbered like Subsection.tableNo. I have tried to use \begin{tabular}{ccc} ...& ... & No.: \arabic{subsection}.\arabic{table}\\\hline ..... \end{tabular} however, because i'm using only tabular environment, the table...

## 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?...

## 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?...

## Latex \newcommand in kramdown

github,latex,jekyll,kramdown

## 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">...

## Change LaTeX when button is pressed

javascript,html,latex
I am trying to create a program that generates random functions then shows them in LaTeX but I can't figure out how to edit LaTeX when a button is pressed. This code works: <html> <head> <script type="text/javascript" src="http://latex.codecogs.com/latexit.js"></script> </head> <body> <div lang="latex" id='Latexdiv'></div> <script> document.getElementById('Latexdiv').innerHTML = 'sin(x)'; </script> </body> </html>...