Groups keyboard shortcuts have been updated
Dismiss
See shortcuts

Picat Guide pdf file has invisible spaces

27 views
Skip to first unread message

Doug Edmunds

unread,
Jul 8, 2024, 6:27:30 PM7/8/24
to Picat
It appears that many words in the pdf that are formatted in Italics, are being stored with an extra spaces in the middle of the word, and thus will not be found  by Search.

I discovered this problem when I tried to do a search on PairsList and nothing was found.  I did a copy/paste of section 3.4.5 of the guide into a text editor, and this is what it pasted:

• clear(Map): This predicate clears the map Map. It throws an error if Map is not a map.
• del(Map,Key): This predicate deletes from Map the pair that has the key Key. It
throws an error if Map is not a map. It does nothing if Map does not contain a pair with
Key.
• get(Map,Key) = V al: This function returns V al of the key-value pair Key=V al in
Map. It throws an error if Map does not contain the key Key.
• get(Map,Key,DefaultV al) = V al: This function returns V al of the key-value pair
Key=V al in Map. It returns DefaultV al if Map does not contain Key.
• has_key(Map,Key): This predicate is true if Map contains a pair with Key.
• keys(X) = List: This function returns the list of keys of the pairs in Map.
• map(T erm): This predicate is true if T erm is a map.
• map_to_list(Map) = P airsList: This function returns a list of Key=V al pairs that
constitute Map.
• new_map(IntOrP airsList) = Map: This function creates a map with an initial capacity or an initial list of pairs.
• new_map(N,P airsList) = Map: This function creates a map with the initial capacity
N, the initial list of pairs P airsList, where each pair has the form Key=V al.
• put(Map,Key,V al): This predicate attaches the key-value pair Key=V al to Map,
where Key is a non-variable term, and V al is any term.
• put(Map,Key): This predicate is the same as put(Map,Key, not_a_value).
• values(Map) = List: This function returns the list of values of the pairs in Map.
• size(Map) = Size: This function returns the number of pairs in Map

You will note that Val  appears a V al  and IntOrPairsList appears as intOrP airsList.

If I do a search of the document for V al or P airsList,  it will find it, because the search is seeing the invisible spaces in the document.  

Neng-Fa Zhou

unread,
Jul 8, 2024, 11:34:04 PM7/8/24
to Picat
That's interesting. I can confirm the issue when viewing the pdf file with a browser. However, when viewing the pdf file locally with a pdf reader, I don't have this issue.

Cheers,
NF
Reply all
Reply to author
Forward
0 new messages