FAQ Database Discussion Community

## Can I make git merge always conflict on file changes?

git,version-control,latex,git-merge
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...

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

## Using Vim + latex-suite + knitr

r,vim,latex,knitr
(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...

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

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

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

## How to install the IOP (Institute of Physics) Latex document class for Texlive and the Lyx Document Processor (Answer Provided)

latex,document,physics,lyx,latex-environment
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...

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

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

## How do I add a note or text in addition to the caption to a knitr figure for latex output?

r,latex,knitr
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 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?...

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

## Building Latex/Tex arguments in lua

lua,latex,tex
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...

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

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

## Is there a way to include knitr documents in a LaTeX document?

r,latex,knitr
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....

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

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

## 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 Equations Not Rendered on Webpage

r,latex,markdown,knitr
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...

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

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

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

## Latex Indentation

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

## pyreport LaTeX formulae not working

python,ubuntu,latex,pyreport

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