So I quite like the Anttor fonts and I'd like to use them in LaTeX. Everything is nice, except the \emptyset symbol is ugly. I'd like to just \renewcommand the null set command, but I can't work out how to call, say, the computer modern \emptyset when using a different font family everywhere else.
Is there a quick way to do this?
\font\cmsy = cmsy10 at 12pt
\hbox{\cmsy \char 59}
\font\msbm = msbm10 at 12pt
\hbox{\msbm \char 63}
(source: imageban.ru)
Related
Does anyone know how to make (nice looking) double bracket multiset notation in LaTeX, i.e something like (\binom{n}{k}) where there are two outer brackets instead of 1 as in binomial? You can see an example of what I mean in http://en.wikipedia.org/wiki/Multiset under the heading "Multiset coefficients" with the double brackets.
In Wikipedia they typeset it as:
\left(\!\!{n\choose k}\!\!\right)
but although this works well for LaTeX in maths mode, with inline equations the outer bracket becomes much larger than the inner bracket.
I have also tried using
\genfrac{((}{))}{0pt}{}{n}{k}
but it has an error with the double brackets.
I am using \binom as well in my document, so I would like the bracket sizes to be similar for \binom and \multiset.
You can explicitly specify the size of the brackets via
\big( \Big( \bigg( or \Bigg(
Then use \! for negative space to get the brackets closer to each other.
One can use the e-TeX \middle command as follows:
\newcommand{\multibinom}[2]{
\left(\!\middle(\genfrac{}{}{0pt}{}{#1}{#2}\middle)\!\right)
}
This assumes that you are using the AMSmath package. If not, replace \genfrac with the appropriate construct using \atop.
(Of course this is a hack: the proper solution would be scalable glyphs for the doubled parenthesis, but I can't find any fonts that provide it.)
I'm surprised it wasn't googlable either, so I'll provide a solution here for posterity's sake.
It is also possible to define two different new commands, using \tbinom and \dbinom (section 4.11.2 of the User's Guide for the amsmath Package):
\documentclass{article}
\usepackage{amsmath}
\newcommand{\inlinebnm}[2]{\ensuremath{\big(\!\tbinom{#1}{#2}\!\big)}}
\newcommand{\displybnm}[2]{\bigg(\!\!\dbinom{#1}{#2}\!\!\bigg)}
\begin{document}
Text $\inlinebnm{a}{b}$ text. %% inline
Text \inlinebnm{a}{b} text. %% inline (also ok thanks to ensuremath)
\[
\displybnm{a}{b} %% display-style
\]
\end{document}
I am writing a document in spanish, and I'm trying to add 'í' to the word
Montréal.However if I put the i like this: \'{e} in the code below, I just get a space instead of the é. Why is this not working?
\begin{tabbing}%
\hspace{2.3in}\= \hspace{2.6in}\= \kill % set up two tab positions
{\bf Engineer}\> Panagro S.A.\> Summers 2004-2010\\
\>Montréal, Colombia
\end{tabbing}\vspace{-15pt}
Also I might add that when I try putting Montréal outside of the tabbing block, it works fine.
Ted
Tabbing environment
Some of the accent marks used in running text have other uses in the tabbing environment. In that case they can be created with the following command:
\a' for an acute accent
\a` for a grave accent
\a= for a macron accent
source: LaTeX/Accents at Wikibooks
Related question on tex.stackexchange with a great solution to accented characters.
Save your file as UTF-8 and put
\usepackage[utf8]{inputenc}
\usepackage[T1]{fontenc}
in your preamble.
Then you can just type the characters normally into your source file.
Or, use XeLaTeX which accepts UTF-8 input natively. In that case you need to add
\usepackage{fontspec}
to your preamble.
If your text editor doesn't support UTF-8 encoded files, you should probably get another editor. But if you're stuck with one, you can also use:
\usepackage[latin1]{inputenc} % for PCs
\usepackage[applemac]{inputenc} % for Macs
and save the files in the default encoding for your machine.
Thanks to Alan Munn for the solution!
How do I type a QED symbol - I want a full box and not an empty box like \qed gives you. (I'm not using \begin{proof})
You can use \blacksquare ■:
When creating TeX, Knuth provided the symbol ■ (solid black square), also called by mathematicians tombstone or Halmos symbol (after Paul Halmos, who pioneered its use as an equivalent of Q.E.D.). The tombstone is sometimes open: □ (hollow black square).
\documentclass{scrartcl}
\usepackage{amssymb}
\begin{document}
$\backslash$blacksquare: $\blacksquare$
$\backslash$square: $\square$
\end{document}
You can easily find such symbols with http://write-math.com
When you want to align it to the right, add \hfill.
I use:
\renewcommand{\qed}{\hfill\blacksquare}
\newcommand{\qedwhite}{\hfill \ensuremath{\Box}}
If you \usepackage{amsmath}, the \blacksquare command will typeset a solid black square. The \square command will give you a hollow square.
The ulsy package has a few version of the lightning bolt for contradictions: \blitza, \blitzb, ..., \blitze. Just drop \usepackage{ulsy} into the preamble of your document.
Finally, as others have pointed out, the Comprehensive LaTeX Symbols List is a great resource for finding the perfect symbol for the job.
Add to doc header:
\usepackage{ amssymb }
Then at the desired location add:
$ \blacksquare $
As described here, you can redefine the command \qedsymbol, in your case - to \blacksquare:
\renewcommand{\qedsymbol}{\ensuremath{\blacksquare}}
This works both with \qed command and proof environment.
What about \blacksquare? http://amath.colorado.edu/documentation/LaTeX/Symbols.pdf
\rule{1.2ex}{1.2ex} will give you a filled box.
\fbox{\phantom{\rule{.7ex}{.7ex}}} will give you an empty box. The \phantom command will typeset with invisible ink.
The advantage of this approach is that no package is needed. Also the size is up to your control. Less is more.
Simple answer:
In the preamble make sure you have \usepackage{amssymb}
Then in the preamble we can define this simple command: \newcommand{\qed}{\hfill $\blacksquare$}
Then whenever you want the QED symbol to complete a proof, you type \qed.
If you prefer a hollow square, replace \blacksquare with \square
I think you are looking for this:
\newcommand*{\QEDA}{\hfill\ensuremath{\blacksquare}}
Usage:
\begin{example}
blah blah blah \QEDA
\end{example}
The question specifically mentions a full box and not an empty box and not using proof environment from amsthm package. Hence, an option may be to use the command \QED from the package stix. It reproduces the character U+220E (end of proof, ∎).
I am trying to write programming code in latex using the verbatim environment, but when I write
\begin{verbatim}
char ch = 'x';
\end{verbatim}
then the ' -characters around x are displayed incorrectly (they look "curly"). How can I fix this problem?
Load the upquote package to fix this issue in verbatim mode.
If you want straight quotes in monospaced text mode (e.g., \texttt{...}), or indeed in any other font, then you can use the \textquotesingle command defined in the textcomp package:
\documentclass{article}
\usepackage{upquote,textcomp}
\begin{document}
\newcommand\upquote[1]{\textquotesingle#1\textquotesingle}
\verb|'c'| \texttt{\upquote{h}}
\textsf{\upquote{h}} \upquote{h}
\end{document}
This will work well for fonts in any encoding rather than depending on a specific glyph slot (such as \char13 in the default OT1 encoding).
Adding \usepackage{upquote} to my preamble was sufficient.
Perhaps older versions of LaTeX or upquote required more work.
I have
What is wrong?
New
If you want to get something like this
write
\makeatletter
\let \#sverbatim \#verbatim
\def \#verbatim {\#sverbatim \verbatimplus}
{\catcode`'=13 \gdef \verbatimplus{\catcode`'=13 \chardef '=13 }}
\makeatother
For displaying source code, you might consider using the listings package; it is quite powerful and offers an option to display “straight” quotation marks.
If you're seeing curly single right quotes in a verbatim environment, then the single right quote in your typewriter font is curly, and that's the correct one to use for what you're doing (which I assume is displaying some C code).
\textsf{``} and \textsf{''} come pretty close to straight quotes. No need for using any special packages.
This is what I got from another source, and this works.
Use `` to start the double quotes (this symbol is below ~ symbol on our keyboard)
Use '' to close the double quotes (this symbol is below the " symbol on our keyboard)
So, `` quote double, unquote double''
Same goes for single quotes, `quote single, unquote single'
I want to know if there is some way to change that full stop after Definition. to a colon, i.e. to get Definition: (and for the other environments in the "definition" theoremstyle).
The easiest approach may be to define yourself a new style:
\newtheoremstyle{stylename} % name of the style to be used
{spaceabove}% measure of space to leave above the theorem. E.g.: 3pt
{spacebelow}% measure of space to leave below the theorem. E.g.: 3pt
{bodyfont}% name of font to use in the body of the theorem
{indent}% measure of space to indent
{headfont}% name of head font
{headpunctuation}% punctuation between head and body
{headspace}% space after theorem head; " " = normal interword space
{headspec}% Manually specify head
In this case, you would copy the existing definition style, and then change the value of headpunctuation.
AMS LaTeX should be included in any modern distribution. It (or the amsthm standalone package ([docs here PDF link!)) provides the \theoremstyle and \newtheoremstyle commands.