Well, I thought using regex could be easier here, but I could not find a
simple solution!



Best wishes
Mohammad


On Mon, Apr 12, 2021 at 1:38 AM Charlie Veniot <[email protected]> wrote:

> Yeah, that would be more flexible to modify the rules.  Which would be
> also nice in the sense that you could use the data feeding the filter to
> also feed a documentation page to present nice help info related to the
> rules for Title Case.  Entered once, and multi-purpose.  Very cool.
>
> But, it would then be easier to modify the rules.  Which could be bad in
> some scenarios?   Just playing Devil's advocate, which I don't get to do
> very often.
>
> On Sunday, April 11, 2021 at 2:29:25 PM UTC-3 Mark S. wrote:
>
>> What is "!isblack[]" ?
>>
>> That looks like fairly short, crisp code.
>>
>> On Sunday, April 11, 2021 at 4:16:53 AM UTC-7 Mohammad wrote:
>>
>>> I am trying to *peacefully *;-) :-) :-) convert the title of a book or
>>> article to title case (see
>>> https://apastyle.apa.org/style-grammar-guidelines/capitalization/sentence-case
>>> )
>>>
>>> So I wrote a code like below
>>>
>>> \define myTitle()
>>> multidisciplinary and multicultural knowledge transfer and sharing in
>>> higher education teamworking
>>> \end
>>>
>>> \define minorWords() a an and but for in on of
>>>
>>> <$list filter="[<myTitle>titlecase[]split[ ]!isblack[]]" variable=p2>
>>> <$list filter="[<minorWords>search::literal<p2>then<p2>lowercase[]]
>>> ~[<p2>]" variable=p3>
>>> <<p3>>
>>> </$list>
>>> </$list>
>>>
>>> This works fine, but seems lengthy and bad practice! What do you
>>> propose? Can search-replace with regex do the job?
>>>
>>>
>>> Best wishes
>>> Mohammad
>>>
>> --
> 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/a484c623-f3e3-4ec3-9a4e-bd29cdb7c45en%40googlegroups.com
> <https://groups.google.com/d/msgid/tiddlywiki/a484c623-f3e3-4ec3-9a4e-bd29cdb7c45en%40googlegroups.com?utm_medium=email&utm_source=footer>
> .
>

-- 
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/CAAV1gMDLMgyJaBm38TqPSSVnS855YLW8%2B8TgpZJ8DAJvtMXc3g%40mail.gmail.com.

Reply via email to