sorting translated tables
Klaus Mueller
mueller23 at web.de
Tue Jul 25 16:16:30 PDT 2006
Hi all,
> If you're a FrameScripter, this would probably be a nice
> little script to rename all markers of a given type to
> another "temporary" marker type.
I found a pretty old public quick-and-dirty script that
does this for the current document. See below.
Kind regards,
Klaus
8< -----------------------------------------------------
// SwitchMarkers.fsl
// Klaus Mueller, Hamburg. March 26, 2002
// [ Temporarily switch XRef-Markers ]
// XRef-Markers within a table will be deleted
// on table sorting (FM6-Bug).
// This script changes temporarily the marker type.
// On repeated call (after sorting) the original
// marker will be reapplied.
//Set vMarkerOriName = 'Querverweis';
Set vMarkerOriName = 'Cross-Ref';
Set vMarkerTmpName = 'Cross-RefTmp';
//Set vMarkerTmpName = 'Glossary';
Set vDoc = ActiveDoc;
If not vDoc LeaveSub; EndIf
Get Object Type(MarkerType) Name(vMarkerOriName)
NewVar(vMarkerOriObj) DocObject(vDoc) ;
If not vMarkerOriObj
Display 'Marker "'+vMarkerOriName +'" is not defined.';
LeaveSub;
EndIf
Get Object Type(MarkerType) Name(vMarkerTmpName)
NewVar(vMarkerTmpObj) DocObject(vDoc) ;
If not vMarkerTmpObj
New MarkerType Name(vMarkerTmpName)
NewVar(vMarkerTmpObj) DocObject(vDoc);
EndIf
Find FromTextLoc Marker(vMarkerTmpName) ReturnStatus(vFound);
If vFound
Set vMarkerGet = vMarkerTmpObj;
Set vMarkerSet = vMarkerOriObj;
Else
Set vMarkerGet = vMarkerOriObj;
Set vMarkerSet = vMarkerTmpObj;
EndIf
Set vMarkerCount = 0;
Loop ForEach(Marker) In(vDoc) LoopVar(vMarker)
If vMarker.MarkerTypeID.Name = vMarkerGet.Name
Set vMarkerCount = vMarkerCount + 1;
Set vMarker.MarkerTypeID = vMarkerSet;
EndIf
EndLoop
If vMarkerCount = 0
Display 'No markers of type "'+vMarkerGet.Name+'" found. ';
Else
Set vPl = '';
If vMarkerCount not= 1 Set vPl = 's'; EndIf
Set vMsg = vMarkerCount +' Marker'+vPl+' of type "'+
vMarkerGet.Name+'" changed to "'+vMarkerSet.Name+'". ';
If vMarkerGet.Name = vMarkerOriName
Set vMsg = vMsg +CHARCR+ 'To restore (after sorting): '+
'Call the script again.';
EndIf
Display vMsg;
EndIf
//-- Unfortunately, the temporary marker object cannot be deleted ...
//Delete Object(vMarkerTmpObj);
8< -----------------------------------------------------
--- Original Message ---
From: Scott Prentice
Date: 25.07.2006 22:33
> Nope .. I don't have such a plugin, and I'm not aware of one that would
> help with this (but I've added it to my list of plugins to develop).
>
> I just did some quick testing, and it appears (in FM 7.1) that this
> doesn't affect other marker types .. so in theory, you could rename your
> Cross-Ref markers to some other type, then do the sorting, and rename
> them back to Cross-Refs. You could do this renaming via a global
> search/replace in a MIF file, if there were too many to do manually. Not
> the best option for a clean workflow, but it may be an option.
>
> If you're a FrameScripter, this would probably be a nice little script
> to rename all markers of a given type to another "temporary" marker type.
>
> Good luck!
>
> ...scott
>
> Scott Prentice
> Leximation, Inc.
> www.leximation.com
> +1.415.485.1892
>
>
>
> Sales at Bright Path wrote:
>> Hi Bill:
>>
>> Unfortunately, this is a FrameMaker quirk and I think it has been in the
>> last 3 releases. All xref markers go "poof" when you sort the table.
>> Unfortunately, the "fix" is to NOT do any sorting after you start placing
>> xrefs.
>>
>> Russ or Scott, do you have any plug-ins that fix this?
>>
>> Kay
>>
>> --------------------------------------------
>> Kay Ethier
>> Senior Trainer & Consultant
>> Bright Path Solutions
>> PO Box 14265
>> Research Triangle Park, NC 27709-4265
>> 1.919.244.8559
>> FAX: 1.919.474.9223
>> URL: http://www.travelthepath.com
>> Conferences: http://www.travelthepath.com/conf/
>> --------------------------------------------
>>
>>
>>
>> -----Original Message-----
>> From: Bill Swallow
>>
>> Hi everyone,
>>
>> We ran into an interesting issue. When sorting a table, we are noticing that
>> the xrefs are broken after the sort. We're running into this a lot now that
>> our translations are coming back from the localizers (given the tables need
>> to be re-sorted based on the language rules).
>>
>> Has anyone else noticed this broken xref issue when sorting tables
>> containing xrefs, and does anyone know a workaround other than manually
>> sorting the tables?
>>
>> Thanks!
>>
>> --
>> Bill Swallow
>> HATT List Owner
>> WWP-Users List Owner
>> Senior Member STC, TechValley Chapter
>> http://techcommdood.blogspot.com
>> _______________________________________________
More information about the framers
mailing list