How can I merge related terms in a framemaker index? - framemaker

I am using Framemaker to write a book. I have successfully created an index for the book. However, the index contains separate entries for similar terms that I wish to merge. For example, the index contains:
Analemma 31
analemma 30, 31, 32, 33
analemma’s 32
Analemmas 30
analemmas 32
I would like to have a single entry (analemma) for all of these possibilities. What is the most efficient way for me to do this? Do
I need to edit the marker text at the time it is created? Should I instead just edit the generated index? Or is there some more automated way?
Thanks.

This is probably too late for you, but you could save your document as MIF (Maker Interchange Format, the spec can be found here). MIF is a text based format, the MIF file can be opened in your favourite text editor, and your index markers will look similar to
<Marker
<MType 2> # Index marker
<MText `Analemma'> # Index entry
> # end of Marker
<String `some text about analemmas'>
<MType 2> and <MText ...> are the crucial pieces of information. You can simply change the value after MText to analemma.
Once you have figured out how the <MText> for analemma’s looks like in MIF it will probably be easy to create a regex that matches all of these.
Disclaimer: I have not worked with Framemaker in the last ten years, and I do not know if MIF support has been dropped in the meantime.

Related

How to hide Comparison of UUID lines in two ARXMLs with Beyond Compare tool

When I am comparing two ARXMLs(can be considered as txt files) with beyond compare tool, then i can see two kind of differences:
UUID lines, which will change in every code generation from MATLAB.
logical/interface changes, which are modified/added newly.
but UUID lines are not so important for me. So I would like to know, How to hide the UUID lines Differences in the Beyond compare tool, while Comparing two files.
Thanks in Advance !!
I don't know the ARXM, but I found an example in https://github.com/nikidimitrow/Learning-AUTOSAR-fundamental/blob/master/BasicsOfAUTOSAR/MyECU.ecuc.arxml
In BeyondCompare, you can go to Tools->File Formats and take the xml-format definition for xml and use "Save as" to create a new format:
Then adapt the mask:
After this, you must define a new Grammar element:
Use the Text matching UUID=".*" and don't forget to mark the Regular expression flag.
After this you can compare with the new format. The UUID-difference is now an unimportant difference:

In BBEdit, how can I search for a pattern and then copy all the lines found with that pattern?

In BBEdit (11.6.9), using find with grep checked on I'm looking for lines in a large file containing this pattern:
registeredTd="11/\d\d/2017
It stands for a registered date of November, 2017 in my file.
If I "find all" I get correctly see 69 occurrences of the pattern in the file i the results window.
But how, then, can I copy those found lines?
I can copy the results of the results window itself, but that copy (1) contains extra junk at the beginning and most importantly (2) does not contain the complete line. The lines in the result window are truncated.
Is there a way of copying all the complete lines containing the pattern?
Thanks,
doug
For what it's worth, the answer to this was to use the Text > Process Lines Containing... menu. There you can enter the same registeredTd="11/\d\d/2017 search parameter, and there is a checkbox option to copy the lines with the search results. It works perfectly.

parse text file to find lines which contain a date after 05/05/2011

I could like to be able to list the line no.s in a file which contain a date, in the format dd,mm,yy, which is greater than 05/05/11
the file in question is prolog source code - the dates form part of a comment indicating when the modification after the comment was made
I'm using emacs, so thought an emacs solution would be the obvious way forward but willing to think more laterally if need be
a typical line of interest would be:
4.00 21/10/12 Modified to incorporate proportional match tolerances
I would like to report the file and line no. e.g.
filename line no.
my_source_1.pl 37
or alternatively, just being able to step through the file using Regexp I-search highlighting each dd/mm/yy that is greater than 05/05/2011 would be very useful

Accurately Reading Document Content with Position Using Open XML (Word)

I have a need to retrieve a string which matches perfectly the content of a word document. That is to say, in position 1000 of this string, I should find exactly the text at position 1000 in the document.
We have been through various iterations of reading in the document context text and adjusting for field codes/tables/pictures/inline shapes etc by padding in the right places. This approach does work (well) but we want to move towards Open XML instead for speed.
We have Power Tools for Open Xml installed, and have been looking at ways to recreate this string using Open Xml. We can get all the text by going through the runs (as per Eric White's blogs), but we also need everything else. \r's, \t's etc. I see things like "TabChar" in runs, and wdfldChar, but I am unclear how to use this information to generically get what we want.
For example, "TabChar" in our string should be \t. We must need to interpret wdfldChar begin, separate, end in a certain way (maybe by adding spaces). The problem is that we don't want to have to find every possibility and code them
[If run = "TabChar" append."\t" etc] a) because it's inefficient, b) it is unsafe.
Can anyone help with a method to reproduce this string with complete accuracy?
Thanks

OO:Doc -perl module for Openoffic

I want to automate some writer tasks. I need to create a .odt writer
document with oo:doc using methods such as create paragraph and append
paragraph. The problem is that append paragraph and create paragraph does not
allow text to start at middle of page or at a certain column, ie
Name Surname Address
When I unzip the "master" document I want to to create, when I inspect the content.xml file i see the xml equivalent is
" <text:p text:style-name="Text_20_body"><text:s text:c="115"/><text:span text:style-name="T1"><text:s/>Hallo how are you today</text:span></text:p><text:p text:style-name="P1"><text:s text:c="116"/>I hope you are well also</text:p><text:p text:style-name="P1""
How do I set the text:c and text:s element(s) from within oo::doc
Question2:
How do i set the formatting of a paragraph
to only extend from ie column 20 to column 80
thanks
Those elements are for runs of non-breaking spaces. the text:c attribute says how many spaces there are.
That doesn't strike me as a solution to what you want, which is to change the margins and position of a paragraph, yes?
Do you have a document that you want to use as a template, where the text will be inserted? Or ar you trying to create the entire page from scratch?
I think you want to use OpenOffice.org to create a Writer document that has the structure you want, then look at the XML to see what the markup is that accomplishes that. Look at paragraph-level styles or even frames if that is what is used. You might be able to create insertion points for your generated content by then adding magic-text phrases that you can scan for.
Then figure out how to get that done with the perl module.