latex

LaTeX安装与编译中文

╄→гoц情女王★ 提交于 2019-12-05 01:50:35
首先,感谢博客园团队帮我找回这篇被我误删除的博客。找回方法:发送邮件至"contact@cnblogs.com",然后就可以在工作人员的帮助下找回了。下面介绍LaTeX的安装并使其能够编译中文的方法。 LaTeX的安装 安装过程在有网络的环境下进行。 sudo apt-get install texlive-full sudo apt-get install texmaker 至此,已经安装好了LaTeX的编辑器Texmaker,可以在终端输入 texmaker 来打开Texmaker。 使LaTeX能编译中文 打开【选项】->【配置Texmaker】,然后把第一行 latex -interaction=nonstopmode %.tex 改为 xelatex -interaction=nonstopmode %.tex 还没改完,先别急着关闭【配置Texmaker】。紧接着点击左侧列中的【快速构建】,选择【自定义】,依次添加“LaTeX”和“PDF查看器”,最后点击【OK】即可。 在编辑页面还需加上两行代码,正确的格式为 \usepackage{xeCJK} \setCJKmainfont{Noto Serif CJK SC} \begin{document} ... 至此,就能正常编译中文了。 来源: https://www.cnblogs.com/mfyfymeng/p

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

醉酒当歌 提交于 2019-12-05 01:42:27
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? 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 to the .Rd document. Look at Sweave , maybe it helpful for you. Sweave is a tool that allows to embed the R

tikz: set appropriate x value for a node

纵然是瞬间 提交于 2019-12-05 00:10:05
问题 This question resulted from the question here I want to produce a curly brace which spans some lines of text. The problem is that I have to align the x coordinate manually, which is not a clean solution. Currently I use \begin{frame}{Example} \begin{itemize} \item The long Issue 1 \tikz[remember picture] \node[coordinate,yshift=0.7em] (n1) {}; \\ spanning 2 lines \item Issue 2 \tikz[remember picture] \node[coordinate, xshift=1.597cm] (n2) {}; \item Issue 3 \end{itemize} \visible<2->{ \begin

Hmisc::latex not printing caption w/ tabular object

一曲冷凌霜 提交于 2019-12-04 23:36:16
问题 First I will tell you what I'm attempting to do big picture in case I'm going about it wrong. I have a nested table that I'd like to out put as a LaTeX table within RStudio using knitr. I am fine until I try to add a caption. I tried the example on page 9 in the tables vignette (LINK). It works without the caption but when I add the caption it doesn't. It also works with a non tabular object. The funny thing is that latex.default works but causes an error in RStudio/knitr's Compile PDF and

LaTeX | 为学术论文排版而生【入门篇】

岁酱吖の 提交于 2019-12-04 23:10:06
今天开始 LaTeX 第一篇推送,有种自己 入坑 ,还有带着大家 入坑 的感觉(笑哭)。所以,在你继续往下阅读之前,我郑重说一下: LaTeX不简单。 好,准备 入坑 吧! 什么是LaTeX? LaTeX是一种 高质量 的 排版 系统,在20世纪80年代由美国的 Leslie Lamport 最初开发(那时叫做 TeX ),并发展至今。 LaTeX 最主要用于长篇 技术或科技文档 排版,不过实际上它几乎可以用于任何类型的发行物的 排版 。 可以说, LaTeX 并不是一个 文字处理器 , LaTeX 鼓励用户不要过多地担忧写出来的文档的 外观 是怎么样的,而应该 专注 在你所要写的 内容 上。 举个例子,考虑下面的内容: Introduction to LaTeX SEEK Jan 2017 Hello world! 在最常用的文字处理软件 Office Word 中,如果想要产生以上内容,我们必须决定哪一部分采用什么样的 格式 ,比如 标题 采用 18pt Times Roman 字体 , 姓名 采用 12pt Times Italic 字体 等。这样一种排版方式通常会产生两种后果: 作者需要 花费 很多 时间 在排版上。 往往排版的效果很 糟糕 。 而LaTeX的设计思想是: 排版的事情交给 LaTeX 就好,让作者专注于 写作 。 所以,在LaTeX中,你只需要这样输入:

LaTeX | 为学术论文排版而生【浮动体篇】

元气小坏坏 提交于 2019-12-04 23:09:55
说在前面 今天,迎来 LaTeX 系列的第四篇【浮动体篇】,怎么感觉发布第三篇是很久之前的事情了呢(笑哭,逃)..... 关于 LaTeX ,今天和大家多唠叨一点。 与主流的编程语言(如 Java 、 Python 、 C++ 等相比), LaTeX 并没有那么多光环,在每年的编程语言排行版上也是不可能见到它的踪影的,毕竟 LaTeX 只是一门为排版而生的小众语言,因此也不会成为互联网时代大家追逐高薪的编程利器。 从我学习 LaTeX 以来,虽然接触还不深,但却明显感觉到她的小而精。当你拿用 LaTeX 写学位论文时,你会被她的高效和专业而惊叹;如果你是HR,当你看到一份用 LaTeX 写的简历时,你会被其漂亮的排版所吸引,而多看几眼;当你坐在电脑前,敲着代码,便能感觉到那种 所想即所得 的美妙...... 学习 LaTeX 从来就不带有功利的因素,而是纯粹被她的专业和精致所吸引,作为一个业余的兴趣就很好。虽然相比 Word , LaTeX 入门很难,想要做到精通,花个几年时间都不为过。可是,如果真的有兴趣,慢慢享受这种逐步弄懂她的过程,又有啥不好呢? 存在的必然是合理的。反过来想想,既然 LaTeX 在排版方面有这么大的优势,那么除了在学术界受欢迎,在其他行业是否能够发挥她的价值呢? 经过我的初步了解,在国外,有不少专注于提供 LaTeX 排版服务的小型公司,在国内,一家叫做

LaTeX | 为学术论文排版而生【公式篇】

删除回忆录丶 提交于 2019-12-04 23:09:44
一步一坑,继续LaTeX系列的第三篇【公式篇】,前面介绍过【入门篇】和【文本篇】,新来的朋友们可以 点击这里 查看。在公式编辑方面,LaTeX具有独到甚至统治性的优势,大批用户投入LaTeX的怀抱。今天就一起见识下它的魅力吧! 论数学公式 对于理工科、经济学等方向的学生和科研人员来说,难免要与数学公式打交道,比如写报告、发表学术论文。从我自己和周围的朋友来看,排版数学公式永远是件麻烦事,特别是当公式很多很复杂时。 比如在 Word 中,插入公式很容易引起行距的变化,需要多次调整,且很容易出现 牵一发而动全身 的典型 Word 风格(此处忽略 Word 排版大神)。此外在 Word 中给公式编号也是要经过很多步骤,就算借助 MathType 也无法实现一键完成编号的程度。 目前排版数学公式的方法最常见的是: Word 中自带的 插入公式 功能。 借助 Mathtype 。 上面这两种方法,要么折磨人,要么根本满足不了需要,这里不多说,大家都懂!:) 今天就向大家介绍排版数学公式的王者 LaTeX 。 ☟,准备入坑! LaTeX 数学公式语法 假如现在我们要用 LaTeX 排版 勾股定理 ,编写下面的代码即可: $a^2 + b^2 = c^2$ 得到的效果就是: 编译输出 什么!这么简单,等等,没你想得那么简单:) 因为 LaTeX 也算是一种编程语言,所有内容都需要通过代码实现

Possibilities to embed Latex in QML

£可爱£侵袭症+ 提交于 2019-12-04 22:56:04
问题 I'm doing a presentation system in QML (with C++ backend) similar to this one. I want to be able to include some Latex code to display some math (only minimum Latex capabilities needed, such as sums, fractions, super- and substript and math fonts). I see the following possibilities to do so: Using latex2e : Compile the Latex code to a DVI document (with latex ) Convert the DVI to SVG (with dvisvgm ) Display this using an Image in QML (which also supports SVG) Using MathJax : Wrap the Latex

To escape many _ in LaTeX efficiently

扶醉桌前 提交于 2019-12-04 22:40:40
How can you escape _ without the use of \_ ? This is the example of the question word_a_a_a_a_a_b_c_dd There is one function which you can use for this. However, I cannot remember its name. Are you thinking of the underscore package, which redefines the underscore symbol so that you don't have to escape it in text mode? See here . Other than verbatim I wouldn't know. Verbatim environment: \begin{verbatim} word_a_a_a_a_a_b_c_dd \end{verbatim} Inline: \verb|word_a_a_a_a_a_b_c_dd| I couldn't get the underscore package to work, so I used the url package: \usepackage{url} \urlstyle{sf} % or rm,