Page 1 of 1

Hanging Indents for APA Formatted References

Posted: Sun Mar 26, 2017 3:51 am
by deeverd
Hello,

Does anyone know if it is possible to create hanging indents with LiveCode? They are a normal part of MS Word paragraph formatting and they are absolutely essential for formatting references in APA style, which is used so commonly at the university in science, nursing, psychology, and education.

I have tried using combinations of the firstIndent command with the leftIndent command, but so far have come up with nothing that works.

Basically, in formatting, a hanging indent consists of a left indent of 0.5 and a first indent of -0.5 in. It seems that the leftIndent completely overrides the firstIndent command, and I can't figure out a way to get them to work together.

If someone knows a way to accomplish it, it would be a really good thing for people to know in education.

Thanks so much in advance,
deeverd

Re: Hanging Indents for APA Formatted References

Posted: Sun Mar 26, 2017 5:23 am
by FourthWorld
In the Dictionary see the leftMargin and firstIndent properties.

Re: Hanging Indents for APA Formatted References

Posted: Sun Mar 26, 2017 6:06 pm
by deeverd
Hi Richard,

Thanks for the advice, however, after an hour of experimenting with a wide variety of variations on using the leftMargin and firstIndent, I still don't get anything that looks like the following:


Witkin, B. R. (1975). An analysis of needs assessment techniques for educational planning at
[indent]state, intermediate, and district levels. Washington, DC: National Institute of Education.[/indent]
[indent]Retrieved from https://eric.ed.gov/?id=ED108370[/indent]


It seems that the firstIndent must be accomplished on the selectedText, and setting the leftMargin is accomplished on the entire field, but after 90 minutes of trying all sorts of combinations, I still haven't found a way of making them mesh to produce a flush first line with the following portions of that paragraph indented.

Any other possible solutions?
Thanks for trying,
deeverd

Re: Hanging Indents for APA Formatted References

Posted: Sun Mar 26, 2017 8:20 pm
by FourthWorld
Did you try a wide margin on the field with a negative value for the firstIndent on the paragraphs you want affected?

Re: Hanging Indents for APA Formatted References

Posted: Sun Mar 26, 2017 9:41 pm
by deeverd
Thanks Richard,

I'll give that a try in a little while and see how it works. If all is well, I'll make a posting afterward, so if anybody else in the future needs to do the same thing, they'll know how it is done.

Appreciate it.

Cheers,
deeverd

Re: Hanging Indents for APA Formatted References

Posted: Sun Mar 26, 2017 10:04 pm
by deeverd
Hello again,

Once more, a no-go. However, I didn't know about the wideMargins option, which definitely enhances the readability in some fields, so that helped. That was good advice.

My guess is that hanging indents might not be a possible text formatting option at this time in LiveCode. I could certainly be wrong, but I've exhausted every way I could think of to try to accomplish it.

Thanks so much for trying.

Cheers,
deeverd

Re: Hanging Indents for APA Formatted References

Posted: Sun Mar 26, 2017 11:11 pm
by FourthWorld
Looking up the APA Style Guide it seems the two property settings I mentioned cover it - what am I missing?:

This:

Code: Select all

on mouseUp
   set the firstindent of line 1 to -1 of fld 1 to -20
   set the leftMargin of fld 1 to 30
end mouseUp
...produces this:

Re: Hanging Indents for APA Formatted References

Posted: Mon Mar 27, 2017 12:30 am
by deeverd
Hello Richard,

I happily stand corrected. Using your script, I see that LiveCode can handle APA hanging indents with no problem.

Afterward, much to my chagrin, I realized the reason I wasn't seeing it was that I had tabs for indents in the text I was working on, which prevented it from looking right. Once the tabs were removed and I activated your script again, I was very pleased to see perfect hanging indents.

Apologies for my goof.

Cheers,
deeverd

Re: Hanging Indents for APA Formatted References

Posted: Mon Mar 27, 2017 12:35 am
by FourthWorld
No worries. I'm just glad you got it working. Ever since v5.5 the LC field object has had a rich depth of features that early fails to satisfy.