It’s the little things . . . like hanging indents

Towards the end of the day I was asked for an easy way for students and others to do “properly-formatted (hanging indent) citations.” As I use URLs for citation I had never thought of this. A little googling and it seems to be a common issue for people and I eventually hit this old vintage1 video from Clint Lalonde (who I recognized immediately from his Twitter avatar).

After seeing one jerk’s comment I felt a great need to make something even sort-of-good come from Clint’s effort to share something good with the world.

Behold. The simplest possible WordPress shortcode plugin (SPWPSP – if you’re playing at home). And while it’s no SPLOT, it is very, very simple and it gives you the magical hanging indent.

Just write [hangit]”None to Claim Their Bones: Relics of an Old Brooklyn Graveyard.” New York Times 8 Apr. 1888: 3-4. ProQuest Newspapers. Web. 10 June 2006.[/hangit] and you’ll get a nice hanging indent.

I did have to change the shortcode to an enclosing shortcode (one that opens and close- like an HTML tag) to deal with quotes and apostrophes that are likely to show up in the citations.

This is all it takes.

function hangit_shortcode( $atts, $content = null ) {
return '<p style="margin-left:.5in;text-indent:-.5in;">' . $content . '</p>';
add_shortcode( 'hangit', 'hangit_shortcode' );

Get it on Github here.

1 YouTube defines vintage as anything over a year old.

One thought on “It’s the little things . . . like hanging indents

Comments are closed.