3

It would be great

  1. to use only \medcirc and \circledtimes from the pxfonts or
  2. to design the similar symbols by other techniques.

The symbols from pxfonts are quite well but when I connect the package, all symbols from the text are substituted by the symbols from pxfonts.

\documentclass{article}
\usepackage[T1]{fontenc}
\usepackage{pxfonts}

\begin{document}

1. Only medcirc and cirledtimes symbols are required from pxfonts: \par
 $\cdot^{\medcirc}$ and $\cdot^{\circledtimes}$.\par
2. The problem is that all symbols are substituted by pxfonts package,
 for example, just look at the text and formula $g(f)=a$.

\end{document}

output

There are similar problems with pxfonts, but they seem to be unsolved. Perhaps, it's better to design the symbols by other ways.

Use pxfonts in listings only

Using package locally

2 Answers2

6

If you want to use only those two symbols from pxfonts without loading it, add the following lines in your preamble:

\DeclareSymbolFont{symbolsC}{U}{pxsyc}{m}{n}
\SetSymbolFont{symbolsC}{bold}{U}{pxsyc}{bx}{n}
\DeclareFontSubstitution{U}{pxsyc}{m}{n}
\DeclareMathSymbol{\medcirc}{\mathbin}{symbolsC}{7}
\DeclareSymbolFont{symbolsZ}{OMS}{pxsy}{m}{n}
\SetSymbolFont{symbolsZ}{bold}{OMS}{pxsy}{bx}{n}
\DeclareFontSubstitution{OMS}{pxsy}{m}{n}
\DeclareMathSymbol{\circledtimes}{\mathbin}{symbolsZ}{10}

MWE:

\documentclass{article}
\usepackage[T1]{fontenc}
%\usepackage{pxfonts}

\DeclareSymbolFont{symbolsC}{U}{pxsyc}{m}{n}
\SetSymbolFont{symbolsC}{bold}{U}{pxsyc}{bx}{n}
\DeclareFontSubstitution{U}{pxsyc}{m}{n}
\DeclareMathSymbol{\medcirc}{\mathbin}{symbolsC}{7}
\DeclareSymbolFont{symbolsZ}{OMS}{pxsy}{m}{n}
\SetSymbolFont{symbolsZ}{bold}{OMS}{pxsy}{bx}{n}
\DeclareFontSubstitution{OMS}{pxsy}{m}{n}
\DeclareMathSymbol{\circledtimes}{\mathbin}{symbolsZ}{10}

\begin{document}

1. Only medcirc and cirledtimes symbols are required from pxfonts: \par
 $\cdot^{\medcirc}$ and $\cdot^{\circledtimes}$.\par
2. The problem is that all symbols are substituted by pxfonts package,
 for example, just look at the text and formula $g(f)=a$.

\end{document} 

Output:

enter image description here

karlkoeller
  • 124,410
2

Since you specifically mention designing symbols using other techniques, here is an alternative. I import Karl's accepted solution just to show the comparison of the two.

In the present solution, I use stacks to overlay glyphs, and I use the scalerel package to allow things to scale to the different math styles.

\documentclass{article}
%\usepackage{pxfonts}
%Karls import font solution, for comparison
\DeclareSymbolFont{symbolsC}{U}{pxsyc}{m}{n}
\SetSymbolFont{symbolsC}{bold}{U}{pxsyc}{bx}{n}
\DeclareFontSubstitution{U}{pxsyc}{m}{n}
\DeclareMathSymbol{\medcirc}{\mathbin}{symbolsC}{7}
\DeclareSymbolFont{symbolsZ}{OMS}{pxsy}{m}{n}
\SetSymbolFont{symbolsZ}{bold}{OMS}{pxsy}{bx}{n}
\DeclareFontSubstitution{OMS}{pxsy}{m}{n}
\DeclareMathSymbol{\circledtimes}{\mathbin}{symbolsZ}{10}
%Current solution
\usepackage{graphicx}
\usepackage{stackengine}
\usepackage{scalerel}
\def\mcirc{\scalebox{.7}{$\bigcirc$}}
\def\nmediumcircle{\kern-.1pt\mcirc\kern-6.9pt\mcirc}
\def\ntimesincircle{\mathbin{%
  \stackengine{-.74pt}{\nmediumcircle}{\scalebox{.96}{$\times$}}{O}{c}{F}{T}{L}}}
\def\mediumcircle{\mathbin{%
  \ThisStyle{\scalebox{.87}{$\SavedStyle\scalerel*{\nmediumcircle}{b}$}}}}
\def\timesincircle{\mathbin{%
  \ThisStyle{\scalebox{.87}{$\SavedStyle\scalerel*{\ntimesincircle}{b}$}}}}
\begin{document}
$x\medcirc\circledtimes
\scriptstyle\medcirc \circledtimes
\scriptscriptstyle\medcirc \circledtimes$
Karl's Solution

$x\mediumcircle\timesincircle
\scriptstyle\mediumcircle \timesincircle
\scriptscriptstyle\mediumcircle \timesincircle$
Present Solution
\end{document} 

enter image description here