18

Here's is some code for a variant exclamation point despite its various short comings (such as non-scalability)

\documentclass[12pt]{article}
\usepackage{tikz}
\usetikzlibrary{calc}

\newcommand\bigexclaim{%%
  \tikz{%%
    \node[circle,fill,inner sep=0.55pt] (A) at (0,0)     {};
    \coordinate                         (B) at (0,2.5ex)   ;
    \draw[fill,rounded corners=1.25pt] ($(A)!1.5pt!-23:(B)$) -- 
                                       ($(A)!1!-16:(B)$)     -- 
                                       ($(A)!1!-30:(B)$)     -- 
                                        cycle;
  }}
\newsavebox{\myexclamationptbox}
\savebox{\myexclamationptbox}{\bigexclaim}
\newcommand{\myexclamationpt}{\usebox{\myexclamationptbox}\kern-2pt}

\begin{document}

  Prove\myexclamationpt    \par
  Prove!

\end{document}

enter image description here

For math mode we've got various formatting commands such as \mathbin, \mathrel, and \mathpunct to get the spacing correct around new binary operators, relations, and punctuation. Is there something similar for creating custom punctuation marks? Is there glue that should be considered? Or is this all just a matter of guessing until you like what you see?

10

About the spacing before and after, you are the judge. Possibly some small space before the sign is needed.

However, the most evident thing you're missing is the space factor code.

\documentclass[12pt]{article}
\usepackage{tikz}
\usetikzlibrary{calc}

\newcommand\bigexclaim{%%
  \tikz{%%
    \node[circle,fill,inner sep=0.55pt] (A) at (0,0)     {};
    \coordinate                         (B) at (0,2.5ex)   ;
    \draw[fill,rounded corners=1.25pt] ($(A)!1.5pt!-23:(B)$) -- 
                                       ($(A)!1!-16:(B)$)     -- 
                                       ($(A)!1!-30:(B)$)     -- 
                                        cycle;
  }}
\newsavebox{\myexclamationptbox}
\savebox{\myexclamationptbox}{\bigexclaim}
\newcommand{\myexclamationpt}{\usebox{\myexclamationptbox}\kern-2pt}
\newcommand{\Smyexclamationpt}{\usebox{\myexclamationptbox}\kern-2pt
  \spacefactor\sfcode`\!\relax}


\begin{document}

Prove\myexclamationpt{} Something after

Prove! Something after

\bigskip

Prove\Smyexclamationpt{} Something after

Prove! Something after

\bigskip\hrule\bigskip


\xspaceskip=20pt % just to emphasize the effect

Prove\myexclamationpt{} Something after

Prove! Something after

\bigskip

Prove\Smyexclamationpt{} Something after

Prove! Something after

\end{document}

In the upper half we have the same input but with the two different versions, below is the "space factor adjusted" one.

In order to emphasize the effect and show better what happens, in the lower half the same input is typeset, but with \xspaceskip set to 20pt, which magnifies the extra space TeX uses after punctuation.

enter image description here

  • Is it possible to redefine the usual exclamation point so that this new stylized one shows up? That is, using "!" instead of \myexclamationpt? – Steve D Oct 7 '13 at 19:08
  • 1
    @SteveD You could, but it's not advisable: \catcode`\!=\active\def!{\myexclamationpt}. Don't tell anybody you learned it from me. – egreg Oct 7 '13 at 19:17
7

I realize this doesn't answer the main thrust of your question, but you can make it scaleable, with the scalerel package.

\documentclass[12pt]{article}
\usepackage{tikz}
\usetikzlibrary{calc}
\usepackage{scalerel}

\newcommand\bigexclaim{%%
  \tikz{%%
    \node[circle,fill,inner sep=0.55pt] (A) at (0,0)     {};
    \coordinate                         (B) at (0,2.5ex)   ;
    \draw[fill,rounded corners=1.25pt] ($(A)!1.5pt!-23:(B)$) -- 
                                       ($(A)!1!-16:(B)$)     -- 
                                       ($(A)!1!-30:(B)$)     -- 
                                        cycle;
  }}
\newsavebox{\myexclamationptbox}
\savebox{\myexclamationptbox}{\bigexclaim}
\newcommand{\myexclamationpt}{%
  \scaleto{\kern1pt\usebox{\myexclamationptbox}\kern-2pt}{2.5ex}}

\begin{document}

  Prove\myexclamationpt    \par
  \scriptsize Prove\myexclamationpt    \par
  \tiny  Prove\myexclamationpt    \par
  \normalsize Prove!

\end{document}

enter image description here

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.