Thanks Mark.
Yes. I do similar things already. But where I'm coming from (and Mario) is
that traditional macros do not aid writing "free text", i.e. *prose*.
In fact, I think it was you that wrote the paragraph regex I'm already
using (out of which came regexps, if i remember correctly).
Ring any bells?
\define toc-get-text-context(find)
<$set name=f value=
'[title<foundTiddler>get[text]regexps[(?g)(\w|\s|\,|\.|\-|“|”|\`|\?|\x22|\x27|\/\/){1,50}$find$(\w|\s|\,|\.|\-|“|”|\`|\?|\x22|\x27|\/\/){1,100}]first[5]]'
>
<h2 class="bg-text">Sections</h2>
...and it goes on...
Sincere aplogies to Josiah for having hijacked his thread :(
On Tuesday, August 20, 2019 at 1:09:33 PM UTC-5, Mark S. wrote:
>
> You know, you could already do something sort of like that with macros:
>
> \define show-macro(macro)
> <$reveal type="match" state=<<qualify "$macro$">> text="show">
>
> <<$macro$>>
> </$reveal>
> <$button set=<<qualify "$macro$">> setTo="show">Show</$button>
> <$button set=<<qualify "$macro$">> setTo="hide">Hide</$button>
>
>
> \end
>
> \define GAN-010()
> !! The Great Anhk-Porkian Novel
>
> The waters of the Anhk River were flowing briskly that day. Which meant,
> for most of the neighborhood, that they could function as a form of
> moving sidewalk. Albeit, one you might be stuck to forever.
>
> \end
> \define GAN-020()
> !!! A Chat with DEATH
>
> But the flow of the river matched the slower, more leisurely flow of
> photons from the Desk World sun. The flight flowing slower, necessarily
> putting an upper limit on everyone's activities, per the Anne Stein's
> law of Relativity. To wit, if you were a relative of Anne Stein, the
> curvaceous bar-maid, then maybe you better make your order and hurry up
> with it.
>
> At the end of the bar sat a tall, lonely figure wearing a black shroud, a
> permanent grin, and a large toupee.
>
> \end
>
> <<show-macro "GAN-010">>
> <<show-macro "GAN-020">>
>
> If there was a way to find all the macros inside a tiddler, then you
> wouldn't need to individually invoke them.
>
> --Mark
>
> On Tuesday, August 20, 2019 at 9:56:57 AM UTC-7, coda coder wrote:
>>
>>
>>
>> On Tuesday, August 20, 2019 at 10:41:59 AM UTC-5, PMario wrote:
>>>
>>> On Tuesday, August 20, 2019 at 4:13:39 PM UTC+2, coda coder wrote:
>>>
>>> Hmmm, That's a similar thought as I posted in the thread: IDEA
>>> Multi-line Fields ... Possible implementation
>>> <https://groups.google.com/forum/#!topic/tiddlywiki/42_bWs-f2YY>
>>>
>>>
>> Ha! almost identical :)
>>
>>
>>> Defining prose text like this, would make it technically accessible.
>>>
>>
>> That's the key - addressability.
>>
>>
>>> ... But there wouldn't be the "beauty" of a continuous writing process.
>>>
>>>
>> Agreed. But I don't see a way around that. I guess something like @@
>> could be used (or !headings again, which terminate at the next identical
>> !heading or end of field).
>>
>> But, to be clear, I was suggesting \define-section be used *inline*, not
>> at the start of the text like macros:
>>
>> Stuff and things
>>
>> \define-section my-section
>> More stuff
>> \end
>>
>> And more things
>>
>>
>> Then the transclusion previously mentioned digs them out (or they're
>> double-stored in data-fields for easier lookup/retrieval).
>>
>>
--
You received this message because you are subscribed to the Google Groups
"TiddlyWiki" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
To view this discussion on the web visit
https://groups.google.com/d/msgid/tiddlywiki/4360c4ab-aca4-4277-88c9-ffe7ba68882f%40googlegroups.com.