How do I automate pick up elements?

We're making changes to a publication so the photo captions will come in automatically. So far I've been able to do what I want manually.

One problem: I'd like both fields (image and caption) to have the depth computed. With that setting, the caption goes on top of the image instead of under it. In order to make it appear under (and I do have them designated "top" and "bottom"), I need to enter the exact depth for them and for the pickup block. What am I missing? There should be a way for "calculate" to work.

Next: how do I automate it, once the settings are done? Where do I go in the style library, or is it somewhere else?


Thank you!

-Carol

  • Hi Carol,

    Other customers might have some suggestions, but I think would probably need more information about your use of pickups.

    What type of pickup are you using (e.g. here, float, etc.).

    What specific values are you using, or trying to use, for the various pickup fields (e.g. Width/Depth/Scope) and the two pickup elements (i.e. graphic and caption) fields (e.g. Xorig/Yorig/Width/Depth).

    You might want to consider opening up a support case where you can provide some sample data to be looked at, if you haven't done that already.

    Plug - I notice that there is this session at the upcoming XyUser Group conference: Pickups: Automate the formatting and placement of graphics and other breakout text with XPP pickups.

    Jonathan Dagresta
    RWS Group/
    XPP Development

  • Hi Jonathan,
    For the conference, I see that description on the conference page, but the description in the app agenda looks like it's more basic. Plus they want this done in two weeks. :-) Learning the automation would be great -- any idea which session description is accurate? I'm still sorting out which ones to attend.
    What I can't find is, where in the formats does the automation or default information live? If I could find it, I could see what we have and try some adjustments.
    I think it's a "here" pickup, just has "default" under the tries. Scope is block. Generally we set the width (20p for a column wide, 42p for pagewide) and the depth falls proportionately to the size of the image. Xorig and Yorig are based, I assume, on it being a "here" placement., but when I look at the "modify pickup" window I see specific numbers.
    Thanks!
    -Carol
  • Hi Carol,

    As far as the XyUser Group session, I'm just reading what's posted here in the XyUser Group community pages. I have no access to the app agenda as I'm not a registered attendee of the conference nor actually a "real" member of the group; I'm a developer at SDL. So I don't know which session description is accurate.

    As far as your question: "Where in the formats does the automation or default information live?" - I'm sorry, but I do not understand your question.

    The type of pickup (here, float, etc.) is determined by an argument in the <pick> macro. Block Status in the XyView on the pickup also displays the Type value.

    Yes, the Xorig/Yorig values for the whole pickup itself (i.e. in Modify Pickup) are always specific numbers, but the Width and Depth can be specified numbers or they can be full/comptd (for Width) or comptd (for Depth).

    However, for the pickup elements image and caption (Element Control > Modify) the Xorig/Yorig fields both have many possible choices (as well as using specific numbers) and the Width field can be full and/or comptd (depending on whether image or text element) and for elements the Depth field can be full/comptd.

    It's the combination of all of these field values (among the permutation of all possible combinations), along with the Type and Scope (which I forgot to ask about but you indicated) as well as possibly the page layout and where the pickup ends up being placed on the page, that determined the "geography" of the pickup and it's elements.

    So it's fairly difficult to explain how you should "automate" this without having access to the data itself (i.e. "all" the details), which is why I suggested logging a case with SDL customer support so that you can provide sample data.

    Or maybe another customer will be more familiar with the scenario you have described and will be able to guess what you need to do (or tweak).

    Jonathan Dagresta
    RWS Group/
    XPP Development

  • Hi Carol,
    Your initial approach to this problem is correct: work it out manually, and then automate it. If I'm understanding correctly, you want the graphic block depth to be computed, and then you want the caption block depth to also be computed, and you want the caption block to display below the graphic block. So there are two things to achieve (below, I will use upper-case terms, which are official XPP under-the-hood terms):
    1-Get the GRAPH & CAPTION blocks to have the computed depth (regardless of where they are positioned within the PICK block). This uses the 'depth' field.
    2-Get the GRAPH & CAPTION blocks to be positioned correctly within the PICK block. This uses the yorig field.

    As I think you have figured out, these two variables are interrelated. And a little bit of background, which you may also already know: the PICK is the pickup "container". It holds the GRAPH and CAPTION blocks (aka "pickup elements"). This pickup container block has it's own xorig, yorig, width and depth. Not knowing your specifics, I can't say for sure, but you probably want to have the pickup block depth set to 'comptd', and it probably already is. Now, you just need to juggle the GRAPH and CAPTION blocks within this pickup/PICK block.

    If you have the depth of each of these pickup elements set to 'comptd', and they do indeed have the appropriate depth, then you've achieved item 1!

    To position them, let's now take each of these two elements individually. The GRAPH block should have yorig=top. Next, the CAPTION block should have a yorig=stack. As I said, I don't know your specifics, but this basic setup should get you close to what you want. BUT, there is an "aha" here: with these settings, the order in which the pickup elements are created matters. This type of setup assumes that the GRAPH is created first, and the CAPTION is created second. So, if you create the pickup manually, and you create a graphic block, and *then* a caption block, do things position correctly? .... I will be optimistic and say, yes!

    Next, automation.
    Export your division to a text file (making sure that processing instructions are not being suppressed). By the way, I'm assuming you are working in XML mode. In the resulting text file, locate your pickup by searching for case sensitive PICK. You'll see a bunch of processing instructions that look like XPP macros with long strings of arguments. This info is gold (well, silver anyway). You now have the "roadmap" for automating your pickup placement (i.e. although the actual content of each pickup will vary -- the name of the pickup, the graphic name and the verbiage of the caption -- the settings for the depth, yorig and perhaps other fields will remain the same. Thus, you need to get these same processing instructions into your source XML file, using the same settings, via a transform method such as XSL.

    I have not talked about the pickup anchor macro, <pick....> (lower case), which is also a factor in automation. So, for every big PICK, there should also be a little pick.

    So, this is a simplified outline, but maybe this will help you get where you need to go. If not, let the Community know. :-)

    A few tips (again, you might know this):
    - when working with these things manually, be careful that you have the correct dialog box open for pickup, caption or graphic.
    - In the pickups doc, search for "tag primitive construction", and it outlines the long strings of arguments for the processing instructions.
    - You will never see the big PICK, GRAPH or CAPTION processing instructions in an open division. You only see these in the XML before it gets imported into an XPP div. In the open div, you work with these things as dialog boxes.

    - Laurie Hagar, SDL
  • Thanks Laurie and Jonathan! With this info I can dig into it more and hopefully get everything to work the way we want it.
  • Hi Laurie,
    That didn't quite work. You said, "BUT, there is an "aha" here: with these settings, the order in which the pickup elements are created matters." I have the image and caption elements already in the file, and the caption comes after the image. I tried using what you specified, and made the changes in that order. I'm back to having the caption appearing on top of the image, about 1/4 of the way down.
  • Let's see if this works, attaching a PDF of the page.


    On the right is when I get when I use Laurie's settings: pick computed, graph computed and top, caption computed and stack. If I designate the caption as computed and bottom, it goes to the bottom but is still overlapping the image.

    On the left is what I get when the pick is set to 17.10p high, graph is 15p and top, and caption is 2.10p and bottom. I don't want to have to find and enter the exact measurement for each, I want them to calculate.

    Thanks!

    -Carol

    1031.pvl_lead_13_pvl_49.pdf

  • Hi Carol - here is a screen snap of what you are tryign to achiev (I think!).

    And to achieve that the settigns (from the exported XML) are:

    Hopefully that should solve your issues!

  • Hi Carol - here is a screen snap of what you are tryign to achieve (I think!)  - see PDF.

    And to achieve that the settigns (from the exported XML) are in the PDF.

    Hopefully that should solve your issues!

    5228.Carol.pdf

  • I found this.


    First image, calculated for all three parts, does not work.

    {/PICK;ORCA70007-1;84480n;;block;;;fs;yes;1}
    {/GRAPH;orca70007;84480n;55991n;left;top;;;;;;;;;;best}
    {/ANNT;16896n;4224n;0n;0n;;;;;;;;left-to-right}<la;0><ld;0><le;0><EIN>ORCA70007<!EIN><:pdfs;DEST;ORCA70007><:pdfe;DEST><mh;0><ql>
    {/CAPT;;;left;bottom;;;;;;;;left-to-right}\
    {caption}A capt student from Fuzhou city\'s Qiantang Primary school
    tries out NetDragon\'s 101 VR Immersion Classroom Headset.\
    {attribution}Source: NetDragon Ltd.\.


    Second image, depth entered for all three parts, works correctly.

    {/PICK;ORCA70008-1;84480n;75328n;block;;;fs;yes;1}
    {/GRAPH;orca70008;84480n;63360n;left;top;;;;;;;;;;best}
    {/ANNT;16896n;4224n;0n;0n;;;;;;;;left-to-right}<la;0><ld;0><le;0><EIN>ORCA70008<!EIN><:pdfs;DEST;ORCA70008><:pdfe;DEST><mh;0><ql>
    {/CAPT;;11968n;left;bottom;;;;;;;;left-to-right}\
    {caption}A capt student tries out NetDragon\'s 101 VR Immersion
    Classroom headset at the China Science and Technology Museum in
    Beijing.\
    {attribution}Source: NetDragon Ltd.\.