The situation is the following, I have one font a with one feature and another font b with another feature and I am writing a command that if the current font is a need to switch to font b but if the font is c needs to do nothing. Basically:
if currentfont is a set font b
How can this be accomplished?
EDIT: Okey I will admit that I asked this question because I was working on a solution for this question and I thought this if else question was a separate question (was I wrong?) but now I am stuck for real... I have spent some time trying to follow the suggestions from the answers here but I keep failing. This example:
\documentclass[oneside]{memoir}
\usepackage[osf]{mathpazo}
\usepackage{helvet}
\usepackage{ifthen}
\makeatletter
\renewcommand*{\thechapter}{%
\ifthenelse{%
\equal{\f@family}{pplj}%
}%
{%
{\fontfamily{ppl}\selectfont%
\textsc{\roman{chapter}}}%
}%
{%
\textsc{\roman{chapter}}%
}%
}%
\makeatother
\renewcommand{\cftchapterpagefont}{\fontfamily{pplj}\selectfont\bfseries}
\renewcommand{\cftsectionpagefont}{\fontfamily{pplj}\selectfont}
\captionnamefont{\sffamily\scshape\small}
\captiontitlefont{\sffamily\small}
\begin{document}
\tableofcontents
\chapter{The number 4 is more than 2}
\section{The number 4 is}
If I write chapter \ref{anotherChapter} like this is
looks oki.
But the number in the header is a small i not a \textsc{i} and same
thing in the table of content and the chapter header\dots
\begin{figure}
\caption{Lorem ipsum}
\center \LARGE LOREM IPSUM
\end{figure}
\section{More than 4}
Lorem ipsum dolor sit amet, consectetur adipiscing elit. Curabitur
tempus facilisis nunc, sit amet suscipit ligula fermentum ac. Ut
fringilla, elit eget facilisis venenatis, risus massa viverra sem, a
placerat massa odio a mauris
\chapter{Another chapter}
\label{anotherChapter}
\end{document}
Gives this error (edited):
! Undefined control sequence.
<argument> \equal
{\f@family }{pplj}
l.29 \chapter{The number 4 is more than 2}
?
Seems I have gotten myself into a lot of trouble using these old style numbers... What am I doing wrong?
ifthen
package withetoolbox
as I did in my answer.phv
now) does approximately what you want, but theppl
font features only "faked" small caps.