4

I want to create a symbol similar to \doublebarwedge from the package mathabx, with the wedge replaced by a triangle. Since I want to use both symbols, they should be as similar as possible (regarding size, height, spacing etc.). This is why I would like to see how the symbol \doublebarwedge is defined. I couldn't find anything in the package documentation.

This is not a duplicate: see the comment by David Charlisle below.

  • it's like asking how to see the definition of "g" it is not something defined in tex it is something constructed by the font designer. – David Carlisle Dec 14 '17 at 7:51
  • 3
    Possible duplicate of Display source for a command – Alex Recuenco Dec 14 '17 at 8:01
  • 1
    @AlexRecuenco It's not really a duplicate, you would find out there that it's \doublebarwedge=\mathchar"255A but that doesn't answer the question here of how to see how big the wedge is to make a matching triangle – David Carlisle Dec 14 '17 at 8:05
  • @David, seeing his response to jknappen wonderful answer, I think that is what Larry was looking for. Since, after seeing that it was a font character, he understood that it was out of his reach. Which he would have seen immediately if he had simply typed \show\doublebarwedge – Alex Recuenco Dec 14 '17 at 9:06
4

The mathabx fonts are distributed with METAFONT source code. The relevant source for the double bar wedge sign is found in the file mathabx/source/mathltkl.mf and reads:

beginchar(wedge_eqq,12u#+2appr#,asc_height#,0);% strange choice
  "Wedge-equal sign";
  pickup tiny.nib;
  top y2r=x_height; bot y1r=0; y1r=y1l=y3r=y3l;
  x2r=good.x 0.5w;
  x3r-x2r=x2r-x1r=hround((y2r-y1r+o)/sqrt3);% see wedge sign (+o)
  x1l-x1r=diag_width(rth-tiny,z2r-z1r);
  x3r-x3l=diag_width(rth-tiny,z2r-z3r);
  z2l-z1l=whatever*(z2r-z1r); z2l-z3l=whatever*(z2r-z3r);
  pos4(rth,90); pos5(rth,90); pos6(rth,90); pos7(rth,90);
  y4r=y5r=y2r; y6=y7=y4+spread1;
  lft x4=min(Appr,lft x1r); x5-x3r=x1r-x4; x4=x6; x5=x7;
  filldraw stroke z1e--z2e--z3e; filldraw stroke z4e..z5e;
  filldraw stroke z6e..z7e; penlabels(1,2,3,4,5,6,7);
endchar;

For creating a matching triangle, you just need to change the first filldraw stroke instruction to

   filldraw stroke z1e--z2e--z3e--z1e; % Close the drawing path

Of course you need to build a METAFONT infrastructure around the final source code with driver files and macro packages ( It is easy to grasp from the structure of the mathabx package; There are "driver files" like matha10.mf, macro files like mathbase.mf and finally the character sources like mathsymb.mf. Rename all changed files and plug it together. Feel free to ask another question on this site, when you don't get it right on your own).

  • This looks more complicated than I had expected (I was expecting something like \overset{=}{\wedge}with some spacing-adjustments added). Since I don't know how to deal with driver files etc. I'll probably just stick to defining both symbols myself. But thanks anyway for the detailed answer! – Larry Dec 14 '17 at 9:03

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.