latex

how to set header font color in Latex

♀尐吖头ヾ 提交于 2019-12-11 02:55:31
问题 Is it possible to change the header font color in Latex? 回答1: You could have a look at the sectsty package. The secsty package provides a set of commands for changing the fount 1 used for the various sectional headings in the standard LATEX 2ε document classes From the manual: Make sure you include the package in your document by saying in your document preamble: \usepackage{sectsty} You will then have some new commands available. For example: \allsectionsfont{\sffamily} will give you

Using graphicspath in latex/sweave

自作多情 提交于 2019-12-11 02:52:50
问题 I have an Sweave file, where I need to embed a png and pdf from another folder. This is how I tried it \usepackage{graphicx} \graphicspath{{inst/extdata/}} \DeclareGraphicsExtensions{.pdf,.png} \begin{document} \begin{figure} \includegraphics[scale=0.7]{image.png} \caption{captionA} \label{fig:labelA} \end{figure} I also tried like this, but this didn't work: \graphicspath{{filePath}} filePath = "C:/path" \begin{figure} \includegraphics[scale=0.7]{image.png} \caption{captionA} \label{fig

Custom output hooks in knitr

落花浮王杯 提交于 2019-12-11 02:40:02
问题 I am trying to create a chunk hook that can produce a \floatfoot{} as part of the output from a chunk. Hopefully the following example makes clear what I am trying to achieve: 1. .Rnw file Here is the knitr file. \documentclass[a4paper]{article} \title{Learn Moar knitr!} \author{Foo Bar} \date{\today} \usepackage{blindtext} \usepackage{floatrow} \begin{document} \blindtext <<label=plotWithNotes, fig.lp='fig:', fig.cap='This is a figure'>>= plot(rnorm(100), rbinom(n = 100, size = 1, prob = 0.5

Lyx cannot find knitr module

这一生的挚爱 提交于 2019-12-11 02:36:16
问题 I am migrating/branching from sweave to knitr and can run @yihui's minimal example in Rstudio but am having trouble making it run with Lyx (2.06). I get the message The module knitr has been requested by this document but has not been found in the list of available modules. My PATH is /usr/bin/Rscript (per which Rscript , as per @yihui's suggestion here) so that appears visible, but lyx doesn't seem to see it. I also did upgrade to R version 3.0.1 (Good Sport) today as a part of a larger

R/Sweave/Latex - Place comment in table (xtable)

浪尽此生 提交于 2019-12-11 02:25:39
问题 I created a table using R and sweave in LaTeX. A sweave example: \documentclass{article} \begin{document} \SweaveOpts{concordance=TRUE} <<label=tab1, echo=FALSE, results=tex>>= library(xtable) employee <- c('John Doe','Peter Gynn','Jolie Hope') salary <- c(21000, 23400, 26800) mData <- data.frame(employee, salary) print(xtable(mData, caption = "Salary", align="ccc"), caption.placement="top", hline.after = c(c(-1, 0), nrow(mData)), include.rownames=FALSE) @ \end{document} The basic LaTeX

draw a B+ tree in latex

[亡魂溺海] 提交于 2019-12-11 02:17:22
问题 Is there some way to draw a B+ tree in latex? It would look something like the picture below (ignoring the animations) 回答1: You can use PGF/Tikz to draw vector graphics with latex. I was satisfied with this latex package. It has a very detailed manual with many examples. Chapter 11.6 of the manual gives a Special syntax for Specifying Trees . 回答2: I don't know if it's possible to draw the B+ tree directly in LaTeX, but it's definitely possible to include an image. With GraphicX installed,

How to integrate Sphinx-generated Latex code in existing Latex documents?

浪子不回头ぞ 提交于 2019-12-11 01:49:18
问题 I've used Sphinx to document a Python library. So far this works great, I get nice HTML and LaTeX output. Concerning Latex, Sphinx generates a complete standalone document with lots of special packages and configurations. But, I would like to integrate the generated Latex files within an already existing Latex project (more precise: in the appendix of a book). In particular I want the Sphinx-generated documentation pages to have the header, footer and section heading styles of the parent

How to put 'underbar' below a letter (underscored characters) in matplotlib?

半世苍凉 提交于 2019-12-11 00:55:04
问题 Unfortunately due to a problem with windows I cannot render any of my matplotlib text with LaTeX . So basically I need away already in matplotlib's text handling to place a line underneath a letter. So far the closest I have is ax.text(x,y,z, r'$\mathbf{\underbar r}$') , but this just produces _r . So if there is a way to get this bar under the 'r' that would be amazing. Thanks in advance! P.S. I have already tried ax.text(x,y,z, r'$\underline{\mathbf{r}}$') but this doesn't seem to work, :,(

latex使用

﹥>﹥吖頭↗ 提交于 2019-12-11 00:54:47
插图系列 1 引入图片 \begin{figure*}[h] % t插入到页面顶端 h插入到当前 \setlength{\abovecaptionskip}{0cm} \setlength{\belowcaptionskip}{-0cm} \linespread{1} \begin{center} \includegraphics[width=1\linewidth]{d2-2-2_2-3.png}% 图片名字 png pdf \end{center} \caption{针孔相机成像模型。(a) 针孔相机成像及坐标系转换;(b) 相似三角形原理} % 图片注释 \label{Figure-d2-3} %图片引用的名字 \end{figure*}    2 在引用出使用引用 \ref{图片的label} 如图\ref{Figure-2-1}(a)所展示 标题系列 \chapter{第二章 相机阵列宽视场成像系统建模与原型机构建} \label{ChapterTwo} \section{系统概述} \subsection{单相机成像模型}       1 点标题 \begin{itemize} \item{\textbf{SIFT特征}} \end{itemize} 2 黑体加粗 1. \textbf{尺度空间的极值检测}    来源: https://www.cnblogs.com

What's the best combination of LaTex writing in Chinese? [closed]

走远了吗. 提交于 2019-12-11 00:49:49
问题 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 7 years ago . someone rcommend the xelatex, but others insist on the latex+CJK, which one is prefer? thanks. 回答1: I use LaTeX + CJK and it works fine. Make sure your text editor supports unicode, and then add these lines between the \documentclass and \begin{document} lines: \usepackage{CJKutf8} \newcommand{\zh}[1]{\begin{CJK