Extensions

Latexify

This extension defines a @latexrecipe for operators, propositions, and TruthTables. Further, calling print_table with the LaTeX backend will latexify the truth table.

julia> using Latexify

julia> @atomize latexify(p ∧ q)
L"$p \wedge q$"

julia> @atomize latexify(TruthTable([p ∧ q]))
L"\begin{tabular}{|l|l|l|}
  \hline
  \textbf{$p$} & \textbf{$q$} & \textbf{$p \wedge q$} \\\hline
  $\top$ & $\top$ & $\top$ \\
  $\bot$ & $\top$ & $\bot$ \\\hline
  $\top$ & $\bot$ & $\bot$ \\
  $\bot$ & $\bot$ & $\bot$ \\\hline
\end{tabular}
"
PAndQ.formatterMethod
formatter(::Latexify.LaTeXString)

Examples

julia> formatter(Latexify.LaTeXString)(true, nothing, nothing)
L"$\top$"

julia> formatter(Latexify.LaTeXString)(false, nothing, nothing)
L"$\bot$"
source