Follow Techotopia on Twitter

On-line Guides
All Guides
eBook Store
iOS / Android
Linux for Beginners
Office Productivity
Linux Installation
Linux Security
Linux Utilities
Linux Virtualization
Linux Kernel
System/Network Admin
Programming
Scripting Languages
Development Tools
Web Development
GUI Toolkits/Desktop
Databases
Mail Systems
openSolaris
Eclipse Documentation
Techotopia.com
Virtuatopia.com
Answertopia.com

How To Guides
Virtualization
General System Admin
Linux Security
Linux Filesystems
Web Servers
Graphics & Desktop
PC Hardware
Windows
Problem Solutions
Privacy Policy

  




 

 

30.12.6 Indentation in Formatted Text

When editing formatted text, you can specify different amounts of indentation for the right or left margin of an entire paragraph or a part of a paragraph. The margins you specify automatically affect the Emacs fill commands (see Filling) and line-breaking commands.

The Indentation submenu provides a convenient interface for specifying these properties. The submenu contains four items:

Indent More
Indent the region by 4 columns (increase-left-margin). In Enriched mode, this command is also available on C-x <TAB>; if you supply a numeric argument, that says how many columns to add to the margin (a negative argument reduces the number of columns).
Indent Less
Remove 4 columns of indentation from the region.
Indent Right More
Make the text narrower by indenting 4 columns at the right margin.
Indent Right Less
Remove 4 columns of indentation from the right margin.

You can use these commands repeatedly to increase or decrease the indentation.

The most common way to use them is to change the indentation of an entire paragraph. For other uses, the effects of refilling can be hard to predict, except in some special cases like the one described next.

The most common other use is to format paragraphs with hanging indents, which means that the first line is indented less than subsequent lines. To set up a hanging indent, increase the indentation of the region starting after the first word of the paragraph and running until the end of the paragraph.

Indenting the first line of a paragraph is easier. Set the margin for the whole paragraph where you want it to be for the body of the paragraph, then indent the first line by inserting extra spaces or tabs.

The variable standard-indent specifies how many columns these commands should add to or subtract from the indentation. The default value is 4. The overall default right margin for Enriched mode is controlled by the variable fill-column, as usual.

There are also two commands for setting the left or right margin of the region absolutely: set-left-margin and set-right-margin. Enriched mode binds these commands to C-c [ and C-c ], respectively. You can specify the margin width either with a numeric argument or in the minibuffer.

Sometimes, as a result of editing, the filling of a paragraph becomes messed up—parts of the paragraph may extend past the left or right margins. When this happens, use M-q (fill-paragraph) to refill the paragraph.

The fill prefix, if any, works in addition to the specified paragraph indentation: C-x . does not include the specified indentation's whitespace in the new value for the fill prefix, and the fill commands look for the fill prefix after the indentation on each line. See Fill Prefix.


 
 
  Published under the terms of the GNU General Public License Design by Interspire