How to get the text formatting in the tables

Dear experts and aid

For my project, I import an RTF file and then read the data into 3 tables. It works fine when just using the contents of the string of paragraphs. However, the final script should be able to read and to replace the text formatted...
Why use intermediate tables? Because otherwise I need to swap between two fm-documents (and you can be a part of the book).

The imported file starts with a certain number of lines separated into two parts by a TAB ("designates a TAB in \x08 FM)
[[Garneau, 1990 #12]]    »   [9]
The good article can also be locally as text, e.g. [9]
Then follow the same (or smaller) number of paragraphs with text formatted like this:
[9]"D. Garneau, ed., National Language Support Reference Manual (national language Information Design Guide. Toronto, CDN: IBM National Language technical Centre, 1990.

Is it possible to replace in the body of the function below the next song

  while(pgf.ObjectValid()) {
    pgfText = GetText (pgf, newDoc);
    gaBibliography.push(pgfText);
    pgf = pgf.NextPgfInFlow;
  }

with this

  while(pgf.ObjectValid()) { 
    gaBibliography.push(pgf);
    pgf = pgf.NextPgfInFlow;
  }

Do I need a special statement of the gaBibliography range?
And how to get the right part of the lines as formatted intro thingy in table gaFmtCitsFmt ?

Currently, I read in the tables as "strings" (function GetText not shown):

var gaFmtCitsRaw  = [];                           // left column in processed RTF
var gaFmtCitsFmt  = [];                           // right column in processed RTF
var gaBibliography= [];                           // bibliography lines from processed RTF
// filename is something like E:\_DDDprojects\FM+EN-escript\FM-testfiles\BibFM-collected-IEEE.rtf 

function ReadFileRTF (fileName) {
  var nCits=0, nBib = 0, openParams, openReturnParams, newDoc, pgf, pgfText ;
  var TAB = String.fromCharCode(8);               // FM has wrong ASCI for TAB
  var parts = [];
  
  openParams = GetOpenDefaultParams();
  openReturnParams =  new PropVals();  
  newDoc = Open (fileName, openParams, openReturnParams);  
  pgf = newDoc.MainFlowInDoc.FirstTextFrameInFlow.FirstPgf;  // get first pgf in flow

// --- read the temp/formatted citations  
  while(pgf.ObjectValid()) {
    pgfText = GetText (pgf, newDoc);
    if (pgfText.substring (0,2) == "[[") {        // citation lines start with [[
      parts = pgfText.split(TAB);                 // get the two parts of the line
      gaFmtCitsRaw.push (parts[0]);               // Push the result onto the global array
      gaFmtCitsFmt.push (parts[1]);
      pgf = pgf.NextPgfInFlow;
    } else { break }
  }

// --- read the bibliography
  while(pgf.ObjectValid()) {                      // until end of doc
    pgfText = GetText (pgf, newDoc);
    gaBibliography.push(pgfText);
    pgf = pgf.NextPgfInFlow;
  }
  newDoc.Close (Constants.FF_CLOSE_MODIFIED);
} // --- end ReadFileRTF

The following questions will then be how to change the script of FindAndReplace of Ian Proudfoot for managing text formatted as replacement. I will need to use the copy and paste IMHO...

Klaus, okay, before pasting, you must assign the TextSelection object at your insertion point.

// Add a new paragraph after the current paragraph.
var newPgf = oDoc.NewSeriesPgf (lastPgf);
var textRange = new TextRange (new TextLoc (newPgf, 0), new TextLoc (newPgf, 0));

oDoc.TextSelection = textRange;
oDoc.Paste ();

-Rick

Tags: Adobe FrameMaker

Similar Questions

  • How to get the table without segment tablespace

    Hello

    I have a few tables in 11.2, which were created with creation of deferred segment and did so no segment/measure not yet. They already appear in dba_tables thus identical to the tab$, but do not have a defined tablespace.

    However, using dbms_metadata.get_ddl () the DOF resulting has the correct tablespace name. But what a view or table that I must query for this information with SQL?

    Thank you

    Robert

    Hello

    No, none of these tables is temporary, but it turns out that all the affected tables are ITO and so I have to check dba_indexes for the tablespace and the dba_indexes index_name when looking for a segment.

    Thank you

    Robert

  • How to get the use of database tables/columns in the table of edge/analysis?


    Hi all

    Anyone has an idea on how to get the tables in DB/colomns usaged in edge/analysis table in OBIEE 11 G?

    Thanks in advance!

    Anne

    You can try to generate a report of Catalog Manager for analysis / SA want to create the line and your RPD you can go to utilities > documentation of the repository and get the domain you want to and get all the mappings in Excel format.

    I hope this helps.

    SVS

  • How to get the text have the same effect as the video?

    Hello

    For the first time post here, but I wonder how to get the text of the titles have the same effect as the video behind her.

    For my video, I use 'bad tv' and other effects such as Gaussian that obviously changes the appearance of video, creating the look of VHS. However, I then inserted text via the title, but it normally appears. How can I make this text have the same effects as the video behind it?

    A friend told me I might need to add text to the video first, then do the effects, I have not tried, but wonder if there is an easier way, as this would require me to restart.

    EDIT: That's what I'm looking for. https://youtu.be/7_2PHQI89dI?t=24s The text has the same effect as the video.

    Thank you

    One way is to create a clip made up based on the title and the original clip. Then apply the effect.

    Another way is to use an adjustment layer.

    Good luck.

    Russ

  • How to get the bar display of title in pixels text length?

    Hello

    Does anyone know how to get the length of the title bar text (in pixels) display?  Just to clarify, that's what I'm looking for:

    I don't see a CVI function for this.  The attribute ATTR_TITLE_FONT for GetPanelAttribute (...) is only valid for the panels of the child which prevents me from using the GetTextDisplaySize (...) to get the size.  Dive into the Windows SDK I can not even find an answer here.  Any ideas?  Thank you.

    Figured out how to do this.  Go to the SDK to get the font properties - is kind of nonobviousness.  But once you have the font properties, you can create a font of meta in CVI, with properties, and once you have the meta font you can use GetTextDisplaySize (...) to get the size.  For any future reference:

    //define a NONCLIENTMETRICS structureNONCLIENTMETRICS ncmtest;//We have to set the cbSize parameter to the size of the passed structure before retrieving it
    ncmtest.cbSize = sizeof(NONCLIENTMETRICS);
    //Get NONCLIENTMETRICS structure
    result = SystemParametersInfo(SPI_GETNONCLIENTMETRICS, 0, &ncmtest, 0);
    
    //copy the title font name to a c-string
    while(ncmtest.lfCaptionFont.lfFaceName[i] != 0)
    {
        thefont[i] = (char)ncmtest.lfCaptionFont.lfFaceName[i];
        ++i;
    }
    
    //null terminate
    thefont[i] = '\0';
    
    //create meta font with title font properties.  lfWeight & 0x700 indicates bold.  CreateMetaFontWithCharacterSet() doesn't recognize DEFAULT_CHARSET so we replace it with VAL_NATIVE_CHARSET(?).
    uir_status = CreateMetaFontWithCharacterSet ("TheTitleFont", thefont, abs(ncmtest.lfCaptionFont.lfHeight), ncmtest.lfCaptionFont.lfWeight & 0x700 ? 1 : 0, ncmtest.lfCaptionFont.lfItalic, ncmtest.lfCaptionFont.lfUnderline, ncmtest.lfCaptionFont.lfStrikeOut, 0, ncmtest.lfCaptionFont.lfCharSet == DEFAULT_CHARSET ? VAL_NATIVE_CHARSET : ncmtest.lfCaptionFont.lfCharSet);
    
    //get titlebar text
    uir_status = GetPanelAttribute (panelhandle, ATTR_TITLE, thetext);
    //get title bar length
    uir_status = GetTextDisplaySize (thetext, "TheTitleFont", &height, &width);
    

    I have a 79 for the duration of the screenshot above.

  • How to get the hour format system?

    Hi all

    How to get the hour format system, I mean what format 24 / 12 system uses?

    Looks like the CalendarSettings class is perhaps the official way: https://developer.blackberry.com/native/reference/cascades/bb__pim__calendar__calendarsettings.html#...

  • How to get the text of a SystemPrompt (Cascades)

    Hello

    I've been struggling with this for a few hours now. I followed the example of "dialogues" on github, so I have successfully created a SystemPrompt (the dialog box that allows the user to enter text and accept / reject). Curiously, in this example there is no use of user text input. Do you know how to get the text in my QML? Here you have an example of code that I use:

    My QML:

    // Default empty project template
    import bb.cascades 1.0
    import bb.system 1.0
    
    // creates one page with a label
    NavigationPane {
        id: navigationPane
        Page {
            attachedObjects: [
                SystemPrompt {
                    id: prompt
                    title: qsTr("Enter a text for the label")
                    modality: SystemUiModality.Application
                    inputField.inputMode: SystemUiInputMode.Default
                    inputField.emptyText: "Label text..."
                    confirmButton.label: qsTr("Ok")
                    confirmButton.enabled: true
                    cancelButton.label: qsTr("Cancel")
                    cancelButton.enabled: true
                    onFinished: {
                        if (result == SystemUiResult.ConfirmButtonSelection) {
                            lab1.text = ????? // Here is where I don't know what to do
                        }
                    }
                }
            ]
    
            Container {
                layout: StackLayout {}
    
                Label {
                            id: lab1              text: "Label text"
                    objectName: "lab1"
                    textStyle.base: SystemDefaults.TextStyles.TitleText
                    horizontalAlignment: HorizontalAlignment.Center
                }
    
                Button {
                    text: "Update label"
                    horizontalAlignment: HorizontalAlignment.Center
                    topMargin: 150.0
                    onClicked: {
                        //_appUi.editLabel();
                        prompt.show();
                    }
                }
            }
        }
    }
    

    Be sure to add this in your .cpp file or all of app:

    #include 
    #include 
    #include 
    #include 
    #include 
    #include 
    #include 
    #include 
    #include 
    #include 
    

    and don't forget to include them in your app .cpp file (probably not all are needed, but just in case I leave here for the moment):

    qmlRegisterType("bb.system", 1, 0, "SystemUiButton");
        qmlRegisterType("bb.system", 1, 0, "SystemUiInputField");
        qmlRegisterType("bb.system", 1, 0, "SystemToast");
        qmlRegisterType("bb.system", 1, 0, "SystemPrompt");
        qmlRegisterType("bb.system", 1, 0, "SystemCredentialsPrompt");
        qmlRegisterType("bb.system", 1, 0, "SystemDialog");
        qmlRegisterUncreatableType("bb.system", 1, 0, "SystemUiError", "");
        qmlRegisterUncreatableType("bb.system", 1, 0, "SystemUiResult", "");
        qmlRegisterUncreatableType("bb.system", 1, 0, "SystemUiPosition", "");
        qmlRegisterUncreatableType("bb.system", 1, 0, "SystemUiInputMode", "");
        qmlRegisterUncreatableType("bb.system", 1, 0, "SystemUiModality", "");
        qRegisterMetaType("bb::system::SystemUiResult::Type");
    

    Thank you very much

    If you look very carefully by the docs, you'll trip over https://developer.blackberry.com/cascades/reference/bb__system__systemprompt.html#inputfieldtextentr...

    So, replace your? with inputFieldTextEntry() and you will get the text you need.

  • How to get the description of text box with some HTML < P > tag

    Hi friends,

    I created two point, an element of box P1_RICH_TEXT_FIELD rich text field and a text item field area P1_TEXT_AREA. I created the calculation process to copy the value of P1_RICH_TEXT_FIELD in P1_TEXT_AREA. Calculation works well but contect copy in P1_TEXT_AREA are

    < p >

    Test Test description description < /p >

    < p >

    Test DescritionTest DescritionTest description < /p >

    < p >

    Test DescritionTest DescritionTest description Test Test DescritionTest Test Test Test Descritionhkjhkh < /p > description description description description


    I need to copy with the tag < p >.


    How to get the description of text box with the HTML < P > tag



    Thank you

    Hi Alex,

    Thank you very much. You want very criticle problem for me. Thank you very much.

    Now, there are several tags in the rich text field

    "span, h1, h2, h3, h4, h5, h6, p, blockquote, pre, a, big, del, dfn, em, img, ins, kbd, q, s, samp, small, strike, strong, sub, sup, b, u, I, Center, dl, dt, dd, ol, ul, li, label, table, caption, tbody, tfoot, thead, tr, th, td" etc.

    How can I move all these in REGEXP_REPLACE (: P1_RICH_TEXT_FIELD, ')

    |

    (", 1, 0, im ') code.

    Thank you

  • How to get the text block, given anchor (~ a)

    I need to dynamically position anchored with anchor text blocks (but the relative position will be different for each anchor). If I grep ~ i can get the anchor marker - how to get the text block once I got this marker?

    Thank you

    The marker "anchor" is a character of "simple".

    So you can do the following if you have identified the character (and in this example selected it):

    //Start with an "Anchor Marker" selected:
    var myCharacter = app.selection[0];
    
    if (myCharacter.texts[0].textFrames.length == 1){
    
    var myAnchoredTextFrame = myCharacter.texts[0].textFrames[0];
        //do something with the anchored text frame:
        myAnchoredTextFrame.fillColor = "Yellow";
    
        };
    

    You can set the myCharacter variable differently, if you know the index of the character according to his history of parent.

    Or if you have found the character as part of a search GREP or TEXT by ExtendScript (JavaScript).

    Uwe

  • How to get the text of TextEditBox on Panel

    Hi all

    I would ask you, what should I use when I want to get the text of TextEditBox. I have the observer, who listens to the chages (when the user hits enter, the Update method of the observer is called). The only thing I don't know is how to get the text, which was placed in the text edit box. I know that this observer of the dialog box, GetTextControlData method, but I sign...

    THX

    Hi Ondrej

    You can get the text using the ITextControlData interface. Like this:

    InterfacePtr iCtrlView (this, UseDefaultIID());
    if(!iCtrlView) break; put some say message
    InterfacePtr iTextData (iCtrlView, UseDefaultIID());
    if(!iTextData) break; put some say message
    PMString theString = iTextData-> GetString()

    Concerning

    Bartek

  • How to get the smartlist for calcscript text

    Hello

    How to get the smartlist for hyperion planning 11.1.1.3 calcscript and calcscript tx example text

    Rgds

    Uka fp

    Published by: uka firman on November 25, 2010 10:35

    I think that ENUMTEXT is purely essbase and MDX to retrieve the value of text against the essbase text measures that are not the same as planning for the smart lists.

    See you soon

    John
    http://John-Goodwin.blogspot.com/

  • How to get the color of the text information in the text layer?

    How to get the color of the text information in the text layer?  I mean using scripts Photoshop, Version of Photoshop CS 8.0

    The color textItem is readable for me in VBS Note expects the activeLayer be a textLayer and displays the HexValue of the color of the text.

    Option Explicit
    
    Dim appRef
    Dim docRef
    Dim textItemRef
    Dim artLayerRef
    Dim textColor
    
    Set appRef = CreateObject( "Photoshop.Application" )
    
    appRef.BringToFront
    
    Set docRef = appRef.ActiveDocument
    Set artLayerRef = docRef.ActiveLayer
    Set textItemRef = artLayerRef.TextItem
    Set textColor = textItemRef.Color
    
    MsgBox textColor.RGB.HexValue
    

    And returns the color of the text if the text is the same color. But if the text is more than a color textItem.color returns only the color of the first text range.

  • How to get the value of viewattribute and how to assign the text field. URG

    Hi all,
    I created messagestyled text programmatically and I want the value of viewAttribute.
    I don't know how to define the instance of the view and display attribute.

    I tried this way, it is what is called the vo class but after that i dnt know how to set

    Here the code that I used...

    (1) I create the messagestyled text
    OAFormattedTextBean cctextbean = (OAFormattedTextBean) pageContext.getWebBeanFactory () .createWebBean (pageContext, FORMATTED_TEXT_BEAN, OAWebBeanConstants.VARCHAR2_DATATYPE, "CCText");

    OAMessageStyledTextBean ccidbean = (OAMessageStyledTextBean) pageContext.getWebBeanFactory () .createWebBean (pageContext, MESSAGE_STYLED_TEXT_BEAN, OAWebBeanConstants.VARCHAR2_DATATYPE, "CCId");

    (2) and I called the view object
    OAViewObject ccview = (OAViewObject) AM.findViewObject ("CmpnyDetVO1");

    (3) I want to set the view instance and viewattribute using code. This stage i dnt know how to define.

    (4) I want to know, how to get the value of the attribute to display and how to set the value to the messagestyled text field.

    I'm new to OFA. It's Urgent.

    Thanks in advance
    Fabrice

    Hello

    use
    Import oracle.jbo.Row;

    OAViewObject ccview = (OAViewObject) AM.findViewObject ("CmpnyDetVO1");
    Line line (Row) = ccview.first ();
    Test String = (String) row.getAttribute ("");

    then to set the value of the text of messagestyled

    OAMessageStyledTextBean bean = (OAMessageStyledTextBean) webBean.findindexedchildrecursive ("CCId");
    bean.setText (test);

    Thank you
    Gerard

    Published by: Gauravv on August 4, 2009 09:38

  • How to get the whole text of value special hashi

    Hello

    can someone let me know how to get the full text of sql data hash_value in report statsapck...
    SQL> select SQL_TEXT from v$sql where HASH_VALUE=3102119461;

    SQL_TEXT
    --------------------------------------------------------------------------------

    SELECT ROWID,AR_DT,AR_TXN_CODE,AR_NO,AR_AMD_NO,AR_REF_FROM,AR_REF_TXN_CODE,AR_RE

    F_NO,AR_DAK_CODE,AR_DED_SYS_ID,AR_COMP_CODE,AR_ACNT_YR,AR_AMD_DT,AR_AMD_UID,AR_A

    MD_RES_CODE,AR_REF_SYS_ID,AR_STUD_SRN,AR_APPL_DT,AR_ISSUE_DT,AR_ENROL_FRM_COURSE

    ,AR_ENROL_DT,AR_JOURNAL_YN,AR_TYPE,AR_TITLE,AR_VACANCY_CODE,AR_MRH_MRN,AR_INDUST

    RY_FIRM,AR_DEED_FM_DT,AR_DEED_TO_DT,AR_IT_TR_YN,AR_IT_START_DT,AR_CONDN_YN,AR_RE

    MARKS,AR_IT_END_DT,AR_CONDN_DAYS,AR_CONDN_AMT,AR_CONDN_DT,AR_CONDN_BY,AR_46_FLAG

    ,AR_RE_REG_YN,AR_DOC_STATUS,AR_ART_TERM_COMPLN,AR_TERMN_COMPLNPLN_DT,AR_CORRES_A

    DDR_LINE_1,AR_CORRES_ADDR_LINE_2,AR_CORRES_ADDR_LINE_3,AR_CORRES_CITY_CODE,AR_CO

    RRES_ZIP_POSTAL_CODE,AR_CORRES_BR_CODE,AR_CORRES_REGION_CODE,AR_CORRES_STATE_COD

    E,AR_CORRES_COU_CODE,AR_CORRES_TEL,AR_CORRES_EMAIL,AR_CORRES_MOBILE,AR_PER_ADDR_

    LINE_1,AR_PER_ADDR_LINE_2,AR_PER_ADDR_LINE_3,AR_PER_ADDR_LINE_4,AR_PER_CITY_CODE


    SQL_TEXT
    --------------------------------------------------------------------------------

    ,AR_PER_ZIP_POSTAL_CODE,AR_PER_BR_CODE,AR_PER_REGION_CODE,AR_PER_STATE_CODE,AR_P

    ER_COU_CODE,AR_PER_TEL,AR_APPR_DT,AR_AP


    SQL>

    You can query V$ SQLTEXT or V$ SQLTEXT_WITH_NEWLINES

    Thus

    select sql_text
    from v$sqltext
    where hash_value='&hash_value'
    and address='&address'
    order by piece;
    

    Note: In 10g and more, you can use instead of HASH_VALUE SQL_ID and ADDRESS.

    Additonally, in 10g and above, you can also query V$ SQLSTATS where the text is stored in a CLOB called 'SQL_FULLTEXT', we must therefore DEFINE the LONG value when using SQLPlus.

  • How to get the number of fonts online

    Hi all

    can you give me solution to the following:

    How to get the number of fonts on a line.

    Ex

    BlackBerry Support 'Community' is supported for my career

    in this line, I want to ITALIC for the word 'Community '.

    Font.GetDefault (). Derive from wil give for total line...

    RichTextField does not?

    See this KB article

    http://supportforums.BlackBerry.com/T5/Java-development/format-text-in-a-RichTextField/Ta-p/445038

Maybe you are looking for

  • V3.6.24 running two computers, one Windows XP Windows 7 other

    Under XP it correctly displays actual resolution images, in Win7 it resizes all the images to "climb" in the Firefox screen. I'd rather display size real XP, any means to get the Win7 display full size image?

  • Problem with my z1 xperia phone

    Hey guys, im having a problem of appeal since I updated my phone to the 5.1.1 lollipop... When I make calls, it sounds just fot a time and Skype breaks down... Even when I get call too many, she just sounds for a time and Skype crashes... I talked wi

  • How media player changes the music files (modo-live mesh)

    Hi, seems that media player mark fall files in a folder such as "changed" when I change what should logically be the attributes of the filder (ie the year or kind..). While I understand why media Player that do, it creates a huge unnecessary traffic

  • error: 0x800705b4

    When enabled, Windows Defender is disabled.  When attempting to activate this function, I get the error message: 0x800705b4. What should I do to reactivate this feature "on the situation."

  • DatabaseBindingException

    Hi all I bind a variable to an insert statement. As far as my knowledge goes, there nothing wrong in my statement. But it is to show "net.rim.device.api.database.DatabaseBindingException: invalid parameter index'." " Please see my statement Statement