Questions tagged [latex]

1

votes
1

answer
1.6k

Views

Right margin in table cells aligned to the right in Latex

I have the following table in Latex Created with this code: \begin{table}[h] \caption{aaaa} \label{tab:treatments} \centering \scalebox{0.8}{ \begin{tabular}{l c c c} \toprule \tabhead{Por 1} & \tabhead{Por 3} & \tabhead{Quantificazione log-dim} & \tabhead{cintin\'a} \\ \midrule A & M & 99.3\%& 5....
Mauro Gentile
1

votes
2

answer
35

Views

How can I have LaTeX print citations inside of parentheses?

I have a problem with reference style in LaTeX. I use: \usepackage[backend=bibtex,style=authoryear]{biblatex} % But when I look at the references, the text is not inside parentheses. For example: ,reviewed in Roy et al. 2010 should be ,reviewed in (Roy et al. 2010)
user2806363
1

votes
1

answer
46

Views

Change size of figure in MATLAB to use them in LaTeX

I have generated several plots in MATLAB and I haven't set the ( width or height) to any of them. I save them as pdf to place them in LaTeX but each figure appear with different size. I can change each figure size in LaTeX but I wonder if there is an easy way in MATLAB to get same size for all figur...
Adam
1

votes
2

answer
9.5k

Views

Horizontal and vertical alignment int tabular cell

Most indications I've seen so far seem to indicate that m is used to center cell contents vertically, but it's not working for me. Here's what I have \begin{table}[htb] \centering \sffamily \begin{tabularx}{1.0\textwidth}{ m{3cm} p{5.5cm} p{5.5cm} } \hline & \textbf{Helpful} & \textbf{Harmful} \hfi...
André Fratelli
0

votes
0

answer
5

Views

Message “you must have pygmentize installed to use this package” while Pygments is already installed

I'm try to use the minted package in latex to display code in latex document. From Texstudio, I get an error message 'you must have pygmentize installed to use this package'. However, if I type pip3 install pygments I get Requirement already satisfied: pygments in /usr/local/lib/python3.7/site-packa...
ecjb
1

votes
1

answer
849

Views

rmarkdown & kable/kableextra: Printing % symbol in Table when using escape = F

I want to create a table in a pdf-document using rmarkdwon and kable. In the header there has to be a linebreak, so to do so i need to set escape = F. The table itself contains percent-values as strings including the % symbol (for example: '13%'). I found here https://tex.stackexchange.com/questi...
TinglTanglBob
1

votes
2

answer
143

Views

Tabulate a combined matrix of coefficients / t-statistics and export in LaTeX

I have many regressions (one per year, over fifteen years) for four outcome variables. I have created two 15x4 matrices: one with the coefficients and one with the t-statistics. I am stuck now that I want to tabulate them in the classic way, each row having the coefficients for each model and under...
Fabio I.
1

votes
3

answer
133

Views

Difficult workflow writing Latex book full of Python code

I'm writing a book on coding in python using Latex. I plan on having a lot of text with python code interspersed throughout, along with its output. What's really giving me trouble is when I need to go back and edit my python code, it's a huge pain to get it back nicely into my latest document. I've...
Adam B
1

votes
1

answer
143

Views

plot with ggplot in for-loop doesn´t compile to PDF

I created a report using knitR (.Rnw) to compile it as a PDF. As I would like to plot the same figure for every single questions I created a plot in a for-loop. Unfortunately I get a warning in the PDF and don´t realy get what causes the error... Here is the chunk where I believe the problem starts...
klamsi
1

votes
1

answer
275

Views

How to write Jinja2 template for Jupyter nbconvert to show markdown and suppress output number?

I am trying to write a Jinja2 template to convert my Jupyter notebook to a PDF via LaTex using nbconvert. My current attempt does not show Markdown cells or image captions and also shows the following output above all of my matplotlib graphs: out[1]: I would like to display markdown cells and capti...
seanysull
1

votes
0

answer
94

Views

How to convert latex/MathML expression into English language

I am looking for an API preferably in JAVA which can convert a MathML/ Latex expression into the English language. WIRIS is one option but I am looking for an open source implementation. Input MathML expression MathML -input:'14 Latex expression \frac14 Expected output: - 1 fourth
sandy
1

votes
0

answer
53

Views

constants for LaTeX

I am working on a C# port of LaTeX, based on iosMath. One thing I can't figure out is where they get their constants from, that they use for spacing, italic corrections, etc. I'm hoping an iosMath author is on here and can help out? For example, see this plist file. All those constants had to come f...
William Jockusch
1

votes
1

answer
95

Views

Define a function to latex italicize (or boldface) a word selection in Emacs

I use Emacs' org-mode to take notes in class, which I then export in latex. I found org-mode's default markers for bold and italic (* and / respectively) quite useful, but I had to stop using them to avoid confusing the org exporter. I would like to have a function to italicize a word selection. In...
1

votes
0

answer
180

Views

complete authors details not showing up at title page in BMC latex templet

I am using BMC latex template. I use two author details in the template. However, the BMC template only shows up the details of correspondence. I want to show up Name, emails, addresses of both authors at the title page. Please help how to solve this issue.
Waseem Khan
1

votes
0

answer
168

Views

Ampersand (&) breaks \ifdefined

I am working on a document that is used in a lecture each semester. The contents basically stay the same, but only a subset of the content is used each semester. Defines are used to set which parts should be compiled and which not. In one part of the document a list of the options is compiled in a t...
Merlin Denker
1

votes
1

answer
213

Views

\imagegraphics doesn't interpret \ escape in filename

I'm trying to insert a background image with the beamer package using the following: \usebackgroundtemplate{% \includegraphics[width=\paperwidth,keepaspectratio]{/path/to_file/background.png}% } The problem I'm having is that my background file path has an underscore in it, as I put in the example a...
Eponymous
1

votes
0

answer
1.2k

Views

Moving legend outside pgfplot and reformat x axis labels in tikz

I've made a schematic plot in tikz with the below code. \begin{tikzpicture} \pgfplotsset{ticks=none} \begin{axis}[ xlabel=$Treatment$, ylabel=$Level of donation$] \addplot[smooth,mark=*,blue] plot coordinates { (1,1) (2,1) (3,1) }; \addlegendentry{Pure Altruism} \addplot[smooth,color=red,mark=x] plo...
spar31415
1

votes
1

answer
110

Views

Using python to process a LaTeX file and create random questions

I am using python to pre-process a LaTeX file before running it through the LaTeX compiler. I have a python script which reads a .def file. The .def file contains some python code at the top which helps to initialize problems with randomization. Below the python code I have LaTeX code for the proble...
gnat79
1

votes
0

answer
60

Views

Latextools can't find added PATH when starting sublime from unity launcher

I have Ubuntu 16.04, sublime text 3 and sublime package latextools on my computer for Latex editing. I installed Latexlive and added the bin path to system PATH. When I started sublime with subl from the terminal and compile a .tex file with Ctrl+b using latextools, the compilation worked fine. But...
Zhang Yu
1

votes
1

answer
357

Views

RMarkdown pdf document chunk output exceeds page margins

While I am knitting a document as a PDF using RMarkdown some code chunk outputs exceeds the page margins as seen on the pic. Any ideas to fix this?
Emre Toros
1

votes
1

answer
352

Views

qcircuit.sty not found when visualizing a QISKit quantum scheme

I followed this manual in order to visualize my QISKit v0.4.8 quantum circuit by means of the latex_drawer() function (in newer versions of QISKit the function is circuit_drawer()). However, I got the following error when running the code: ! LaTeX Error: File `qcircuit.sty' not found. Is qcircuit.st...
Alexander Pozdneev
1

votes
0

answer
82

Views

Latex listings package: How to define comments not by delimiters but by their position

I am using the listings package for LaTex to include GAMS-Code in my LaTex-file. The package does not support GAMS as a language. So I have to define the language like descriped in this article. In GAMS, after declaring a symbol there is place for an explanatory text. I want to make the listings pac...
Niclas von Caprivi
1

votes
0

answer
275

Views

How to force position of figure with PyLaTeX ?

I'm using PyLaTeX to generate automatically a report file. This report is to be filled with matplotlib plots and I want them to be placed exactly where the code says so. Usually in Latex, I would use the [h] suffix or even [H], but here, no matter what I put in the position, it doesn't work (I mean...
Mounsif Mehdi
1

votes
0

answer
129

Views

R Markdown: fancyhdr can't set head rule to 0 even after redefining the \headrulewidth command

I'm trying to make a quick thesis document/template, but the documents are not allowed to have a header line, just the page numbers. I can change what exists inside the header and footers (e.g. adding a page number at the top right hand of the page), but the rule won't go away. I tried multiple var...
Alvadine
1

votes
0

answer
212

Views

Generate R package manual in .tex or .pdf - cut off lines

I created my first R package using roxygen2. I generated the manual with a .pdf extension using the code pack
shazz
1

votes
1

answer
92

Views

pgfplots with gnuplot: Unexpected behaviour: Why?

While I used pgfplots with gnuplot successfully several times, I cannot find the cause of the following problem: I'm trying to plot the graph of a function which you can see here: f(x)=(36/25) + (336*x)/125 - (6*x^2)/5 + (24*x^3)/125 - (x^4)/100. When I plot the function with programs like GeoGebr...
Sigmar2030
1

votes
1

answer
167

Views

bookdown chapter heading not correct

I am using the bookdown to write a book. I've defined the documentclass as book. Everything seems to be working correctly - the Table of Contents, List of Tables and List of Figures along with an Appendix, Bibliography and Index. However, in my index.Rmd file I lead off with a Preface section that i...
Melinda Higgins
1

votes
1

answer
77

Views

How to format enumerated lists from latex to docx

I have several hundred Word documents to generate from latex sources, TEX to DOCX. Pandoc works just fine with one little glitch -- enumerated lists in LaTeX are rendered with Roman numerals in the DOCX output files. I can't seem to find any documentation that addresses this issue, and Word document...
ccc31807
1

votes
0

answer
282

Views

jupyter notebook with unicode characters PDF converting problems

I was making a math class note with some unicode characters (Simplified Chinese, in my case) in it. And when I was trying to convert it into PDF file, it popped out 500 error. The error message reads: ... ************************************************* ('E:\Program Files (x86)\MiKTeX 2.9\tex\latex...
Pats Chen
1

votes
0

answer
634

Views

Use vim shortcuts in TeXstudio

I'm using TeXstudio to edit my *.tex files. Is there any way to add vim shortcuts to TeXstudio?
HosseinBeheshti
1

votes
0

answer
88

Views

Vim Latex Suite can't find latex command using Pathogen

Background I was having dual boot issues with Windows 10 and Ubuntu 17.10, which eventually resulted in a boot loop and since I need Ubuntu 16.04.3 for an Operating Systems class I decided to load up an ISO into one of my USBs with Rufus, reformat my Windows partitions from GPT to NTFS to get around...
jfh
1

votes
0

answer
264

Views

Error generating PDF with RMarkdown

I just bought a new Mac. I've cloned my git repo onto it, and ran the following, which worked fine on the old Mac: rmarkdown::render(input = 'statement.Rmd', output_format='pdf_document', output_file = paste(Payees$Payee[i], 'identifying text', i, '2018_02', '.pdf', sep=''), output_dir = '~/Desktop/...
Steve
1

votes
0

answer
62

Views

Network graph LaTex rendering

did anybody succeeded in labeling nodes of network graphs using LaTex? So far, I created network graphs like this http://js.cytoscape.org/demos/animated-bfs/ but I want to add formulas to the nodes. I am trying to use javascript based graphs such that I can use MathJax for Latex rendering. Unfortu...
Uwe.Schneider
1

votes
0

answer
269

Views

R Shiny - Downloading a PDF Report Error

The issue is weird in the sense that I can recreate the exact same PDF report with knitr outside of the Shiny app. The code does work if I use HTML as output format. I have the latest version from MikTex See code below: output$report
Stefan Musch
1

votes
1

answer
132

Views

Windows Python Matplotlib Latex Flashing CMD windows

I've recently reinstalled python, Latex (via TexWorks), and Matplot Lib. (all on windows 10) and every time I plot a graph that uses Latex in some text, I get a huge number of console windows flashing open. This seems a like a bug, as even this code: import matplotlib.pyplot as plt plt.rc('text', us...
Ben Norman
1

votes
1

answer
41

Views

Django: output textfile to be proceeded

i have a small django application that i use to manage my patients data ( i am a doctor with an intermediate level in python/django) I used LaTeX to output my reports via a view function like that def consultation_pdf(request, pk2, pk1): entry = Consultation.objects.get(pk=pk2) source = Patient.obje...
Kaddour Kardio
1

votes
1

answer
586

Views

LaTeX remove subsection from TOC

I use the following code in LaTeX to set the level of contents in the table of contents: \setcounter{secnumdepth}{2}\newcommand{\restoretoc}\addtocontents{toc} {\protect\vspace*{2.5em}{\setcounter{tocdepth}{1}{\setcounter{secnumdepth}{2}}} The ouput is the following: The counter disappears but subsu...
Suraya Masrom
1

votes
0

answer
115

Views

(R, xtable package) sanitize.text.function is not working

I want to include a data table from R in a LaTeX file. I am using xtableand the problem is that the function sanitize.text.function is not working properly. MWE: > a print.xtable(xtable(a), type = 'latex', sanitize.text.function = function(x){x}, file = '../R_out/prova.tex') \begin{table}[ht] \cent...
oibaFox
1

votes
0

answer
102

Views

removing the date from a PDF-Latex output through IPython Notebook conversion

How can I remove the date from a PDF-Latex output through IPython Notebook conversion? I have tried removing so many packages in the Latex document but the date doesn't seem to be removed
Yousra
1

votes
0

answer
268

Views

R-markdown latex font encoding failing

Edit: Problem solved. It turns out I had some missing packages, and rmarkdown doesn't give a very good error message for this. If anyone else has this problem, you have to use the 'keep_tex' option in the yaml. You can then see in the tex file all of the required tex packages. I'm on Windows 7. I ha...
nickasaurous

View additional questions