Here's my go-to sewing machine, a Bernina 630, and my portable sewing table, a SewEzi -- it's my regular sewing table as my sewing room is so small! For the demo, I cleaned off my old marked line and the blue painter's tape 1/4 inch guide I had taped to the acrylic insert. It's all nice and clean now except for the scratches on the insert. (It's well-used!)
First, you will need a ruler you trust has straight lines. A good quilting acrylic ruler will work with 1/4 inch marks on the periphery will work. I removed my sewing foot and carefully put the ruler on the bed of my machine and table, aligning the 1/4 inch line on the outside edge of the ruler underneath the sewing needle. Drop the need down carefully by turning the hand wheel until it gently touches the acrylic ruler a smidgen to the right of 1/4 inch mark. Don't apply any pressure to the acrylic ruler with your needle. You don't want to break anything. The "smidgen to the right" leaves a little room to draw a line on the acrylic with an ultrafine Sharpie. You can always skip the marker and just apply a piece of painter's tape there if you wish.
Before you draw your line (or place your painter's tape), you will need to make sure your ruler is square on the bed of your machine or your line will not be perpendicular from the needle. I used the outer margins of the acrylic insert and made sure the ruler lines were straight from side to side and up and down on the edges of the clear acrylic insert. Carefully, draw a straight line on the acrylic insert (or use painter's tape) and all the way up to the needle of your machine, if you can, using the ruler as a guide. My silver base plate will not take a mark with a Sharpie, so I left it unmarked.
Carefully raise the needle, again using the hand wheel, and remove the ruler. I like to take out my acrylic insert and flip it over and trace the line onto the backside of the ruler. Then I remove the marked line on the front of the acrylic base with rubbing alcohol and a cotton ball. This way I know that the line is not going to smudge off on anything important.
If you don't have an acrylic insert that you can mark a line on the underneath side and must mark your line on the top side of your machine or table, I would really suggest using painter's tape instead of a permanent marker. You don't want anything rubbing off on your fabric or hands as you sew!
After marking my line, I like to add a 1/4 seam guide using painter's tape. I layer five strips or so of painter's tape on my cutting mat and take a ruler and rotary cutter and get a nice clean, straight cut on all four sides of the painter's tape. Then I apply on my insert 1/4 inch away from the line I just drew, using my ruler as a guide. I don't extend the painter's tape off the insert as I don't want to have to reapply the painter's tape each time a bobbin needs changing since I have to remove the insert to change the bobbin.
Time for a test sew! These are 2 x 2 inch squares. To get a scant 1/4 inch I always sew with my needle one notch to the right when straight piecing because I really love it when the both feed dogs touch the fabric. Also, I don't let the fabric extend to the right of the presser foot. My way of achieving a scant 1/4 is not the only way or the perfect way, it's just my way. You may have to adjust your line/painter's tape if you achieve your scant 1/4 seam a different way.
It may be a little hard to tell, but my unit came out at exactly 3-1/2 inches x 2 inches which affirms my 1/4 inch painter's tape guide is set in the right place. For the heck of it, I put my unit back in the machine and sewed it again, just to see if I could sew right on top of the first sewn line, using my painter's tape guide, and I did.
Now, test the perpendicular line from the needle. Adjust your needle one notch to the left or right, line your square points up with the line drawn, and sew. Don't forget, you will be sewing a hair off to either the right or left side, depending which side you have shifted your needle to, when you start sewing on the corner, all the way through the block, and when you sew off the corner, but the points of the block are going to be lining up with the line we just drew on the machine bed. Sewing slightly to the right or left of midline allows you to achieve a scant 1/4 inch seam allowance so when you press your block open, it should have an accurate measurement.
On my test below, the diagonal line on the ruler covers the center of the two sides of the triangles, exactly down the middle, and the two triangles are sewn into a nice 2 inch square.
If you are having trouble with your scant 1/4 inch seams or trouble sewing triangles, maybe give these tips a try. I'm sure your machine and table are different than mine but hopefully this will get your creative thinking going so that you, too, can easily mark the bed of your machine and table and have more fun with piecing and less time ripping out blocks that aren't measuring up!