由买买提看人间百态

topics

全部话题 - 话题: ensuremath
(共0页)
T*******n
发帖数: 493
1
来自主题: TeX版 - 请问如何生成这样的矩阵
\documentclass{article}
\usepackage{amsmath}
\makeatletter % required because of the use of \@tempdima
\newcommand*{\toplabel}[4]{%
\settowidth{\@tempdima}{\ensuremath{#1}}%
\makebox[\@tempdima][c]{%
\hss
\ensuremath{%
\makebox[0pt][r]{\ensuremath{\scriptstyle#2}}%
\scriptstyle{#3}%
\makebox[0pt][l]{\ensuremath{\scriptstyle#4}}%
}%
\hss
}%
}
\makeatother
\begin{document}
Here is one way of doing this.
\begin{equation}
%
\begin{array}{r} % matrix of q and q
T*******n
发帖数: 493
2
\documentclass{article}
\usepackage{amsmath}
\newcommand{\chem}[1]{\ensuremath{\mathrm{#1}}}
\newcommand{\unit}[1]{\unskip\:\ensuremath{\mathrm{#1}}}
\newcommand{\degree}[0]{\ensuremath{{}^\circ}}
\begin{document}
\begin{equation}
x\overset{\text{not enough space to explain}}{=}y
\end{equation}
\begin{equation}
\chem{H_2O}_{(s)}
\xrightarrow[\text{at $T=0\degree\unit{C}$ and $P=1\unit{atm}$}]
{\Delta H_{\text{melt}}}
\chem{H_2O}_{(l)}
\end{equation}
\end{document}
J*******r
发帖数: 379
3
☆─────────────────────────────────────☆
ddyourself (dd) 于 (Tue Nov 8 13:04:09 2005) 提到:
写出相等的原因
☆─────────────────────────────────────☆
TeXnician (毕升) 于 (Tue Nov 8 20:20:32 2005) 提到:
\documentclass{article}
\usepackage{amsmath}
\newcommand{\chem}[1]{\ensuremath{\mathrm{#1}}}
\newcommand{\unit}[1]{\unskip\:\ensuremath{\mathrm{#1}}}
\newcommand{\degree}[0]{\ensuremath{{}^\circ}}
\begin{document}
\begin{equation}
x\overset{\text{not enough space to explain}}{=}y
\end{equation}
\begin{eq
m******y
发帖数: 25
4
来自主题: CS版 - 如何在latex下写pseudocode?
Use alltt and \ensuremath when you want to include math symbols, e.g.,
\begin{alltt}
\textbf{boolean} func(\textbf{Constraint} C1, \textbf{Constraint} C2) \{
\textbf{return} checkValidity(\ensuremath{\tau});
\}
\end{alltt}
T*******n
发帖数: 493
5
Two solutions:
1. \usepackage{amssymb} and say $\blacksquare$
or \ensuremath{\blacksquare}.
2. \rule[0pt]{1ex}{1ex} creates a black square about
the size of an "x" based on the current font size.
Make 0pt positive to raise the square, negative to
lower it.
If you want to use this in several places, define a
macro such as
\newcommand{\mysquare}[0]{\rule[0pt]{1ex}{1ex}}
and say \mysquare wherever you want it.
T*******n
发帖数: 493
6
来自主题: TeX版 - 请教化学分子式的写法

That will give math italic letters.
Put the following in a chem.sty file and then load it with
\usepackage{chem}:
\DeclareRobustCommand{\chem}[1]{%
\mbox{%
\m@th
\if b\expandafter\@car\f@series\@nil\boldmath\fi
\ensuremath{\mathrm{#1}}%
}%
}
\endinput
Then try this test file. Switching to boldface is done
automatically.
\documentclass{article}
\usepackage{chem}
\begin{document}
\title{Title}
\author{A. U. Thor}
\maketitle
\tableofcontents
\section{Water is \chem{H_2O}}
Water is
T*******n
发帖数: 493
7
$\blacksquare$ or \ensuremath{\blacksquare}

Tried
a
g*********r
发帖数: 124
8
来自主题: TeX版 - 怎么自己编号定理?!!
给一个很土的方法:
\usepackage{ntheorem}
\theoremsymbol{\ensuremath{\heartsuit}}
\theoremindent0.5cm
\theoremnumbering{arabic}\theoremseparator{:}
\theoremstyle{plain}
\newtheorem*{SpecialNumberLemma}{Lemma 1\textsuperscript{$\prime$}}
\begin{SpecialNumberLemma}[Special Theorem]\label{somelabel} This is a
customized Lemma
1\textsuperscript{$\prime$}.
\end{SpecialNumberLemma}
A****Z
发帖数: 694
9
现在用LyX,比方说Ctrl+M就进入数学模式,还可以很方便地加Section, subsection。
但是感觉用LyX还是不太自由,有没有哪种编辑器可以一个快捷键就把
\begin{align*}
\end{align}
这种就加上去,而且光标停在里面的?
最好是能够自定义宏的。比方说,很简单的一个快捷键就把下面的一长串搞出来
\ensuremath{\,\mathrm{}}而且光标停在最里面。
(共0页)