frege.sty L TEX 2εPckge for Typesetting Begriffsschrift Quirin Pmp Quirin.Pmp.2009@my.bristol.c.uk ugust 4, 2012 1 Bckground 1.1 Motivtion for this Pckge I recently decided to red Frege s Begriffsschrift from 1879 nd found tht the only copy I could find online ws rther poor qulity scn of the originl. Since the copyright on germn publictions expires some 70 or so yers fter the deth of their uthor, I hd the bright ide to combine reding the pper with the mking of n electronic copy. This required the typesetting of begriffsschrift. quick serch on the internet ssured me tht there ws LTeX pckge for just this purpose, nd off I went. However I quickly noticed tht it would be very difficult to chieve typesetting I deemed sufficiently close to the originl using only the pckge begriff by Josh Prsons. Despite the fct tht I hve never written LTeX pckge before, quick look t the source file (only some 300 or so lines with plenty of comments) long with some hed scrtching convinced me to embrk on this further project. With the help of the begriff pckge nd the good people on Stck- Exchnge, I eventully produced pckge tht ws ble to do everything tht the originl begriff pckge cn, lbeit with few chnges I consider n improvement. Further versions lrgely reflect dditionl fetures I dded s I continue to type up Frege s originl pper, s well s bug fixes nd input 1
by members of the LTeX community. Once I m done I will dd the tex file for Fege s pper s the definitive exmple for the usge of this pckge. 1.2 The begriff Pckge This pckge is bsed on begriff.sty relesed under the GNU Generl Public License. Copyright (C) 2003 by Josh Prsons (josh@coombs.nu.edu.u) with chnges mde in October 2004 by Richrd Heck (heck@fs.hrvrd.edu) nd minor chnges by Josh Prsons to fix problem with linespcing mde in My 2005. While I could not hve done so without the forementioned work, I hve reworked the pckge from the ground up, to the point where some of the underlying pproches hve chnged. On the downside this mens there is no simple wy of converting nything typeset using begriff.sty to use this pckge insted. I felt this ws necessry to chieve n end result I ws hppy with. 1.3 The bguq Pckge Since version 1.3 I dded the option to use the bguq chrcter for ll quntifiers. This chrcter is provided by the bguq pckge by J.J. Green. 2 Version History 2.1 Chnges s Compred to begriff.sty correct (closer to the originl typesetting) reltive lengths of the content stroke with respect to other strokes ttched to it; content strokes point t the middle of the following symbols, rther thn the bottom; greter width for the ssertion stroke s compred to the content stroke; more intuitive structure for the conditionl (rguments re now given in the sme order s they pper on the left of completed formul); the commnd for the conditionl with empty rguments now results in verticl line (conditionl stroke) on it s own the other strokes re dded s the rguments; 2
the linewidth is properly ccounted for so tht things remin properly centered when scled; 2.2 Chnges in Version 1.1 dded n optionl scle fctor to ll bsic strokes; simplified the code for Fbrcket in terms of tht for Fbox; rerrnged the code in the style file in more logicl wy; 2.3 Chnges in Version 1.2 dded new commnd Frgument for typesetting rguments; dded new commnd Fstrut to be used in conjunction with Frgument; chnged Fbselength to be equl to the full length of bsic stroke (20pt); fixed bug where the scle fctor introduced in version 1.1 does not reset fter ll uses; 2.4 Chnges in Version 1.3 mde the (): used in the Frgument commnd introduced in version 1.2 user defined so s to mke the option properly optionl; dded strut to Frgument so s to produce visully correct centering; dded optionl shorthnds for ll commnds for better flow of usge; dded the option bguq to the pckge which uses the bguq font by J.J. Green for ll quntifiers; 2.5 Chnges nd Fetures yet to come wy to disply nested rguments; the fregen conjunction (it exists); verticl shorthnd stroke such s used by Frege for typesetting rguments in his originl pper; scling symbols utomticlly with chnges in font size; scling of the bguq chrcter with chnges in Flinewidth; 3
3 Fetures nd Usge 3.1 Commnds 3.1.1 Bsic Commnds The following is list of the bsic commnds provided by this pckge long with ccompnying output nd the optionl shorthnd for the commnd. Commnd: Output: Shorthnd: \Fcontent[1] \Fncontent[1] \Fnncontent[1] \Fcontent[1] \Fncontent[1] \Fnncontent[1] \Fqunt[1]{} \Fnqunt[1]{} \Fnnqunt[1]{} \Fquntn[1]{} \Fquntnn[1]{} \Fnquntn[1]{} \Fnquntnn[1]{} \Fnnquntn[1]{} \Fnnquntnn[1]{} \Fqunt[1]{} \Fnqunt[1]{} \Fnnqunt[1]{} \Fquntn[1]{} \Fquntnn[1]{} \Fnquntn[1]{} \Fnquntnn[1]{} \Fnnquntn[1]{} \Fnnquntnn[1]{} \F[1] \Fn[1] \Fnn[1] \F[1] \Fn[1] \Fnn[1] \Fq[1] \Fnq[1]{} \Fnnq[1]{} \Fqn[1]{} \Fqnn[1]{} \Fnqn[1]{} \Fnqnn[1]{} \Fnnqn[1]{} \Fnnqnn[1]{} \Fq[1]{} \Fnq[1]{} \Fnnq[1]{} \Fqn[1]{} \Fqnn[1]{} \Fnqn[1]{} \Fnqnn[1]{} \Fnnqn[1]{} \Fnnqnn[1]{} 4
This my seem like dunting list, but there is n exceedingly simple wy to think bout it. In sense there re only two commnds \Fcontent[1] nd \Fqunt[1]{}. These two commnds cn be ugmented with combintion of s nd ns so s to dd ssertion nd negtion strokes respectively. ny stroke tht is sserted (hs ft verticl line t the strt) strts with \F. This my be followed by either one or two or no n to dd one or two or no negtion strokes (the smll verticl lines below the content stroke). Next comes the nme of the min commnd, either qunt or content. Finlly the quntifiers my be followed by either one or two n to dd one or two negtion strokes to the content stroke fter the quntifier s depression. Consider lso tht mny of these commnds re only relly present for completeness ske. It is difficult to imgine sitution where twice negted quntifier with twice negted content would ever be needed. Since version 1.1 ll bsic strokes lso hve n optionl scling fctor. commnd followed by [.5], for exmple would produce stroke exctly hlf the defult length while [2] produces stroke twice the defult length. (The defult length is given by \Fbselength which is set to 20pt. Scling llows for greter control in the totl length of formul s well s for shorter syntx. (We cn replce expressions like \Fcontent \Fcontent with \Fcontent[2].) Cre must be tken not to set length tht is shorter thn wht is needed to fit ll the prts of some bsic stroke. This will led to negtive lengths nd hence unpredictble output. ll quntifiers lso hve mndtory rgument tht specifies the vrible ssocited with the quntifier. (Mndtory rguments re contined in set of curly brckets { nd }). This rgument should be single smll letter nd will be typeset bove the semi circulr depression in the ssertion stroke in mthfrk font which is provided by th mssymb pckge. This font cn be used in mths mode by using the commnd \mthfrk{}. Note tht ll the commnds provided by this pckge my be used in both mth nd text mode. (Though mth mode usully results in better formtting.) Finlly one my combine the bove commnds in rbitrry combintions b which will result in gpless longer strokes. (Eg.: ) which my be roughly trnslted into english s for ll there exists b such tht. (The commnds I used for this expression re $\Fqunt{}\Fnquntn{b}$). 5
3.1.2 Conditionl The conditionl is the most importnt commnd in this pckge since it gives Frege s Begriffsschrift it s two dimensionl structure. The syntx for the Fconditionl commnd is s follows: \Fconditionl[<option>] {<consequent>}{<ntecedent>} The shorthnd version (since version 1.3) is given by \Fcdt. The rguments my in principle be nything, but you will only get begriffschrift formul if the rguments re themselves given by pproprite commnds from the list of bsic commnds given erlier. s n exmple, n sserted conjunction between nd B would be given s follows: $\Fconditionl[\Fncontent]{\Fncontent }{\Fcontent B}$ nd produce the following output: In ddition Fconditionl my be nested s it s own rgument to rbitrry depth. Nesting in the option is not recommended. conditionl with nested consequent my be given s follows: $\Fconditionl[\Fcontent]{\Fcontent\Fconditionl{\Fcontent }{\Fcontent B}}{\Fcontent\Fcontent C}$ nd produces the following output: conditionl with nested ntecedent my be given s follows: $\Fconditionl[\Fcontent]{\Fcontent \Fcontent }{\Fcontent\Fconditionl {\Fcontent B}{\Fcontent C}}$ nd produces the following output: Ech section of content stroke my thus be replced with ny of the strokes given by the list of bsic commnds. Note tht it is up to the user to plce the 6 B B C B C
pproprite number of strokes in ech rgument to ensure tht the content strokes ll line up on the right hnd side. 3.1.3 Brckets nd Boxes There re two more commnds to be considered: \Fbox{<complex expression>} The shorthnd version (since version 1.3) is given by \Fb{} \Fbrcket{<complex expression>} The shorthnd version (since version 1.3) is given by \Fbb{} Both Fbox nd Fbrcket tke wht I hve clled complex expression for their rgument. complex expression is ny formul in begriffsschrift tht hs t lest one conditionl in it. It is generlly good ide to put ll complex expressions into either Fbox or Fbrcket. It is never necessry to plce complex expressions into both n Fbox nd n Fbrcket since n Fbox simply is Fbrcket without the ctul brckets. Fbrcket exists only for convenience with the sme effect being chieved by \left(\fbox{} \right). The reson why the Fbox is good ide, is tht the bseline is very ner the top of complex expression of Begriffsschrift, which cn mke for some odd formtting effects. In ddition to plcing the bseline t the middle of complex expression n Fbox ensures the expression is treted by LTeX s single object nd given enough spce. Finlly complex expression my not formt correctly in some environments (like the lign* environment for exmple) unless it is plced in n Fbox. In short, lwys use n Fbox (or Fbrcket). 3.1.4 rguments nd Struts Since version 1.2 two commnds hve been dded tht llow for the typesetting of rguments. The syntx for the rgument commnd is s follows: \Frgument[<premise 0>]{<premise 1>}{<premise 2>}{<conclusion >} The shorthnd version (since version 1.3) is given by \Frg In the following esmple the optionl rgument for premise 0 (n bsent premise tkes the vlue (X) : the premises re the two formuls bove the therfore line nd the conclusion is the formul below the therefore line. The Begriffschrift expressions in the rguments of the Frgument commnd do not need to be plced in n Fbox, since the Frgument commnd works by 7
boxing it s rguments llredy. (X) : B C C where X = B; (this is typeset sepertely from the Frgument commnd); The three begriffsschrift formuls bove re in fct ligned leftbound. To mke them pper rightbound no mtter wht the reltive lengths of, B, nd C, the commnd Fstrut hs been used in front of C nd. The commnd \Fstrut[1] works exctly like n invisible content stroke, tht is it inserts spce of length Fbselength. Like ll bsic strokes it cn be scled vi n optionl scle fctor. Since version 1.3 it my be clled by the optionl shorthnd \Fs 3.2 Lengths In theory ll the dimensions in this pckge cn be chnged with the commnd \setlength{<nme of length>}{<new vlue>}, though I hve not done gret del of testing nd recommend sticking to the defult vlues. The following then is tble of ll lengths: nme defult vlue description \Fbselength 20pt the length of the bsic strokes \Flinewidth 0.5pt the line width \Fspce 2pt sepertion between lines nd text/formul \Fssertwidth 3\Flinewidth width of ssert stroke \Friseheight 1ex-\Flinewidth height of content lines bove bseline \Fnegsep 3\Flinewidth sepertion between double negtion \Fnegshort 2\Flinewidth spce between negtion stroke nd bseline \Fquntwidth 6pt width of the semi-circulr quntifier depression the height of the conditionl stroke is determined by the size of the contents of the conditionls rgument, s well s the bselineskip of the surrounding text. It cnnot be chnged mnully. 8
3.3 The bguq Option Since version 1.3 this pckge my be clled with the option bguq s follows: \usepckge[bguq]{frege} If the option is enbled ll quntifiers will be typeset using the bguq font provided by the bguq pckge by J.J. Green. (This document is typeset using the option). This mens tht the bguq pckge must be instlled if the option is enbled. (It cn be found on ctn). Wrning: t present the bguq chrcter scles with font size while the rest of the symbols provided by this pckge do not. lso the bguq chrcter does not respond to chnge in Flinewidth. 3.4 Finl Exmple The Gech-Kpln sentnce (with thnks to Mrcus Rossberg): F c d b ( ) C() f F() F(b) c = d F(d) F(c) (c, d) nd tht is ll. For comments, suggestions, identified errors, emil me t <Q.Pmp.2009@my.bristol.c.uk>. 9