latex

how to replace a character INSIDE the text content of many files automatically?

别来无恙 提交于 2020-01-03 11:58:07
问题 I have a folder /myfolder containing many latex tables. I need to replace a character in each of them, namely replacing any minus sign - , by an en dash – . Just to be sure: we are replacing hypens INSIDE all of the tex file in that folder. I dont care about the tex file names. Doing that manually would be a nightmare (too many files, too many minuses). Is there a way to loop over the files automatically and do the replacement? A solution in Python/R would be great. Thanks! 回答1: sed -i -e 's/

Zed Notation in LyX

眉间皱痕 提交于 2020-01-03 08:53:00
问题 Is it possible to create Zed Notation schemes in LyX? How can it be done? 回答1: Solved it: I installed the zed-csp style package through MikTeX. Then, in LyX I went to Document->Settings->Latex Preamble and added \usepackage{zed-csp} then, to enter Zed schemes, symbols, etc., I used this reference It is entered through ERT (Evil Red Text) i.e., TeX code (Ctrl+L). Zed segments in the code should be surrounded with a \begin{zed} ... \end{zed} except schemes and such constructs that have a \begin

How to set the fixed width of columns?

混江龙づ霸主 提交于 2020-01-03 07:30:12
问题 Hello everyone I am creating a table on latex my code looks like this: \begin{table}[H] \centering \caption{caption} \label{my-label} \begin{tabular}{lll} \hline \multicolumn{3}{|c|}{\cellcolor[HTML]{34CDF9}{\color[HTML]{000000} Matriz confusión Genero.}} \\ \hline \multicolumn{1}{|l|}{} & \multicolumn{1}{l|}{M} & \multicolumn{1}{l|}{F} \\ \hline \multicolumn{1}{|l|}{M} & \multicolumn{1}{l|}{43} & \multicolumn{1}{l|}{7} \\ \hline \multicolumn{1}{|l|}{F} & \multicolumn{1}{l|}{11} &

Matlab tex file specify column delimiters

大憨熊 提交于 2020-01-03 03:31:06
问题 I am creating a tex file in Matlab. The end goal is to create a pdf using latex. I have using following website to check the latex I have is correct latex generator. Everything is fine about from when I have a number that contains comma's for example 5,236,012. The issue comes when I copy the data from the tex file. The column delimiter is set to Commas, how can I change this to Semicolon? 回答1: Use strrep - %%// input_filepath and output_filepath are the filepaths of the %%// input and output

Emacs+$\\LaTeX$ 帮你写数学文章

孤人 提交于 2020-01-02 16:47:58
在这个混乱的星球上,有两大神器.一个是Emacs,另一个是……Vim?No.对学数学的人来说,另一大神器是$\LaTeX$.学数学的朋友对于后者可能比较熟悉,$\LaTeX$是计算机界的大牛,图灵奖得主高德纳的力作,是写数学论文的不二选择(严格地说高德纳发明的是TeX,$\LaTeX$是在TeX的基础上稍微改造而来的).用$\LaTeX$写的数学文章,排版优美,数学式子漂亮.在$\LaTeX$面前,Word编辑器,mathtype之类的不值一提.然而,$\LaTeX$不是所见即所得的,也就是说,当你写数学文章的时候,你面对的,不是一个个数学式子,而是一行行代码.这样无疑会让原本就难看懂的数学式子更难看懂,当你想看看书写效果的时候,必须编译一下.如此一来,你的思维流必然会被打断,你写文章的士气必然会降低..而且,当你想输入一个类似于行间公式的东西的时候,你必须输入\begin{XXX}...\end{XXX},这无疑会带给你无穷的麻烦. Emacs很好地解决了$\LaTeX$的这类问题.它和你的计算机上的$\LaTeX$配合起来天衣无缝.Emacs是计算机界的大牛Richard Stallman的力作.它和Tex同属开源软件. Emacs估计是很强大的编辑器.我刚刚接触它.它的优点在于强大的可扩展性和可定制性,不同的人可以把Emacs变成自己想要的样子,定制出自己想要的功能

How to search/replace expressions with parantheses in emacs?

我只是一个虾纸丫 提交于 2020-01-02 08:46:30
问题 I have a bit of Latex code with lots of maths expressions enclosed in \mathrm{}. I'd like to remove the \mathrm{} code around the expressions, preferrably using emacs. For example, I'd like to substitute \mathrm{\gamma \cdot x_0} with \gamma \cdot x_0 Removing \mathrm{ only is easy, but I also need to remove the closing bracket. How can I do this in emacs? Many thanks, Enno 回答1: You can use back references to tackle this problem. Run M-x query-replace-regexp and enter \\mathrm{\([\a-z0-9_ ]+\

What LaTeX package to use with knitr to get more table-control? tabu?

こ雲淡風輕ζ 提交于 2020-01-02 08:23:04
问题 I’m writing a longer table with knitr using xtable and the tabular.environment='longtable' in the longtable package when print ing them in my .Rnw -file, problem is that I can’t control the longtable environment enough. I have some text I would like to have left-justified and hyphenated in a certain way inside the table (i.e. I have some cells with quite a lot of text) Any advice on how I could do this? What packages would you recommend? Anyone tried the tabu package? What I am mainly looking

What LaTeX package to use with knitr to get more table-control? tabu?

不问归期 提交于 2020-01-02 08:22:07
问题 I’m writing a longer table with knitr using xtable and the tabular.environment='longtable' in the longtable package when print ing them in my .Rnw -file, problem is that I can’t control the longtable environment enough. I have some text I would like to have left-justified and hyphenated in a certain way inside the table (i.e. I have some cells with quite a lot of text) Any advice on how I could do this? What packages would you recommend? Anyone tried the tabu package? What I am mainly looking

How can I change fonts in a beamer presentation that uses Sweave?

谁都会走 提交于 2020-01-02 05:24:10
问题 When I include \usepackage{Sweave} in the preamble of a beamer presentation, beamer ignores changes to font, e.g., \usepackage{helvet} . Here is a minimal example: \documentclass[professionalfonts]{beamer} \usepackage[T1]{fontenc} \usepackage{helvet} \usepackage{Sweave} \begin{document} \begin{frame} Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris

Some Unicode characters not displayed in RMarkdown PDF output

China☆狼群 提交于 2020-01-02 04:29:04
问题 I'm trying to put together some course notes as a PDF, and am having trouble getting certain Unicode characters to display properly. Using the xelatex latex engine is necessary for the document to be rendered at all (using the default engine results in an error due to the unrecognized characters), however, only the first Unicode character (uppercase delta) is displayed properly. For example, when using the rmarkdown render() function to render the following .Rmd file: --- output: pdf_document