In Schechter's Classical and nonclassical logics, he distinguishes symbols at the semantic level, from those at the syntactic level, by encircling the operators. For example, formal logic uses "∧" (\wedge) for conjunction, while semantic logic uses an encircled version, which can be implemented by \owedge from the stmaryrd package:

owedge symbol

But semantic operators corresponding to implication ("→", \rightarrow) and negation ("¬", \neg) don't exist among the usual symbols. How can these be generated in such a way that they can be used from LyX?

2 Answers 2


Personally, I keep all of my math macros in a separate LyX file that I can then include from other LyX documents (via Insert > File > Child Document). The solution requires placing some of the LaTeX code in a LyX preamble (because LyX macros can't handle the \mathpalette macro's structure). So I also have a separate LaTeX file for the preamble code, which I can then \input{…} in the "LaTeX preamble" setting of both the child and parent LyX documents.

In math-macros-preamble.tex, I place:



\semanticlogic is a macro that takes as its arguments (1) the style macro (provided by \mathpalette) and (2) the operator to be encircled. The \encircled macro wraps \mathpalette so that it's easy to use inside a LyX macro.

In math-macros.lyx, I add \input{math-macros-preamble} to its preamble, then define a macro from \newcommand{\oimplies}{\mathbin{\encircled{\shortrightarrow}}}, giving it a LyX representation like \mathbin{$\ocircle\shortrightarrow$} so that it looks nicer when inlined into the parent document. Similarly, I create \onot as \encircled{\mkern1mu \neg}.

In the parent document, where I use the logic operators, I also add \input{math-macros-preamble} to its preamble, and include math-macros.lyx as a child document.

example semantic relation with operators

  • A related answer—tex.stackexchange.com/questions/53698/…—covers the case where the encircled operator should be centered. Here the operators are left-aligned, as in Schechter's book. It's a matter of taste, certainly.
    – Mike
    May 24, 2022 at 19:55

The circle is a bit thicker, but I believe the emulation is passable.





$X\orightarrow Y\owedge \olnot Z\oleftarrow U$



enter image description here

The second line is to show that the symbol have the same dimensions.

Whether you're able to use this with LyX, I don't know.

  • \mathord is new to me. Is it really necessary?
    – Mike
    May 25, 2022 at 7:10
  • @Mike Not really necessary, but logically better to have it
    – egreg
    May 25, 2022 at 7:17

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .