latex

Icelandic, utf8 and utf8x in LaTeX

老子叫甜甜 提交于 2019-12-03 10:20:06
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{lstlisting} isn't rendered with Icelandic characters when outputted through pdflatex in Ubuntu,

Latex: Text cannot be placed below image

你。 提交于 2019-12-03 09:53:38
问题 I'm having a problem with an image and some text. I have this code: Some text...\\ \begin{figure}[ht] \centering \includegraphics[scale=0.75]{picture.jpg} \caption{The caption} \label{fig:picture} \end{figure} Some more text... Basically, I want this: Some text. (Above image in the code) [end of page / new page] image Some more text. (Below the image in the code) [start of new section] But, what the above code gives me is this: Some text. (Above image in the code) Some more text. (Below the

How to escape/strip special characters in the LaTeX document?

♀尐吖头ヾ 提交于 2019-12-03 09:51:56
问题 We implemented the online service where it is possible to generate PDF with predefined structure. The user can choose a LaTeX template and then compile it with an appropriate inputs. The question we worry about is the security, that the malicious user was not able to gain shell access through the injection of special instruction into latex document. We need some workaround for this or at least a list of special characters that we should strip from the input data. Preferred language would be

Lighweight markup (wiki) language for documenting

删除回忆录丶 提交于 2019-12-03 09:36:21
问题 When I write papers or documentation it makes think using LaTeX or OpenOffice is overkill as I usually only need some markup elements (bold, headlines, lists, ...) . I'd like to write my documents using a wiki style markup as this is very efficient. For example: = Introduction = '''HTML''' is a markup language... In the end I'd like to simply convert it to PDF. (Cross-platform was nice too.) compiler.exe -pdf input.wiki output.pdf Is there a tool (or simple tool chain) to do this job? I'd

VScode 配置为 LaTeX IDE

点点圈 提交于 2019-12-03 09:36:10
VScode 配置为 LaTeX IDE 安装扩展 ctrl+shift+x 调出应用商店,搜索并安装如下扩展: LaTeX Workshop ; pdf-formatter LaTeX Preview 配置 LaTeX Workshop LaTeX文件 .tex 的编译、预览、辅助文件的清理等都在扩展 latex workshop 中设置。 LaTeX Workshop 中,编译LaTeX文件时顺序执行的一系列/组命令称为LaTeX食谱(recipes),定义在 latex-workshop.latex.recipes 。缺省情况,LaTeX Workshop包含2个基本的食谱,分别由 latex-workshop.latex.recipes 和 latex-workshop.latex.Tools 定义。第一个食谱的 tools 域中的工具定义在第二个食谱。 latex workshop 的参数含义见 LaTeX Workshop 的配置文件"package.json"或 https://github.com/James-Yu/LaTeX-Workshop/wiki/Compile#latex-recipes 了解配置情况。 LaTeX Workshop 默认的编译方式为 latexmk 和 pdflatex 。如下配置修改了 latex workshop 的编译方式、预览

How to set any font size (e.g. 32pt) with \setbeamerfont?

泄露秘密 提交于 2019-12-03 09:34:53
问题 I want to set font size for frametitle with \setbeamerfont. How to set any font size (e.g. 32pt) with \setbeamerfont? 回答1: After reading the manual, I found the answer! It's simple: \setbeamerfont{frametitle}{family=\rmfamily,series=\bfseries,size={\fontsize{32}{36}}} where 32 is 32pt, the font size and 36 is the skip line size in pt. 回答2: According to the manual (version 3.09), you can also use: size*={<font size>}{<baseline skip>} 来源: https://stackoverflow.com/questions/2619337/how-to-set

get height on a block of latex output

与世无争的帅哥 提交于 2019-12-03 09:17:30
问题 I am trying to determine how to get the height on a block of latex output ( not the whole document, and not the code..but rather a block of output ). As an example of what I am trying to accomplish: i were to have the latex code $\sum_{i=0}^\infty \frac{1}{n}>\infty$ \newline hello world \newline hello universe The height of the above block of text is dependent on a number of things-font, margin size, and of course what the text is, as changing any of these parameters changes how many inches

Theorem numbering in LaTeX

匿名 (未验证) 提交于 2019-12-03 09:06:55
可以将文章内容翻译成中文,广告屏蔽插件可能会导致该功能失效(如失效,请关闭广告屏蔽插件后再试): 问题: I have a problem with theorem numbering in LaTeX. I can make it number by subsection, e.g Theorem 1.2.1 for the first theorem in the second subsection of the first section. But I need it to show me only the numbers of the subsection and the theorem, but not the section number, like this: Theorem 2.1 I use \newtheorem{thm}{Theorem}[subsection] for the numbering. 回答1: Putting the following code in the preamble seems to have the desired effect: \usepackage{amsthm} \newtheorem{thm}{Theorem}[subsection] \renewcommand{\thethm}{\arabic{subsection}.

Theorem numbering in LaTeX

匿名 (未验证) 提交于 2019-12-03 09:06:55
可以将文章内容翻译成中文,广告屏蔽插件可能会导致该功能失效(如失效,请关闭广告屏蔽插件后再试): 问题: I have a problem with theorem numbering in LaTeX. I can make it number by subsection, e.g Theorem 1.2.1 for the first theorem in the second subsection of the first section. But I need it to show me only the numbers of the subsection and the theorem, but not the section number, like this: Theorem 2.1 I use \newtheorem{thm}{Theorem}[subsection] for the numbering. 回答1: Putting the following code in the preamble seems to have the desired effect: \usepackage{amsthm} \newtheorem{thm}{Theorem}[subsection] \renewcommand{\thethm}{\arabic{subsection}.

Latex Multiline Equations

匿名 (未验证) 提交于 2019-12-03 09:05:37
可以将文章内容翻译成中文,广告屏蔽插件可能会导致该功能失效(如失效,请关闭广告屏蔽插件后再试): 问题: Is it possible to get multline like behavior within a gather environment? I have a set of equations in a gather environment, but one of them is too long, and I'd like to split it up onto two lines where the first line is left-aligned and the second line is right-aligned (just like multline). If there is a way of aligning individual lines within the gather or split environment (like flushleft or flushright but functional in mathmode) this would solve the problem. 回答1: The mathtools package has an inner multlined environment similar to