Text Formatting ⇒ Begriffsschrift
Begriffsschrift
I'm using the begriff package for Frege.
I have one tiny snag with it, that I was hoping someone might have a solution to.
Now, it is a small problem, so it's not the end of the world if I can't solve it, but if someone happens to have an answer to hand, I would be very grateful.
I am trying to recreate this statement from Function and Concept.
\setlength{\BGafterlen}{10 mm}
\hspace{30 mm}$$\BGassert 2 + 3 = 5$$
The slight problem with this is that the assert line is below the following numbers. That is, it is looks like this: _2 rather than like this -2, which I would prefer.
I mean, I would like the assert line to point to the middle of the characters.
Does anyone know a solution to this using begriff or a simple tweak of the package that might help?
Thanks so much,
Junket
NEW: TikZ book now 40% off at Amazon.com for a short time.
And: Currently, Packt sells ebooks for $4.99 each if you buy 5 of their over 1000 ebooks. If you choose only a single one, $9.99. How about combining 3 LaTeX books with Python, gnuplot, mathplotlib, Matlab, ChatGPT or other AI books? Epub and PDF. Bundle (3 books, add more for higher discount): https://packt.link/MDH5p
Re: Begriffsschrift
<text>
<begriff>
<text>
?
Thanks for the help!
Re: Begriffsschrift
I've figured out the answer to my second question - it was pretty obvious actually! Still stuck on question number one though.
Thanks!
Begriffsschrift
The Begriffsschrift figures just need to be in math mode, so you just need to use inline math mode rather than displayed math mode if you want it on the same line as the text. So put the commands for the figure inside \(...\) rather than inside \[...\]. The plain TeX equivalent of \( ... \) is the single dollar signs, $...$, and you can use that too. The plain TeX equivalent of \[ ... \] is what you were using $$ ... $$, but it's best not to use that any more, for reasons explained in l2tabu.Also, a second question, is it possible to use the begriff notation without automatically going onto a new line - namely, can we have <text><begriff><text> rather than
I know exactly what you mean, and this is the really the only thing I don't like about the begriff package. Suggestion below...junket wrote: The slight problem with this is that the assert line is below the following numbers. That is, it is looks like this: _2 rather than like this -2, which I would prefer.
I mean, I would like the assert line to point to the middle of the characters.
My solution has been to use a \raisebox from the graphicx package at the end of each line. This takes its contents out of math mode, so you can put them back in with \ensuremath{...}. In your case, for example, you might use (change 0.3em to whatever looks good to you).Does anyone know a solution to this using begriff or a simple tweak of the package that might help?
Code: Select all
\( \BGassert\raisebox{-0.3em}{\ensuremath{2+3=5}} \)
Code: Select all
\renewcommand{\BGterm}[1]{\unskip%
\setbox0=\hbox{%
\setlength{\BGlinewidth}{0pt}%
\vrule height \baselineskip depth 0pt width 0pt% strut
\vrule height \BGthickness width \BGafterlen depth 0pt%
\ensuremath{\hskip\BGspace \raisebox{-0.3em}{\ensuremath{#1}}}%
}
\vrule height \BGthickness width \BGlinewidth depth 0pt%
\box0%
\setlength{\BGlinewidth}{0pt}%
}%
Code: Select all
\(\setlength{\BGlinewidth}{0.8em}\BGassert\BGterm{2+3=5}\)
Finally, you might consider defining a command that will set this length along with putting you in math-mode. You might also throw in another raisebox correction for putting the text part back inline with the surrounding text. So this would look like:
Code: Select all
\newcommand{\inlinebegriff}[2]{%
\raisebox{0.3em}{\(\setlength{\BGlinewidth}{#1}#2\)}%
}
Code: Select all
\inlinebegriff{0.8em}{\BGassert\BGterm{2+3=5}}
Here's a complete document that throws some of these ideas together:
Code: Select all
\documentclass{article}
\usepackage{graphicx}
\usepackage{begriff}
\renewcommand{\BGterm}[1]{\unskip%
\setbox0=\hbox{%
\setlength{\BGlinewidth}{0pt}%
\vrule height \baselineskip depth 0pt width 0pt% strut
\vrule height \BGthickness width \BGafterlen depth 0pt%
\ensuremath{\hskip\BGspace \raisebox{-0.3em}{\ensuremath{#1}}}%
}
\vrule height \BGthickness width \BGlinewidth depth 0pt%
\box0%
\setlength{\BGlinewidth}{0pt}%
}%
\newcommand{\inlinebegriff}[2]{%
\raisebox{0.3em}{\(\setlength{\BGlinewidth}{#1}#2\)}%
}
\newcommand{\displaybegriff}[2]{%
\[ \raisebox{0.3em}{\ensuremath{\setlength{\BGlinewidth}{#1}#2}} \]%
}
\begin{document}
From \inlinebegriff{0.8em}{\BGassert\BGterm{2+3=5}} and \inlinebegriff{1.0em}{\BGassert\BGifb{2+3=5}{3+4=7}} one may infer \inlinebegriff{0.8em}{\BGassert\BGterm{3+4=7}}.
\displaybegriff{1.5em}{\BGassert\BGif{\BGifb{A}{B}}{\BGif{\BGnot\BGterm{B}}{\BGnot\BGterm{A}}}}
\end{document}
What are you working on, out of curiousity? There aren't a lot of people who write on Frege. I might be interested professionally in what you're writing.
Re: Begriffsschrift
Thank you for your brilliantly detailed post. I have been out of action for a few days and am deeply sorry I have not been here to thank you sooner. I should have made sure to check sooner.

Your solution looks excellent, and I really look forward to attempting to employ it!
In terms of what I am working on, I am just a Computer Science student with a little background in philosophy. I have been asked to help to gather some primary-source based material for a course on Discrete Structures and provide a few comments etc, so I am including some Frege, Russell, Cantor, Hilbert and so on. I think it's a nice idea to expose students to this material (or is it vice versa?). The work has been great fun, and has inspired in me something of an interest in the philosophy of mathematics, which I never really explored before.
I also want to leave behind a template that others can change or build upon later, or use for their own work, so your help with the Begriffsschrift is invaluable in this regard.
I am afraid that my knowledge of Frege is rather limited, and I have little or no German.
I think Frege's relationship to Computer Science is quite interesting. I gather he fell afoul of paradox due to his Basic Law V, re: Werthverlauf. However in Computer Science it is best practice to consider a function as a relation.
I am not sure whether that would greatly console him.
Thank you again for all your help!

Best,
Junket
- localghost
- Site Moderator
- Posts: 9202
- Joined: Fri Feb 02, 2007 12:06 pm
Begriffsschrift
Thorsten
Board Rules
Avoidable Mistakes
¹ System: TeX Live 2025 (vanilla), TeXworks 0.6.10