2

So, I have been working on writing a package for typesetting "fregean Begriffsschrift". While working on the universal quantifier, I tried raising the semi circular depression in the content stroke, made in a picture environment using the \raisebox command. This has worked fine with respect to raising the picture to the hight I want, but it also inserted 4pt. worth of white space to the left of my picture environment, creating a gap I don't want. I found it possible to get rid of this unwanted space using \kern, however I would like to know exactly why the white space appears.

\newlength{\temp}
\newlength{\Fbaselength}
\setlength{\Fbaselength}{10pt}
\newlength{\Flinewidth}
\setlength{\Flinewidth}{0.5pt}
\newlength{\Fspace}
\setlength{\Fspace}{2pt}
\newlength{\Fraisehight}
\setlength{\Fraisehight}{1ex}
\addtolength{\Fraisehight}{-\Flinewidth}
\newlength{\Fnegsep}
\setlength{\Fnegsep}{3\Flinewidth}
\newlength{\Fnegshort}
\setlength{\Fnegshort}{2\Flinewidth}
\newlength{\Fquantwidth}
\setlength{\Fquantwidth}{6pt}


%%% twice negated universal quantifier
\newcommand{\Fnnquant}[1]
{
  \unskip
  \setlength{\temp}{\Fbaselength}
  \addtolength{\temp}{-0.5\Fquantwidth}
  \addtolength{\temp}{-2\Flinewidth}
  \addtolength{\temp}{-\Fnegsep}
  \rule[\Fraisehight]{0.5\temp}{\Flinewidth}
  \setlength{\temp}{\Fraisehight}
  \addtolength{\temp}{\Flinewidth}
  \addtolength{\temp}{-\Fnegshort}
  \rule[\Fnegshort]{\Flinewidth}{\temp}
  \rule[\Fraisehight]{\Fnegsep}{\Flinewidth}
  \setlength{\temp}{\Fraisehight}
  \addtolength{\temp}{\Flinewidth}
  \addtolength{\temp}{-\Fnegshort}
  \rule[\Fnegshort]{\Flinewidth}{\temp}
  \setlength{\temp}{\Fbaselength}
  \addtolength{\temp}{-0.5\Fquantwidth}
  \addtolength{\temp}{-2\Flinewidth}
  \addtolength{\temp}{-\Fnegsep}
  \rule[\Fraisehight]{0.5\temp}{\Flinewidth}
  \setlength{\unitlength}{\Fquantwidth}
  % \kern-4pt
  \raisebox{\Fraisehight}{
  \begin{picture}(1,0)(0,0)
    \linethickness{\Flinewidth}
    \qbezier(0,0)(0.5,-0.6666)(1,0)
  \end{picture}}
  %% \kern-\Fquantwidth
  %% \setlength{\temp}{0.5\Fquantwidth}
  %% \addtolength{\temp}{-0.45ex} 
  %% \vbox{\hbox to \Fquantwidth{\hskip\temp\ensuremath{^#1}}\vskip0.2\Fraisehight}
  \setlength{\temp}{\Fbaselength}
  \addtolength{\temp}{-0.5\Fquantwidth}
  \rule[\Fraisehight]{\temp}{\Flinewidth}
  \hskip\Fspace
}

The relevant bit of the code is that between the two sections that have been commented out.

2
  • Welcome to TeX.SX! An example of usage would be best. However you have many spaces (in the form of newline characters) in the definition of \Fnnquant. In particular there should be a % just after the final { in the \raisebox line.
    – egreg
    Jul 11, 2012 at 19:21
  • 3

1 Answer 1

7

You are missing % at the ends of lines so getting spaces in your output.

\newcommand{\Fnnquant}[1]
{%%%%%%
  \unskip
  \setlength{\temp}{\Fbaselength}%%%%%%
  \addtolength{\temp}{-0.5\Fquantwidth}%%%%%%
  \addtolength{\temp}{-2\Flinewidth}%%%%%%
  \addtolength{\temp}{-\Fnegsep}%%%%%%
  \rule[\Fraisehight]{0.5\temp}{\Flinewidth}%%%%%%
  \setlength{\temp}{\Fraisehight}%%%%%%

etc etc

4
  • 3
    Well, one % per line is enough ;-) Further details: Why the end-of-line % in macro definitions? Jul 11, 2012 at 19:34
  • Sometimes things can be so simple. Thanks for the quick replies. There goes my first vaguely embarrassing newbie question. I am sure there will be more to follow. Jul 11, 2012 at 23:19
  • 1
    @Psachnodaimonia You could make your introduction complete by accepting the answer which was most helpful to you. Jul 12, 2012 at 4:09
  • @StephanLehmke: Done! Still finding my way about Stack Exchange. Jul 12, 2012 at 13:30

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.