latex

Indexing PDF from badly authored LaTeX source

橙三吉。 提交于 2019-12-13 18:49:32
问题 I've noticed this issue with some PDF files, that originate from LaTeX source (I assume that, from the page layout/design and fonts used). So today I was reading such article and I couldn't copy meaningful text, nor do text search, and of course can't index the document. Here is one random example: http://www.vincent-net.com/luc/papers/00informatica_granul.pdf Is there some procedure, I can make this kind of documents accessible. Only thing that comes to my mind is to rasterize document then

Matlab: latex command to output with 4 significant digits or with certain amount of decimals?

做~自己de王妃 提交于 2019-12-13 18:21:55
问题 I want to generate a table for the results in Matlab. I use the symbolic box's latex command. How can I specify the amount of significant digits? Problem profile >> results results = 0.0025 0.0024 0.0024 >> latex(vpa(sym(results),4)) #THIS SHOULD PRINT with 4 decimals, how? ans = \left(\begin{array}{ccc} 0.0025401858540021748922299593687057 & 0.0023686521873358401535369921475649 & 0.0023649304185866526495374273508787 \end{array}\right) >> vpa(sym(results),4) ans = [ 0.00254, 0.002369, 0

Use Latex in Matlab legend?

ⅰ亾dé卋堺 提交于 2019-12-13 18:09:46
问题 My matlab does not accept my latex . For example if I use legend('b^{+6}\rightarrow b^{+7}') , it does not show me the arrow, How I can solve the problem? 回答1: Try with Latex interpreter, something like legend({'$b^{+6}\rightarrow b^{+7}$'}, 'interpreter', 'latex') Tested under R2012a: 回答2: For xlabel and ylabel , simply use something like: xlabel( ' $\Delta t$ [ sec ] ','Interpreter','latex') For some reason, Matlab has more difficulty with legends; you have to set the interpreter after the

Perl Regular Expression for extracting multi-line LaTeX chapter name

ε祈祈猫儿з 提交于 2019-12-13 16:53:30
问题 I am having a hard time figuring out how to perform a regex substitution to clean up some text in a LaTeX file. The LaTeX file looks like \chapter{\texorpdfstring{{II} {The Chapter Title}}{II The Chapter Title}} Annoyingly, this is a multi-line chapter declaration, and the new line can occur virtually anywhere. I can't use the common <> idioms to just read the file line by line and perform the straight-forward regular expression. Instead, I am trying this: #!/usr/bin/perl -i.old # In-place

inline Latex code inside knitr R block

浪尽此生 提交于 2019-12-13 14:46:29
问题 I am looking for a way to put inline latex code into a R code chunk in Knitr. Here is my example code from the knitr example site : \documentclass{article} \begin{document} Example text outside R code here; we know the value of pi is \Sexpr{pi}. <<my-label, echo=FALSE, eval=TRUE>>= set.seed(1213) # for reproducibility x = cumsum(rnorm(100)) m <- mean(x) # mean of x print(m) cat(m) plot(x, type = 'l') # Brownian motion @ \textit{Mean is :} \textbf{\Sexpr{m}} \end{document} For something simple

Generate proper LaTeX table using tabulate Python package

徘徊边缘 提交于 2019-12-13 13:29:56
问题 I'm using the tabulate Python package to generate a properly LaTeX formatted table. Here's a MWE: from tabulate import tabulate table = [[r"${:.1f}\pm{:.1f}$".format(2.3564, 0.5487)], [r"${:.1f}\pm{:.1f}$".format(45.1236, 8.00021)] ] print tabulate(table, tablefmt="latex") What I get with this example is: \begin{tabular}{l} \hline \$2.4\textbackslash{}pm0.5\$ \\ \$45.1\textbackslash{}pm8.0\$ \\ \hline \end{tabular} when the proper formatting would be: \begin{tabular}{l} \hline $2.4\pm0.5$ \\

PHP - LaTeX rendering

爷,独闯天下 提交于 2019-12-13 13:15:31
问题 I am in the design stages of a new project which will take a data set and load it into a document, then render the document around a template. The rendered file could be a data set of CSV, a PDF marketing letter, an email, ... a lot of things. The data will not be math equations, I'm simply looking at an elegant way of connecting many data sources into many documents and outputting in many templates I'm entirely in the dark here with using latex in php. Is there anything like this out there?

Icelandic, utf8 and utf8x in LaTeX

两盒软妹~` 提交于 2019-12-13 11:40:25
问题 First of all, what's the difference between utf8 and utf8x in \usepackage[utf8]{inputenc} \usepackage[utf8x]{inputenc} when used in LaTeX? Secondly, what packages are required when writing an article in Icelandic using LaTeX? I found: \usepackage[icelandic]{babel} \usepackage[T1]{fontenc} \usepackage[utf8x]{inputenc} after experimenting a bit but I have a feeling some part of the code may be redundant. And even with them the aforementioned packages, the code inside \begin{lstlisting} ... \end

Dynamic LaTeX references in R comment with knitr

白昼怎懂夜的黑 提交于 2019-12-13 11:34:39
问题 I had ask a similar question to this with respect to Sweave ( Dynamic references to figures in a R comment within Sweave document ) and would like to see if anyone as a similar answer when using knitr . The goal is to have the following code chunk <<"example", fig.cap = "some figure", highlight = FALSE>>= # the following code generated Figure \ref{fig:example} plot(1:10, 1:10) @ have be displayed in the resulting .pdf as # the following code generated Figure 1.1 plot(1:10, 1:10) So far I have

How to prevent an errant page break and prevent text from running off the page [closed]

柔情痞子 提交于 2019-12-13 08:31:51
问题 Closed. This question is off-topic. It is not currently accepting answers. Want to improve this question? Update the question so it's on-topic for Stack Overflow. Closed last year . I have an oddly forced page break that... seems to force the rest of the headings and pages off the end of the next page What code will force the next heading to continue without a page break? The offending page doesn't really have any code on it aside from section/subsections and citations. So is it possible