跳至主要内容

博文

目前显示的是标签为“Latex”的博文

在Latex中如何显示黑体的希腊字母

一般的英文字母用\textbf{}或者\mathbf{}(在数学环境中)可使之显示为黑体。但是这两个命令对于希腊字幕不好用。如何才能使希腊字母也显示成黑体呢?在网上找到了下面两种方法。 1) Setting bold Greek letters in LaTeX The issue here is complicated by the fact that \mathbf (the command for setting bold text in TeX maths) affects a select few mathematical symbols (the uppercase Greek letters). However lower-case Greek letters behave differently from upper-case Greek letters (due to Knuth’s esoteric font encoding decisions). However, \mathbf can’t be used even for upper-case Greek letters in the AMSLaTeX amsmath package, which disables this font-switching and you must use one of the techniques outlined below. The Plain TeX solution does work, in a limited way: {\boldmath$\theta$} but \boldmath may not be used in maths mode, so this ‘solution’ requires arcana such as: $... \mbox{\boldmath$\theta$} ...$ which then causes problems in superscripts, etc. These problems may be addressed by using a bold mathematics package. * The bm package, which is part of the LaTeX...

Latex学习手记之二:插入图片(3)

1,插入并列的子图 \usepackage{subfigure} \begin{figure}[H] \centering \subfigure[SubfigureCaption]{ \label{Fig.sub.1} \includegraphics[width=0.4\textwidth]{figurename.eps}} \subfigure[SubfigureCaption]{ \label{Fig.sub.2} \includegraphics[width=0.4\textwidth]{figurename.eps}} \caption{MainfigureCaption} \label{Fig.lable} \end{figure} 2,控制图片位置 如果不喜欢让Latex自动安排图片位置,可以使用float包,然后 用\begin{figure}[H]。 \usepackage{float} 代码如上例。

Latex学习手记之二:插入图片(2)

1,插入jpg图片 在命令行环境下,使用命令: ebb figure.jpg 生成bounding box文件figure.bb。 使用如下命令: \includegraphics[width=0.8\textwidth]{figure.jpg} 可以使用Pdf Texify直接编译成pdf文件。 2,插入bmp图片 还没有找到直接插入bmp图片的方法。现在的方法是,使用 gimp将bmp转换成jpg,然后按上述方法插入。转换时不要 使用windows自带的painter,图片质量损失太多。用gimp或 fastone image viewer,将jpg质量选为最高,转换之后得到的 图片质量较好。 3,同时插入jpg和eps图片 插入的命令不变。编译时使用Latex, dvi2pdf,两种格式的 图片都可以显示。

Latex学习手记之二:插入图片(1)

插入eps图片 使用\includegraphics[选项]{文件} 命令可以插入eps图片。下面是一个最简单的例子: \documentclass{article} \usepackage{graphicx} %使用graphicx包 \begin{document} \includegraphics{file.eps} %插入图片,按图片原尺寸插入 \end{document} 注意: (1)eps文件和tex文件放在同一个文件夹,只用文件名就可以调用,不用写路径。 (2)编译时不能使用pdflatex,会出错。即使不出错,也看不到图。应使用latex编译生成dvi,然后dvi2ps,ps2pdf就可以看到图了。 使用[选项]可以指定图片大小: \includegraphics[width=3in]{file.eps} 设定图片宽度为3 inches,图片高度会自动缩放。 \includegraphics[width=\testwidth]{file.eps} 设定图片宽度为文本宽度。 \includegraphics[width=0.8\textwidth]{file.eps} 设定图片宽度为文本宽度的0.8倍 \includegraphics[width=\testwidth-2.0in]{file.eps} 设定图片宽度比文本宽度少2 inches。 使用[选项]指定图片旋转角度: \includegraphics[angle=270]{file.eps} 将图片旋转270度。 两个选项同时使用,中间用逗号隔开: \includegraphics[width=\testwidth, angle=270]{file.eps}

Latex学习手记之一:Hello, world!

今天安装了CTEX,开始学习用Latex写文档。我们组的人一般是用scientific workplace的。但是我不太喜欢那个东西,搞得像word一样。所以决定用ctex。这是第一篇手记。一般介绍某种编程语言的书都喜欢用“Hello,world”作为第一个例子,所以这篇的名字就叫做Hello, World了。 下面是一个例子,来自ctex论坛上的视频。 \documentclass{article} \usepackage{amsmath} \usepackage{indentfirst} \begin{document} \title{My Masterpiece} \author{Helin Gai} \date{} \maketitle \tableofcontents \section{WinEdt} Microsoft Word is a word processor, and it is not suitable for serious typesetting. Duke University is one of the most renowned institutions in the US. \section{Math} $a^2+b^2=c^2$ \end{document} 注释: \usepackage{indentfirst} 使用这个package使得每个section首段的首行缩进。否则每个section首段不缩进,从第二段开始首行缩进。 \date{} 该命令阻止Latex生产日期。去掉该命令,Latex将自动生成日期。