Take the 2-minute tour ×
TeX - LaTeX Stack Exchange is a question and answer site for users of TeX, LaTeX, ConTeXt, and related typesetting systems. It's 100% free, no registration required.

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.

share|improve this question
    
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 '12 at 19:21
3  

1 Answer 1

up vote 7 down vote accepted

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

share|improve this answer
3  
Well, one % per line is enough ;-) Further details: Why the end-of-line % in macro definitions? –  Martin Scharrer Jul 11 '12 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. –  Psachnodaimonia Jul 11 '12 at 23:19
1  
@Psachnodaimonia You could make your introduction complete by accepting the answer which was most helpful to you. –  Stephan Lehmke Jul 12 '12 at 4:09
    
@StephanLehmke: Done! Still finding my way about Stack Exchange. –  Psachnodaimonia Jul 12 '12 at 13:30

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

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