Adding Space between Categories

Started by Josebr, March 26, 2023, 09:26:26 PM

Previous topic - Next topic

Josebr

How do I add space between categories as they show up beneath each photo? Right now they all run in together.  

Also how do get them to word wrap so that they don't disappear to the right of the bottom of the photo?

Mario

Did you create a custom layout that shows categories in thumbnail panels?
None of the default layouts does this.

If you have created a custom template, just replace the ; IMatch uses to separate categories with ;<blank>
(<blank> means a SPACE character).
Word-wrapping will work automatically once there is a space. Except you want word-wrapping also within category names. In that case you also need to replace | with |<blank> so IMatch can wrap long category paths too.

The help topics on variables shows how to do this, e.g. in the example for Using Persons Variables or in the help topic for replace itself: replace:This==That or in the Tune Your File Window Layouts in the IMatch Knowledge Base.
-- Mario
IMatch Developer
Forum Administrator
http://www.photools.com  -  Contact & Support - Follow me on 𝕏 - Like photools.com on Facebook

Josebr

Thanks Mario,
Yes, I am using a custom layout. When I added the <blank>, it made the categories underneath each photo disappear. This is what I typed

{File.Categories.Direct|level:-0};<blank>

Attach are two photos which show the the results of what I typed. Maybe I have the syntax wrong?


Mario

I used <blank> to indicate where to place the SPACE character. Don't use <blank> but a space.
-- Mario
IMatch Developer
Forum Administrator
http://www.photools.com  -  Contact & Support - Follow me on 𝕏 - Like photools.com on Facebook

Josebr

Mario, something is not right with what I am doing. I have tried:
{File.Categories.Direct|level:-0}; < >
{File.Categories.Direct|level:-0};< >
{File.Categories.Direct|level:-0}; <>
{File.Categories.Direct|level:-0};  (with a space without the < >

And all of them cause the text underneath the photo to disappear.
Can you please show me what you are indicating by using my above examples and showing me what it should look like?

thrinn

{File.Categories.Direct|level:-0;pereplace:~;== }should to the trick. Note that there is a space before the closing curly bracket. And because this space is not easy to see, Mario used <blank> as a placeholder.

The expressions you tried were missing the pereplace function which is vital because it does the replacement. Normally, to replace X with Y, you could use
pereplace:X==Ybut because ; is used also as separator in variable expressions (here: to separate the "level" part from the "pereplace" part), we have to use "~;". (~ is a "escape" character). And you want to replace ; not with Y, but with a space, so there is a space after the ==.
Thorsten
Win 10 / 64, IMatch 2018, IMA

Mario

The links I've included in my initial reply show how to use replace and how to replace ; with another character like a comma or a space line feed or whatever is needed. The An Alternative: Let It Wrap tip shows how to make hierarchical keywords wrap by replacing ; with a , and a space (blank). Same works for categories or other repeatable tags.

I know learning about variables can feel a bit complicated when you just start. But there are tons of examples in both the Variables help topic and other topics that show how to use variables. It is well worth reading.
-- Mario
IMatch Developer
Forum Administrator
http://www.photools.com  -  Contact & Support - Follow me on 𝕏 - Like photools.com on Facebook

Josebr

Thank you Mario and Trinn. I was able to add a coma and space after each category. It still will not word wrap. It is easier to read now.  I don't know if AN Alternative: Let It Wrap is code or a title to look for?

Mario

#8
Quote from: Josebr on March 27, 2023, 06:09:52 PMThank you Mario and Trinn. I was able to add a coma and space after each category. It still will not word wrap. It is easier to read now.  I don't know if AN Alternative: Let It Wrap is code or a title to look for?
Just follow the Tune Your File Window Layouts link I have provided to you in my very first reply.

All what we shown here works as intended. Maybe your definition of wrap is different than mine.
Using {File.Categories.Direct|level:-0;pereplace:~;==, } tells IMatch to replace ; with a comma and a space. Long category names will no longer be clipped but wrapped into new lines where the blanks are:

Image2.jpg

Using {File.Categories.Direct|level:-0;pereplace:~;=={lf}} to replace ; with a line-feed (line break) produces this result:

Image3.jpg

All these examples are from the Variable help topic (see my link in my first reply to your question) and the Knowledge Base article (see the second link in my original reply).

I cannot explain this any better than I already did.
-- Mario
IMatch Developer
Forum Administrator
http://www.photools.com  -  Contact & Support - Follow me on 𝕏 - Like photools.com on Facebook

Josebr

Using the text above

{File.Categories.Direct|level:-0;pereplace:~;=={lf}}

does not give me the results in your example. Nothing has changed in regards to categories wrapping to the next line. The lines under my photos remain straight forward and disappear to the right. In the attachment provided, you can see the keywords attached to that particular photo are more than can be seen under the photo.

Mario

Set the Size property to 100 or 200 pixels.
You are limiting the size to one row unless you change it.
-- Mario
IMatch Developer
Forum Administrator
http://www.photools.com  -  Contact & Support - Follow me on 𝕏 - Like photools.com on Facebook

Josebr

Yay!!!! 
That did it. I set it to 200, 100, 80 and settled on 100. Thank you all. I can now see what I am doing even better than before.

Mario

Quote from: Josebr on March 29, 2023, 10:16:09 PMYay!!!!
That did it. I set it to 200, 100, 80 and settled on 100. Thank you all. I can now see what I am doing even better than before.

Excellent!

Now you know why IMatch is liked by so many.
You can customize it in so many ways to do what you need it to do.

If you like IMatch, tell others about it. Word of mouth is the best marketing I can afford for IMatch ;)

Adobe alone spends 150,000,000 dollars per years on marketing. I don't have that kind of money :-X



-- Mario
IMatch Developer
Forum Administrator
http://www.photools.com  -  Contact & Support - Follow me on 𝕏 - Like photools.com on Facebook