latex

Align LaTeX math text in matplotlib text box

不问归期 提交于 2019-12-22 09:07:12
问题 I'm trying to generate a text box with lines of LaTeX code correctly aligned in a matplotlib frame. I tried using the format alignment method (ie: {:<11} ) but it does not seem to work on math mode. Here's the output I get: where the = symbols should all be aligned to the right (see MWE below). How can I produce such a text box with the = signs correctly aligned? MWE : (Never mind the weird figure proportions and text box placing, this is part of a much larger code which I cropped to generate

Centering text in emacs window

坚强是说给别人听的谎言 提交于 2019-12-22 08:55:22
问题 Inside just one lonely emacs frame I switch frequently between editting 70-column text files (LaTeX) and 120-column programs (.h/.cpp files). I'd like to continue to use just one emacs frame, without resizing it or creating additional frames. Here is the problem. The width of my window is about right for editting the 120-column programs, but during the extended text editting sessions, the 70 columns appear on the left side of the window. At the end of the day in front of a laptop, my neck

Latex的表格注释

删除回忆录丶 提交于 2019-12-22 07:24:06
调用threeparttable包 在文档的最前面加入以下命令: \usepackage{threeparttable} 在表格处插入命令 \begin{table*} \label{table:number} \centering \caption{....} \begin{threeparttable} \begin{tabular}{lc} \hline A & B \\ \hline A & B\tnote{*} \\ A\tnote{**} & B \\ % 添加表格信息 \hline \end{tabular} \begin{tablenotes} \footnotesize \item[*] this is the .... %此处加入注释*信息 \item[**] my website is ... %此处加入注释**信息 \end{tablenotes} \end{threeparttable} \end{table*} 注意:星号可以换成数字或是其他的字符。 完整例子测试 \documentclass[12pt]{amsart} \usepackage{geometry} % see geometry.pdf on how to lay out the page. There's lots. \geometry{a4paper} % or letter or

Matplotlib: Change math font size and then go back to default

我与影子孤独终老i 提交于 2019-12-22 06:34:27
问题 I've learned from this question Matplotlib: Change math font size how to change the default size of math text in matplotlib . What I do is: from matplotlib import rcParams rcParams['mathtext.default'] = 'regular' which effectively makes the LaTeX font the same size as the regular font. What I don't know is how to reset this back to the default behaviour , ie: the LaTeX font looking a bit smaller than the regular font. I need this because I want the LaTeX font to look the same size as the

Rmarkdown Image Skips Ahead of Text

对着背影说爱祢 提交于 2019-12-22 06:31:13
问题 I am putting together an Rmarkdown PDF document with the following YAML settings: --- output: pdf_document: fig_caption: true fig_crop: true toc_depth: 3 header-includes: - \usepackage{hyperref} --- Within the body of the document I've inserted a few PNG images, using the following syntax Paragraph 1.......... ![Caption](path/image.png) Paragraph 2.... And when the document is rendered, the image appears as expected within the text, between Paragraph 1 and Paragraph 2 . However, I am getting

Emacs - how do I automatically enter minor modes when I enter a major mode?

折月煮酒 提交于 2019-12-22 05:17:43
问题 I'm kind of a newb when it comes to emacs. I know about the .emacs file but have very little idea as to do anything more advanced than elementary stuff. Whenever I enter latex-mode, I'd also like to automatically turn on flyspell-mode, reftex-mode, auto-fill-mode, and also set fill-column to 120. How do I edit my .emacs file to do this? Thanks! 回答1: (add-hook 'latex-mode-hook (function (lambda () (flymake-mode) (reftex-mode) (auto-fill-mode) (setq fill-column 120)))) for example should work.

How do you change the code example font size in LaTeX PDF output with sphinx?

a 夏天 提交于 2019-12-22 04:32:34
问题 I find the default code example font in the PDF generated by sphinx to be far too large. I've tried getting my hands dirty in the generated .tex file inserting font size commands like \tiny above the code blocks, but it just makes the line above the code block tiny, not the code block itself. I'm not sure what else to do - I'm an absolute beginner with LaTeX. 回答1: I worked it out. Pygments uses a \begin{Verbatim} block to denote code snippets, which uses the fancyvrb package. The

Replace a character with a string in LaTeX

瘦欲@ 提交于 2019-12-22 04:03:10
问题 I'm looking for a way to do a substring replace on a string in LaTeX. What I'd like to do is build a command that I can call like this: \replace{File,New} and that would generate something like \textbf{File}$\rightarrow$\textbf{New} This is a simple example, but I'd like to be able to put formatting/structure in a single command rather than everywhere in the document. I know that I could build several commands that take increasing numbers of parameters, but I'm hoping that there is an easier

How to create R documentation file (.Rd) in latex?

被刻印的时光 ゝ 提交于 2019-12-22 03:17:07
问题 Is there a simple way to create R documentation file for simple R functions? I know I can edit a .Rd file in R-studio and preview it in HTML file. But how to put it into latex to edit and preview? Is there some latex package producing R documentation format? 回答1: There is the Rd2latex function in the tools package that will convert from the .Rd format to LaTeX format. This will let you preview the documentation in LaTeX. However this does not allow converting edits to the LaTeX document back

How to create R documentation file (.Rd) in latex?

强颜欢笑 提交于 2019-12-22 03:17:04
问题 Is there a simple way to create R documentation file for simple R functions? I know I can edit a .Rd file in R-studio and preview it in HTML file. But how to put it into latex to edit and preview? Is there some latex package producing R documentation format? 回答1: There is the Rd2latex function in the tools package that will convert from the .Rd format to LaTeX format. This will let you preview the documentation in LaTeX. However this does not allow converting edits to the LaTeX document back