4

I asked in this question Calligraphic numbers how to write a calligraphic number and got an answer.

Now I need a notation for k-subsets and use the answer as follows:

\documentclass[a4paper,11pt]{article}
\usepackage[utf8]{inputenc}
\usepackage{amsmath}    
\usepackage{xspace}

%%% for caligraphic number
\newcommand*{\textcal}[1]{%
  % family qzc: Font TeX Gyre Chorus (package tgchorus)
  % family pzc: Font Zapf Chancery (package chancery)
  \textit{\fontfamily{qzc}\selectfont#1}%
}

\newcommand{\ksubsets}[1]{\ensuremath{\textcal{2}^{#1}_{=k}}\xspace}

\begin{document}

\begin{equation}
\sum_{P'\in\ksubsets{P}} \prod_{x \in P'} p_{x}
\end{equation}

\end{document}

formula

But I do not like how this looks. The 2 is too small. How can I change that?

  • Well you could add \displaystyle before \textcal, but that really looks horrible. – Peter Grill Jan 28 '13 at 7:51
6

The cleanest solution is to define a new font family; adjust the [1.2] scaling factor to suit; scaling up of 20% seems to be good.

\documentclass[a4paper,11pt]{article}
\usepackage[utf8]{inputenc}
\usepackage{amsmath}    


% Calligraphic numbers
\DeclareFontFamily{OT1}{sqzc}{}
\DeclareFontShape{OT1}{sqzc}{m}{it}{<-> s * [1.2] rm-qzcmi}{}
\DeclareFontShape{OT1}{sqzc}{m}{sl}{<->ssub * qzc/m/it}{}
\DeclareFontShape{OT1}{sqzc}{m}{n}{<->ssub * qzc/m/it}{}

\DeclareFontFamily{T1}{sqzc}{}
\DeclareFontShape{T1}{sqzc}{m}{it}{<-> [1.2] ec-qzcmi}{}
\DeclareFontShape{T1}{sqzc}{m}{sl}{<->sub * qzc/m/it}{}
\DeclareFontShape{T1}{sqzc}{m}{n}{<->sub * qzc/m/it}{}

\DeclareMathAlphabet{\zcal}{\encodingdefault}{sqzc}{m}{it}

% My command
\newcommand{\ksubsets}[1]{\mathop{\zcal{2}}\nolimits^{#1}_{=k}}

\begin{document}

\begin{equation}
\zcal{123}+123 \ne \sum_{P'\in\ksubsets{P}} \prod_{x \in P'} p_{x}
\end{equation}

\end{document}

This "wastes" a math alphabet, but should pose no problem if you don't load many math fonts. It has an advantage: in the definition of the \ksubsets command one can use \mathop, that slightly lowers the 2, making for a better alignment.

image

3

You could use \mathlarger of the relsize package, to enlarge just the 2:

\newcommand{\ksubsets}[1]{\ensuremath{\mathlarger{\textcal{2}}^{#1}_{=k}}\xspace}

formula

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.