Take the 2-minute tour ×
TeX - LaTeX Stack Exchange is a question and answer site for users of TeX, LaTeX, ConTeXt, and related typesetting systems. It's 100% free, no registration required.

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

share|improve this question
1  
Don't put "please help me" in your question; it's redundant. (You obviously don't ask a question without wanting help to solve it.) –  Svend Tveskæg Mar 5 at 8:21
1  
for the first part of the question, using only selected symbols, see Importing a Single Symbol From a Different Font –  barbara beeton Mar 5 at 14:17

2 Answers 2

up vote 6 down vote accepted

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

share|improve this answer
    
Thank you. It seems to me that this code do smth with \forall, \subseteq, all \mathcal{} letters, http-links in the reference e.c.t. –  Vladimir Parkhomenko Mar 5 at 8:32
1  
@VladimirParkhomenko I know, I've edited the answer. Now it is OK. –  karlkoeller Mar 5 at 8:35

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

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

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