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

I think the question as stated maybe ambiguous, so let me describe my use case. I am working on a document that is primarily ordinary English text edited in a LaTeX editor (Texpad in my case), but in which I'd like to include material I've developed in knitr-based .Rnw file....

I understand that cramdown does not support \newcommand type macros. Is there a workaround that does not involve Pandoc, so that it could be used with Jekyll in a GitHub blog? This would be the input markdown: --- layout: post --- \newcommand{\a}{\alpha} This is a test $$\a$$. The output should...

I'm trying to create a HTML report using pyreport and it works up to the single point, that the LaTeX formulae are not generated. Here is the input file I use for testing: #$ This is \LaTeX : $c = 2\cdot(a+b)$ Than I run pyreport -l -t html --verbose file.py,...

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

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

Suppose, I use Emacs to write a function in latex: \begin{equation} \label{eq:myeq} x=2y \end{equation} 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...

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

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

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

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

I am trying to use FontAwesome in XeLaTex on OS X. So I followed the steps described on this github: Save this into your project folder as fontawesome.sty Put \usepackage{fontawesome} into the preamble Define command for FontAwesome: \newfontfamily{\FA}{FontAwesome Regular} Redefine required characters (optional): \def\twitter{{\FA \faTwitter}} Use: \href{http://twitter.com/swaycz}{\twitter\ swaycz} So that...

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

I have a figure in Matlab, inside the figure i would like to write comments on the figure. the comment include latex formula; for example, I want to write this comment on my figure $$ \vec{R} = 2 $$ here is an example that I found when I searched; clear...

I'm very new to LaTeX and its distributions so this might be a very newbie question. I was following this tutorial and I'm not being able to compile the document. The code so far is very simple i don't think there are any typos and also I did not find...

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

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

I want to find a way of achieving the autocompleting functionality that the vim plugin DelimitMate provides for parentheses but instead for dollar signs. For example, typing $ should yield $$ with the cursor in-between both characters. Moreover, after typing said text within the dollar signs, e.g. $math stuff here$,...

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 have a markdown document with lots of equations (mathjax I think) which renders fine with the application Marked 2. When I try to convert it to pdf with pandoc to create the bibliography, I get an error. For example, with \\[ \mu_{s,h,d,y} = \left\{ \begin{array}{1 1} \omega_{s,h,d,y} + \delta_{s}(t_{s,h,d-1,y}...

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.

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

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}

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

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

I have a latex file in which I want to get rid of the last \\ before a \end{quoting}. The section of the file I'm working on looks similar to this: \myverse{some text \\ some more text \\}% % \myverse{again some text \\ this is my last line \\}% \footnote{possibly...

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

I have a list which I want to indent from the section title. I have tried \indent and \hspace{1cm} without success. Here is my code \vspace{0.2in} \section{Affiliations} \vspace{0.1in} \indent The American Geophysical Union.\\ \hspace{1cm} The Seismological Society of America. ...

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

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

I'm trying to add frame numbers to my Beamer presentation written in rmarkdown. However, I would like to suppress the numbers on the title page using the \begin{frame}[plain] option (from the second answer here: http://tex.stackexchange.com/questions/82794/removing-page-number-from-title-frame-without-changing-the-theme). However, when compiling from rmarkdown to tex, the \titlepage already creates a frame environment, so...

<!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');...

Why does the following R Markdown minimal (non)-working example not compile to PDF? --- header-includes: - \usepackage{fancyhdr} - \pagestyle{fancy} - \lhead{} - \chead{} - \rhead{The performance of new graduates} - \lfoot{From: K. Grant} - \cfoot{To: Dean A. Smith} output: pdf_document: keep_tex: yes latex_engine: xelatex --- # Test In particular, the...

I am hoping I have a simple question for you, but I can't find an answer anywhere (I have been searching for 2 days, maybe I am dumb?). I am trying to develop a git workflow to collaboratively edit LaTeX files with my PhD adviser. The problem we face is...

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

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

I have data in lua, accessible to a LaTeX/TeX document (it is an array). I try to show this data in a LaTeX tabular form. I tried several ways to do this but all failed :( . Here is an example : \begin{tabular}{|c|c|c|}\hline A&B&C\\ \hline 2010 & 2,78 &\\ \hline...

I recently use the vim to write the latex source. But I got a very strange problem. When I open a old .tex file with vim, the equation will not show as usual. For example, when I type $K$, it just display K unless I move cursor to the line...

I wish to create a number of tables with numerical elements of very different scales. For example, tables with the variance of various variables down the diagonal, and the correlations off the diagonal. The larger numbers make the tables too big, and are harder to read. Is there a good...

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

I have a fairly complex project with a fairly large documentation. Converting the normal user guide to PDF with Sphinx via make latexpdf works quite well. However, if I also want to include the library reference with all function, class, and module documentations, the command fails with: ! LaTeX Error:...

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

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

So I have the following LaTex list, and many like it in a paper I'm translating: \begin{enumerate} \item If $\mathfrak{E}$ and $\mathfrak{B}$ with the arguments $x, y, z$ a solution of the Maxwell's equations (1), then through the components $\mathfrak{E}_x, \mathfrak{E}_y, \mathfrak{-E}_z, \mathfrak{-B}_x, \mathfrak{-B}_y, \mathfrak{B}_z$, with the arguments $x, y,...

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

I'm trying to make list using itemize, and I honestly can't see whats wrong with this. I'm sure I'm just missing something small. \documentclass{article} \author{} \title{Essay research} \begin{document} \maketitle{} \section{Alternative fuel sources} Thorium based nuclear power stations offer advantages over classic uranium based ones: \begin{itemize}: \item Thorium-232 is much more...

In the output below, I'm trying to align Author with the top of the box next to it. I've tried a couple of different boxes and whatnot, but I can't get it to align properly. Here's the code: \mbox{ Author } \fbox{\begin{minipage}[c]{12cm} \medskip $for(author)$ $author.name$\\$if(author.title)$\emph{$author.title$}\\$endif$$if(author.company)$$author.company$$endif$ \par\medskip $endfor$ \medskip \end{minipage}} ...

using Latex to print out a Matrix , I noticed I can not place the numbers under each other correctly here is the code, I really appreciate your help \begin{center} $ABD= \begin{bmatrix} 12610207.7\quad 5695754.3\quad 0\quad 0\quad 0\quad 0 \\ 5695754.3\quad 10737818.8\quad 0\quad 0\quad 0\quad 0 \\ 0\quad 0\quad 2800468.2\quad 0\quad...

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

(summary at the bottom) I have set up Vim and R using the Vim-R-plugin and it works flawless. I also use the Latex-suite in Vim and can create, compile and view .tex files without any problem. For knitr, I used to use Rstudio but I would really like to stay...

I would like to alias \mathbb as simply \bb. How do I define this new command? I know how to alias mathsymbols such as: \def\AND{\wedge} But I am not so sure about math commands that take parameters....

Folks, Looking to create an AIC selection table for a publication in LaTex format, but I can not seem to get the form I want. I have googled this to death and was VERY surprised I couldn't find an answer. I've found answers to much more obscure questions in R....

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

I use lua to make some complex job to prepare arguments for macros in Tex/LaTex. Part I Here is a stupid minimal example : \newcommand{\test}{\luaexec{tex.print("11,12")}}% aim to create 11,12 \def\compare#1,#2.{\ifthenelse{#1<#2}{less}{more}} \string\compare11,12. : \compare11,12.\\ %answer is less \string\test : \test\\ % answer is 11,12 \string\compare : \compare\test. % generate an error...

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

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

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 <math> and </math> tags: Failed...

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

I am using knitr to write my thesis and compiling it as a latex document. I have successfully included figures with the appropriately labeled caption; however, in addition to the caption I would like to include additional lines of text directly below the caption and associated with the figure. For...

I have x,y, dx, dy= var("x, y, dx, dy"); def iD(f): return diff(f, x)*dx + diff(f,y)*dy; iD(x^3*y^5) returns 5*dy*x^3*y^4 + 3*dx*x^2*y^5 is there a way to have it return the differentials always at the end as in 5*x^3*y^4*dy + 3*x^2*y^5*dx thank you...

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

How to use inverted A character(Phonetic Symbol) in an equation in LaTex? Do I have to use any specific package for it? I used \textinvsca, but it says "undefined control sequence"

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

Background I originally asked a question on Stackoverflow, asking how I add the IOP document class to the list of available document classes in Lyx. (I will try to remove or merge that out dated quesiton.) I now understand that this is a 2-stage process. Stage 1 is to install...

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

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

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?

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

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

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

First thing first, code is list below, import sys import os import latexmake import mysql.connector conn = mysql.connector.connect(user='root',password='oilwell',host='localhost',database='sqlpush1') with conn: mycursor = conn.cursor() mycursor=execute("SELECT DATE,oil,gas,oilprice,gasprice,totrev FROM results WHERE DATE BETWEEN '2011-01-01' AND '2027-12-01'") rows = mycursor.fetchall() a.write("\\documentclass{standalone}\\usepackage{booktabs}\n\n\\usepackage{siunitx}\r \n\ \r\n\\begin{document}\r\n\\begin{tabular}{ccS[table-format...

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

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

I just finished to write the summary for calculus in Latex. The main problem now is that the files contains many things I don't really need now. The .tex files contains many definitions and theorems that i need to study by heart. The definitions have their own definition in the...

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

When I go to a webpage, such as this page of examples, none of the LaTeX code is being rendered in any of the browsers I try. However, on the same computer, if I create a simple R Markdown file in RStudio and I click Knit HTML, the preview in...

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

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

I have problem using automatically generated Tex string in arguments where a numeric value are required (e.g. in ifthenelse comparison). Here is a sample minimal code : \newcommand\testC{123} \ifthenelse{\testC<0}{negative}{positive} % works fine ! \newcommand{\testD}{\luaexec{tex.write("123")}} % write to avoid the print carriage return - produces also 123 as \testC \testD %...

I insert links following this manual: http://sphinx-doc.org/markup/inline.html#ref-role However, while the internal links work perfectly in the HTML output, they don't work in PDF. The text supposed to be the clickable link only become italics. Here's my rst: This is my :ref:`reference <file-table3>`. .. _file-table3: .. container:: centeredtextbody .. table:: There...

I am preparing a data processing code and the results from these are to be fed to a TeX/LaTeX file and the file is to be compiled by Python (i.e. Python should send the command to compile the TeX/LaTeX file) At present I plan to generate a text file (with...

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

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}{}...