Preface: Dear Ritlabs, thank you for %CALC. It was a good decision to implement it, all critics were wrong ;-)
Hi list, I made a new macro for footnotes like in KorrNews. This is how to use it. Write a mail, for example: ,----- [ Mail text before ] | Dear Melissa, | | do you know The Bat!? What a fantastic E-Mail client it is. You can | download it directly from Ritlabs (FN:www.ritlabs.com#) or write a mail | to John (FN:[EMAIL PROTECTED]#) to bla bla bla ... | | -- | Best regards | Carsten '----- Now copy the whole text into the clipboard, call the QT (<Ctrl>+a, <Ctrl>+x, fn <Ctrl>+<Space>) and your mail looks like: ,----- [ Mail text after ] | Dear Melissa, | | do you know The Bat!? What a fantastic E-Mail client it is. You can | download it directly from Ritlabs [1] or write a mail | to John [2] to bla bla bla ... | | [1] www.ritlabs.com | [2] [EMAIL PROTECTED] | -- | Best regards | Carsten '----- You still have to <Alt>+L the paragraph and everything is okay. I experienced that it is better first to write a paragraph and then add the (FN:blablabla#), so the lines shrink to nearly normal length after cutting out (FN:blablabla#) by the QTs, and you might not need <Alt>+L Footnotes are being pasted right above the '-- ' or - if there is none - under the last line. !!! The maximum number of footnotes is 9 !!! BTW I used the first character in %COMMENT to store the counter "variable". Doing this you can define as many "variables" as you want. Everything seems possible :-) Tested only with TB! 1.54/10e. Please report bugs (including fixes ;-) to the list. I hope %REM documentation is clear enough for you to modify the QTs for your own special likings. --[ QT: fn ]==----====----====----====----====----====----====----====-- %REM='Footnotes'%- %REM=''%- %REM='Copy counter and clipboard into comment'%- %REM='Call fn2'%- %REM='Cut counter variable out of comment'%- %REM='Print and clear comment'%- %COMMENT='0%CLIPBOARD'%- %QINCLUDE='fn2'%- %SETPATTREGEXP='(?ism).(.*)'%- %REGEXPMATCH='%COMMENT'%- %COMMENT=''%- --====----====----====----====----====----====----====----====----====-- fn2 is only called by fn and itself. =-[ QT: fn2 ]-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=- %REM='Is there still a (FN:.*$#)?'%- %REM='If yes: Split and rebuild comment'%- %REM=' Increase counter and save it in position 1.'%- %REM=' Cut FN text and paste it to the right place'%- %REM=' Call this QT again.'%- %- %IF:'%- %SETPATTREGEXP="(?ism)\(FN:.*?#\)"%- %REGEXPMATCH="%COMMENT"'<>''%- :'%- %COMMENT=_%- %SETPATTREGEXP="(?ism)(.)(.*?)(\(FN:(.*?)#\))(.*?)(^-- $.*|\z)"%- %REGEXPBLINDMATCH="%COMMENT"%- %CALC="%SETPATTREGEXP=�(.)�%REGEXPMATCH=�%COMMENT�+1"%- %subpatt="2"%- [%CALC="%SETPATTREGEXP=�(.)�%REGEXPMATCH=�%COMMENT�+1"]%- %subpatt="5"%- [%CALC="%SETPATTREGEXP=�(.)�%REGEXPMATCH=�%COMMENT�+1"] %SUBPATT="4" %SUBPATT="6"_%- %- %QINCLUDE="fn2"'%- =-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=- -- Best regards, Carsten The Bat! (v1.54/10e) Business Windows NT 5.0 (Build 2195) Service Pack 2 -- ______________________________________________________ Archives : http://tbtech.thebat.dutaint.com Moderators : mailto:[EMAIL PROTECTED] Unsubscribe: mailto:[EMAIL PROTECTED]
