1

In order to distinguish between object language and meta language I want a rather visible difference between the signs mentioned in the title as used in the object language and as used in the formal meta language. How do I best achieve this?

I am not satisfied with the minor difference between $\boldsymbol{{}()\vee} and ${}()\vee$.

Perhaps there are some related symbols in http://linorg.usp.br/CTAN/info/symbols/comprehensive/symbols-a4.pdf that I could use?

  • Maybe changing the font: \mathtt{}? – Sigur Feb 18 '15 at 18:14
  • @Sigur That does not cut it. – Frode Alfson Bjørdal Feb 18 '15 at 18:18
  • Sorry, I'm not following you. Try to clarify your question. – Sigur Feb 18 '15 at 18:20
  • Could you add an image or a minimal example of what exactly should be fat? bold font in math mode would be \mathbf{} or \boldsymbol{} – MaxNoe Feb 18 '15 at 18:22
  • @MaxNoe See my edit. – Frode Alfson Bjørdal Feb 18 '15 at 18:30
  • @Sigur Try to clarify your reading. – Frode Alfson Bjørdal Feb 18 '15 at 18:32
  • @FrodeBjørdal, so what you want is to change the math font locally. – Sigur Feb 18 '15 at 18:34
  • I see your point, for me there is actually no difference between the \mathbf{\vee} and \vee, same for the brackets and parentheses. – MaxNoe Feb 18 '15 at 18:35
  • @Sigur I do not understand how to change the math font locally. – Frode Alfson Bjørdal Feb 18 '15 at 18:39
  • Perhaps there are some alternative related symbols in http://linorg.usp.br/CTAN/info/symbols/comprehensive/symbols-a4.pdf – Frode Alfson Bjørdal Feb 18 '15 at 18:40
  • @FrodeBjørdal, related: http://tex.stackexchange.com/q/200910/14757 – Sigur Feb 18 '15 at 18:44
  • 1
    Fatten could mean "bolden", it could mean "widen" or it could mean "bolden and widen". Which do you seek? – Steven B. Segletes Feb 18 '15 at 20:21
  • @Steven B. Segletes As stated in my question I was seeking visible difference. As I have indicated an acceptance of an answer, how would you enlighten? – Frode Alfson Bjørdal Feb 19 '15 at 18:41
  • I am not sure I understand your follow-up question. "Enlighten" could mean "make the font lighter" or it could mean to "explain my answer". To the latter point, in my answer, I chose the approach of using "embolden" as the primary means of providing a visible difference. A the end of my answer, I added a little bit of "widen" to the "embolden" as a means to further differentiate the glyphs from their original appearance. If you wanted the appearance to be "lighter" rather than "heavier", one might rely on either a narrowing of the glyph perhaps with a gray, rather than black color. – Steven B. Segletes Feb 19 '15 at 18:47
  • @Steven B. Segletes I was just being fastidious. Sorry! I just now realized that you originated the answer I accepted! So I interpreted your first comment here as one that did not take your answer below into account.

    I am very satisfied with your answer, and use the approach you kindly offered.

    – Frode Alfson Bjørdal Feb 19 '15 at 20:46

2 Answers2

1

I introduce \fat that emboldens the argument with a multi-offset-overlay. While it can be invoked in text mode or math mode, its argument is processed in math mode (unless delimited by $ which will process it in text mode). Importantly, the current math style is preserved. For things like \vee, it is easier to define \fvee in terms of \fat and \vee.

\documentclass{article}
\usepackage{scalerel}
\newcommand\fat[1]{\ThisStyle{\ooalign{%
  \kern.46pt$\SavedStyle#1$\cr\kern.33pt$\SavedStyle#1$\cr%
  \kern.2pt$\SavedStyle#1$\cr$\SavedStyle#1$}}}
\def\fvee{\mathbin{\fat{\vee}}}
\begin{document}
$\{(xyz\vee abc)\} \scriptscriptstyle 
 \{(xyz\vee abc)\}$

$\fat\{\fat(xyz\fvee abc\fat)\fat\} \scriptscriptstyle 
 \fat\{\fat(xyz\fvee abc\fat)\fat\}$

\fat aa\fat{$a$}

\end{document}

enter image description here

If you really wanted to enhance the effect, you could add a small horizontal stretch to the result (in this case 20%):

\documentclass{article}
\usepackage{scalerel}
\newcommand\fat[1]{\ThisStyle{\hstretch{1.2}{\ooalign{%
  \kern.46pt$\SavedStyle#1$\cr\kern.33pt$\SavedStyle#1$\cr%
  \kern.2pt$\SavedStyle#1$\cr$\SavedStyle#1$}}}}
\def\fvee{\mathbin{\fat{\vee}}}
\begin{document}
$\{(xyz\vee abc)\} \scriptscriptstyle 
 \{(xyz\vee abc)\}$

$\fat\{\fat(xyz\fvee abc\fat)\fat\} \scriptscriptstyle 
 \fat\{\fat(xyz\fvee abc\fat)\fat\}$

\fat aa\fat{$a$}

\end{document}

enter image description here

0

A solution based on package pdfrender to additionally stroke the symbols with a line width.

\documentclass{article}
\usepackage{amsmath}% for environment "gather*"
\usepackage{pdfrender}

\newcommand*{\fatten}[1][.4pt]{%
  \textpdfrender{
    TextRenderingMode=FillStroke,
    LineWidth={\dimexpr(#1)\relax},
  }%
}

\begin{document}
\begin{gather*}
  (a \vee b) = \{a \vee b\}
\\
  \fatten{(} a \fatten{\vee} b \fatten{)} =
  \fatten{\{} a \fatten{\vee} b \fatten{\}}
\\
  \fatten[1pt]{(} a \fatten[1pt]{\vee} b \fatten[1pt]{)} =
  \fatten[1pt]{\{} a \fatten[1pt]{\vee} b \fatten[1pt]{\}}
\end{gather*}
\end{document}

Result

Caution:

  • The increased stroke width does not contribute to the width of the symbol. A macro can compensate this:

    \newcommand*{\fatvee}[1][1pt]{%
      \mathbin{%
        \kern.5\dimexpr(#1)\relax
        \fatten[{#1}]{\vee}%
        \kern.5\dimexpr(#1)\relax
      }%
    }
    

Full example with width compensation:

\documentclass{article}
\usepackage{amsmath}% for environment "gather*"
\usepackage{pdfrender}

\newcommand*{\fatten}[1][.4pt]{%
  \textpdfrender{
    TextRenderingMode=FillStroke,
    LineWidth={\dimexpr(#1)\relax},
  }%
}

\newcommand*{\fatdef}[4][1pt]{%
  % #1: optional stroke width
  % #2: new macro for fattened symbol
  % #3: math atom type (\mathbin, \mathrel, ...)
  % #4: symbol
  \newcommand*{#2}{%
    #3{%
      \kern.5\dimexpr(#1)\relax
      \fatten[{#1}]{#4}%
      \kern.5\dimexpr(#1)\relax
    }%
  }%
}
\fatdef\fatvee\mathbin\vee
\fatdef\fatlparen\mathopen(
\fatdef\fatrparen\mathclose)
\fatdef\fatlbrace\mathopen\{
\fatdef\fatrbrace\mathclose\}

\begin{document}
\begin{gather*}
  (a \vee b) = \{a \vee b\}
\\
  \fatlparen a \fatvee b \fatrparen =
  \fatlbrace a \fatvee b \fatrbrace
\end{gather*}
\end{document}

Result with width compensation

\left and \right can be supported by a macro that resets the rendering mode for the formula inside the fences:

\documentclass{article}
\usepackage{amsmath}% for environment "gather*"
\usepackage{pdfrender}

\newcommand*{\fatten}[1][.4pt]{%
  \textpdfrender{
    TextRenderingMode=FillStroke,
    LineWidth={\dimexpr(#1)\relax},
  }%
}

\newcommand*{\fatdef}[4][1pt]{%
  % #1: optional stroke width
  % #2: new macro for fattened symbol
  % #3: math atom type (\mathbin, \mathrel, ...)
  % #4: symbol
  \newcommand*{#2}{%
    #3{%
      \kern.5\dimexpr(#1)\relax
      \fatten[{#1}]{#4}%
      \kern.5\dimexpr(#1)\relax
    }%
  }%
}

\newcommand*{\fatleftrightdef}[4][1pt]{%
  % #1: optional stroke width
  % #2: new macro name
  % #3: left fence
  % #4: right fence
  \newcommand*{#2}[1]{%
    \kern.5\dimexpr(#1)\relax
    \fatten[{#1}]{%
      \left#3%
      \kern.5\dimexpr(#1)\relax
      \textpdfrender{TextRenderingMode=Fill}{##1}%
      \kern.5\dimexpr(#1)\relax
      \right#4%
    }%
    \kern.5\dimexpr(#1)\relax
  }%
}
\fatdef\fatvee\mathbin\vee
\fatleftrightdef\fatleftrightparens()
\fatleftrightdef\fatleftrightbraces\{\}

\begin{document}
\begin{gather*}
  \left( \frac{a}{a} \vee \frac{b}{b} \right) =
  \left\{ \frac{a}{a} \vee \frac{b}{b} \right\}
\\
  \fatleftrightparens{ \frac{a}{a} \fatvee \frac{b}{b} } =
  \fatleftrightbraces{ \frac{a}{a} \fatvee \frac{b}{b} }
\end{gather*}
\end{document}

Result with \left and \right

Heiko Oberdiek
  • 271,626