2. Logic Symbols

Math mode If as a logician you need a tutorial on ‘math mode’ in LaTeX, then you may well find Herbert Voss’s document Math Mode particularly useful.

Basics on symbols

The symbol bible

  • Scott Pakin’s wonderful Comprehensive LaTeX Symbol List— now a mere 14000+ to choose from. Consult the List’s index under …
    • “definite description” for two solutions for inverted iota definite description operator: or a slight tweak is to put \usepackage{ kpfonts} in the preamble and then use {\text{\rotatebox[origin=c]{180}{$\iotaup$}}.
    • “par” for inverted “&” for linear logicians.
    • “iddots” for mathdots command to get three dots going up from south-west to north-east.
    • “alphabets, math” for more alphabets for symbols [in particular, note the package mathrsfs which provides script capitals: usage “$\mathscr{LMN}$”.]
Yet more
  • To use old-style “~” for negation, define a command (e.g. “\oldneg”) in the preamble  by “\newcommand*{\oldneg}{\mathord{\sim}}”. The \sim symbol is pre-defined as a relation symbol and writing “$\sim P$” will produce an unwanted space between the symbols, while “$\oldneg P$” will now, as wanted, produce \sim\!\!P.
  • How to set corner quotes e.g. for Gödel numbers at the right height (Sam Buss).
  • More conditionals: e.g. the “strictif” for the fish-hook sign for strict implication, “boxright” for Lewis’s symbol for the counterfactual, and other Lewisian symbols. These are part of the txfonts and pxfonts packages, which are intended for use with the Times Roman and Palatino fonts, respectively. But (thanks to Richard Zach for this), you can access them e.g. while still using Computer Modern by having the txfont package available and putting this in the preamble to declare the commands \strictif and \boxright:
    • \DeclareSymbolFont{symbolsC}{U}{txsyc}{m}{n}
    • \DeclareMathSymbol{\strictif}{\mathrel}{symbolsC}{74}
    • \DeclareMathSymbol{\boxright}{\mathrel}{symbolsC}{128}
    • \DeclareMathSymbol{\boxRight}{\mathrel}{symbolsC}{136} % Lewis’s stronger ‘would’ counterfactual
    • \DeclareMathSymbol{\diamondRight}{\mathrel}{symbolsC}{140} % Lewis’s stronger ‘might’ counterfactual
    • \DeclareMathSymbol{\diamonddot}{\mathord}{symbolsC}{144} % Lewis’s inner necessity
    • Similarly of course for invoking other symbols you want. To get the number for a symbol to use with \DeclarMathSymbol you can use the method described here.
  • For constructing a considerable variety of turnstile symbol, there is a dedicated turnstile package.
  • If you want a mirror-image of  a turnstile (or indeed other symbols) see also here.
  • For the squiggly turnstile for non-monotonic consequence, and other symbols, there are some solutions here from Gregory Wheeler.
  • Fonts for linear logicians.
  • The gene-logic package offers some enhancements — more generously spaced logic symbols plus another version of a blackboard font.
  • XeTeX users of course have more font options: they can use the unicode-math package to access fonts such as the Asana-Math OpenType font which includes almost all mathematical symbols included in the latest version of Unicode.

Making it look pretty: which maths fonts? Substituting for the standard Computer Modern text fonts raises issues about which is a good choice for a matching maths font for your letter-symbols, etc. There is a gallery of options in the 2nd edition of the Companion. See also info about fonts (the LaTeX FAQ), the Survey of free maths fonts for LaTeX (Stephen Hartke, 2006), recent LaTeX fonts (Michael Sharpe, 2014), and the extensive links page Fonts for mathematics (Luc Devroye, 2014).

Links last checked 30 January 2016

Leave a Reply

Your email address will not be published. Required fields are marked *