Want to highlight a helpful answer? Upvote!

Did someone help you, or did an answer or User Tip resolve your issue? Upvote by selecting the upvote arrow. Your feedback helps others! Learn more about when to upvote >

Looks like no one’s replied in a while. To start the conversation again, simply ask a new question.

Can change 'left/right' TextEdit margins, but not 'top/bottom'

I have seen various solutions to changing TextEdit's default margins (1440 pixels -or- 1 inch). These involve changing the pixel spec in the codes that can be viewed when "Ignore Rich Text Commands" is selected in the File > Open dialog.
There are supposed to be codes for each of the four dimensions: i.e., left, right, top and bottom. However, when I view these codes I see only codes for 'left' and 'right.' When I attempted to create codes for 'top' and 'bottom' they simply appeared in the document text itself.
Can anyone explain why that may be happening, and how I can also alter the top and bottom margins?
Thanks.

MacBook, Mac OS X (10.6.3), 1.83 MHz

Posted on May 20, 2011 11:06 AM

Reply
3 replies

May 20, 2011 9:50 PM in response to dymar

Because, the TextEdit programmers don't think you should be able to do simple text editor things like change margins. It's been borked since Tiger, when I made a new template with smaller margins. Good luck trying to use those command. BTW, the revised template only has smaller top and side margins. Nothing I've tried makes the bottom margin less than 1".

May 22, 2011 12:00 AM in response to baltwo

I just couldn't understand why the codes would work only for the 'left' and 'right' margins, but not the 'top' and 'bottom' margins. Since there appear to be no codes for 'top' and 'bottom,' those defaults must be embedded in the 'new document' template in some other (non-editable) way (i.e., non-editable using direct entry of codes).


But try the following method, I think it works (example uses 1/2" margins, but any spec should work):


Create a RTF document containing:


{\rtf1\mac\ansicpg10000\cocoartf824\cocoasubrtf480

{\fonttbl}

{\colortbl;\red255\green255\blue255;}

{\info

{}}\margl720\margr720\margt720\margb720\vieww15400\viewh17940\viewkind1\viewscal e100

}


Save this and then use it as a template with 1/2" margins all the way around. Adust the 720 as you need. 1440 = 1" so do the math.


Source URL: http://forums.macrumors.com/showthread.php?t=101021

May 22, 2011 12:18 PM in response to dymar

Thanks for the feedbact. Since i changed my template years ago, I didn't chase down any other method. This works splendidly. Perusing your post and the linked article, I've refined it as follows:


http://forums.macrumors.com/showthread.php?t=101021


See Chad Woodburn's 22 Dec 04 post


First, open the file viewing the RTF codes


• Launch TextEdit.

• CMD+N for a new document, save it as your new template as RTF, and close the document.

• Do a Command-O and select your new template.

• Check the "Ignore rich text commands" option box.

• Click "Open".

• This displays the document's header information.


Second, change the margins RTF codes


• In the document header you'll see a line that specifies the margins. It begins this way: "\margl1440". The "marg" refers to "margin", and the letters that follow it stand for the margin sides: "l" = left, "r" = right, "t" = top, "b" = bottom. I believe that 1440 equals 1 inch. So, 20 equals one pixel on a 72 dpi screen.

• Change the numbers to your liking.

• Save the document and close it.

• Reopen the document (without checking the "Ignore Rich Text Commands") and "presto": you've got your margins changed. Piece of cake.


This gives you ½" margins


{\rtf1\ansi\ansicpg1252\cocoartf1038\cocoasubrtf350

{\fonttbl}

{\colortbl;\red255\green255\blue255;}

\margl720\margr720\margb720\margt720\vieww12240\viewh17800\viewkind1

}

Can change 'left/right' TextEdit margins, but not 'top/bottom'

Welcome to Apple Support Community
A forum where Apple customers help each other with their products. Get started with your Apple ID.