Reply to topic  [ 9 posts ] 
Expand glossary in current font and size 
Author Message

Joined: 2016-10-23 23:53:01
Posts: 16
Hi,

Is there any way to do an Expand Glossary command to just insert the Unicode characters, i.e. without changing the font or font size?

Cheers,
Lyndon


2016-11-19 11:02:51
Profile
User avatar

Joined: 2007-02-07 00:58:12
Posts: 876
Location: Japan
My understanding of how Glossaries work is that if you remove all attribute and style information from the glossary entry that it will take on attributes and styles as appropriate at the insertion point. That is what I found from a quick test of the feature.

_________________
philip


2016-11-20 04:28:36
Profile
Official Nisus Person
User avatar

Joined: 2002-07-11 17:14:10
Posts: 4251
Location: San Diego, CA
Philip is correct: if your glossary entry is lacking in a particular attribute (eg: font size) then the expansion will assume the ambient formatting for that attribute.

When creating such a glossary entry with no formatting, make sure the Normal paragraph style doesn't remain applied. That style tends to bring along a lot of formatting, like a font face and size. Here's one way to do it:

1. Add your glossary entry in your glossary file.
2. Select the entire glossary entry paragraph.
3. Use the menu Format > Remove Attributes and Styles.
4. Use the menu Format > Paragraph Style > Remove Paragraph Styles.

Alternatively, you can also use QuickFix for this purpose. QuickFix entries are always free of formatting, and thus will always assume the ambient formatting when triggered. However, be aware that QuickFix entries are defined on a per-language basis.


2016-11-21 13:59:28
Profile WWW

Joined: 2016-10-23 23:53:01
Posts: 16
Thanks for both answers, very helpful.

QuickFix is probably the way I should do this. The difficulty is that I'm working with a very large number of cuneiform signs. Is there a way to bulk input QuickFix items? Or does it have to be one by one?


2016-11-22 09:15:58
Profile
User avatar

Joined: 2007-02-07 00:58:12
Posts: 876
Location: Japan
Hi Lyndon,
On the contrary. I would recommend that you use the glossary for this. Assuming you have a file where each abbreviation is paired with its cuneiform counterpart (separated by a tab, for example), you can just insert glossary separators between the entries (perhaps with Find/Replace, otherwise with a macro), and then save the whole thing as glossary. Removing the styles, as Martin explained, can also be done in one go on the entire file.

One further advantage of the glossary method is that you could apply a special character style to your cuneiform. This style wouldn't need to have any attributes, so the the cuneiform would still take the attributes (size, color, font, weight) from the environment. This style would allow you to quickly select the cuneiform in your document, and you could control such things as language, font, highlight, etc. for these characters easily—by changing the style—at any time.

Finally such a glossary can easily be turned on and off at any time. Just open the preferences and click it on/off.

_________________
philip


2016-11-22 17:49:47
Profile

Joined: 2016-10-23 23:53:01
Posts: 16
Hi Phillip,

Thank you, that's extremely helpful, especially the idea of a style with no attributes. Am I right in thinking that if I have a style with the same name in my document, the expanded glossary items will take on my document style's attributes? Or would I have to wait until I have inserted at least one glossary item, and then modify the resulting new style's attributes?

Cheers,
Lyndon


2016-11-24 12:36:49
Profile
User avatar

Joined: 2007-02-07 00:58:12
Posts: 876
Location: Japan
Hello Lyndon,
the answer to your question is of course: try it and see.

I'll admit that I hadn't considered your scenario specifically when I made the suggestion. But I am happy to report that things work exactly as one would have hoped. If your glossary entries are marked with a character style "Cuneiform" with no attributes, and you expand them into a document where a/the character style "Cuneiform" is already present and set to have certain attributes (font, size, etc.) then the newly expanded glossaries will immediately take on those attributes. If you have several files with different attribute settings for "Cuneiform", the glossary entries will always take on the attributes appropriate for that file.

If you try to copy such expanded text to another file where "Cuneiform" has different settings, you will of course get a style conflict dialog. But that should be obvious.

PS: AFAIK Nisus just uses the spelling of the style name (+ style type) to determine that two styles are "the same".

_________________
philip


2016-11-24 16:23:47
Profile

Joined: 2007-03-28 07:30:34
Posts: 139
[quote]Assuming you have a file where each abbreviation is paired with its cuneiform counterpart (separated by a tab, for example), you can just insert glossary separators between the entries (perhaps with Find/Replace, otherwise with a macro), and then save the whole thing as glossary.[/quote]

Because the only place where you can insert Glossary Breaks is within a glossary file, to do this you will have to:

1. first create a new glossary file
2. then paste your tabbed text list into the glossary file; this should be in the form abbrev<tab>cuneiform expansion<return>
3. select the Return at the end of any one line, and manually Insert:Glossary Entry Break in its place
4. select and copy the GB character
5. in the Find/Replace dialog, put a <return> in the Find field and paste the GB character into the Replace field
6. Replace All

You can now select all and globally remove attributes and styles as Martin described so the cuneiforms take the ambient styling.

The GB character is U+000C, which is the same as page breaks and section breaks. Nisus will retain the GB attributes when you copy/paste it. Unless something has changed, there does not seem to be a PowerFind or PFPro expression that inserts the GB attributes -- other than to insert a GB with the Insert:Glossary Entry Break menu command, which again only works inside a glossary file. For a one-time operation, the above may be simpler.

Cliff


2016-11-27 19:10:46
Profile
User avatar

Joined: 2007-02-07 00:58:12
Posts: 876
Location: Japan
Cliff, if you are editing the glossary file, you can just choose "Glossary Entry Break" from the Insert menu and put it into the replace box. "Replace attributes" will be checked automatically and the resulting replacement will insert valid glossary entry breaks.

A macro to do the same is also simple enough:
Code:
While Find "\n"
Insert:Glossary Entry Break
End

_________________
philip


2016-11-28 00:31:57
Profile
Display posts from previous:  Sort by  
Reply to topic   [ 9 posts ] 

Who is online

Users browsing this forum: No registered users and 3 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
cron
Powered by phpBB® Forum Software © phpBB Group
Designed by ST Software