Following up on the discussion about how to get this to work in practice, here's a modification to Josef's solution which allows one to use anaphoric pronouns linked to the current state. Pronominal anaphora is quite complicated, so even this solution would only work for a limited set of cases, but it would still be a bit of an improvement.
Update: I've implemented this solution as the he-she
package.
The problem arises in sentences like the following:
- If someone thinks \heshe is sick, he should go to the doctor.
(As Norman notes, it's perfectly colloquiual English to use 'they' for these sorts of pronouns, but since that's not up for debate here, we'll soldier on :-) )
In sentence (1) we need the pronoun in the main clause to match in gender with the pronoun in the 'if'-clause. If we use the \heshe
macro we won't know what the gender is, however, since it will change depending on how many times it has previously been used.
So we really need two macros: one for the switch, and one for anaphoric reference to the current gender state. I've implemented this simply by creating one extra macro within Josef's solution (of course the same idea works for Martin's as well.)
\documentclass{article}
\usepackage{xspace}
\newif\ifhe\hetrue
\newcommand*\heshe%
{%
\ifhe%
he%
\global\hefalse%
\else%
she%
\global\hetrue%
\fi%
\xspace
}%
\newcommand*\he%
{\ifhe%
she
\else%
he%
\fi
\xspace
}
\begin{document}
If someone thinks \heshe is sick \he should go to a doctor immediately.
When \he goes to the the doctor, \heshe can figure out the problem.
\end{document}
This is a more linguistically useful version than restricting the scope of the change to a single sentence, since in the second sentence of the source example, there are two instances of a pronoun: the first is anaphoric to the previous sentence (and so should match in gender, but the second can be assigned a new gender.)

You can put the following in your preamble:
\DeclareSymbolFont{mdsymbols} {OMS}{mdput}{m}{n}
\DeclareSymbolFont{mdlargesymbols}{OMX}{mdput}{m}{n}
\DeclareMathDelimiter{\lbrace}
{\mathopen}{mdsymbols}{"66}{mdlargesymbols}{"08}
\DeclareMathDelimiter{\rbrace}
{\mathclose}{mdsymbols}{"67}{mdlargesymbols}{"09}
\renewcommand{\textbraceleft}{%
{\fontfamily{mdput}\fontencoding{OMS}\selectfont\char"66}}
\renewcommand{\textbraceright}{%
{\fontfamily{mdput}\fontencoding{OMS}\selectfont\char"67}}
We define two new math symbol fonts from which we draw the braces.
Here's what results from $\{\bigl\{\Bigl\{\biggl\{\Biggl\{$
:

Compare it with the original result simply with the fourier package:

When also amsmath is loaded, the result can be different, because the package redefines \big
and family. For braces I get the correct result with
\makeatletter
\renewcommand{\big}{\bBigg@{1.1}}
\renewcommand{\Big}{\bBigg@{1.415}}
\renewcommand{\bigg}{\bBigg@{2.1}}
\renewcommand{\Bigg}{\bBigg@{2.5}}
\makeatother
but this breaks the scaling of parentheses (which happens with fourier anyway).
Best Answer
You can use double brackets for Iverson brackets. In latex mathmode, you can use:
\llbracket
from thestmaryrd
package. In latex textmode, you can use:\textlbrackdbl
from thetextcomp
package. Here is the code:The above will compile and look like the following: