Changeset 13292


Ignore:
Timestamp:
2006-11-17T11:11:16+13:00 (17 years ago)
Author:
kjdon
Message:

Ian and my mods to Anna's text, also added in a note for 2.71 about closing GLI when changing modes to add a second same plugin to the collection

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/gsdl-documentation/tutorials/xml-source/tutorial_en.xml

    r13291 r13292  
    10571057</Heading>
    10581058<NumberedItem>
    1059 <Text id="fw-24a">Next we'll customize the <AutoText text="SearchVList"/> format statement to highlight the query terms in a PDF file when it is opened from the search result list. This requires Acrobat Reader 7.0 version or higher, and only works on a windows platform.</Text>
    1060 </NumberedItem>
    1061 <NumberedItem>
    1062 <Text id="fw-24c">The search terms are kept in the macro variable <AutoText text="_cgiargq_"/>, and we can append <AutoText text="#search=&quot;_cgiargq_&quot;"/> to the end of a PDF file link to pass the query terms to the PDF file.</Text>
    1063 <Text id="fw-24d">By default, each PDF file is renamed as <AutoText text="doc.pdf"/> and saved in a unique hash directory when processed by <AutoText text="PDFPlug"/>, so we use</Text>
     1059<Text id="fw-24a">Next we'll customize the <AutoText text="SearchVList"/> format statement to highlight the query terms in a PDF file when it is opened from the search result list. This requires Acrobat Reader 7.0 version or higher, and currently only works on a Microsoft Windows platform.</Text>
     1060</NumberedItem>
     1061<NumberedItem>
     1062<Text id="fw-24c">The search terms are kept in the macro variable <AutoText text="_cgiargq_"/>, and we append <AutoText text="#search=&quot;_cgiargq_&quot;"/> to the end of a PDF file link to pass the query terms to the PDF file.</Text>
     1063<Text id="fw-24d"><AutoText text="PDFPlug"/> renames each PDF file as <AutoText text="doc.pdf"/> and saves it in a unique directory for that document, so we use</Text>
    10641064<Format>_httpcollection_/index/assoc/[archivedir]/doc.pdf</Format>
    1065 <Text id="fw-24e">to locate the PDF source file in a search result list.<br/>If you used the <AutoText text="-keep_original_filename"/> option of the <AutoText text="PDFPlug"/> to build the collection, then the original name of the PDF file is kept, and we use</Text>
     1065<Text id="fw-24e">to refer to the PDF source file. (However, if you used the <AutoText text="-keep_original_filename"/> option to <AutoText text="PDFPlug"/> when building the collection, the original name of the PDF file is kept, and we use</Text>
    10661066<Format>_httpcollection_/index/assoc/[archivedir]/[Source]</Format>
    1067 <Text id="fw-24f">instead to locate a PDF source file.</Text>
    1068 </NumberedItem>
    1069 <NumberedItem>
    1070 <Text id="fw-24g">Select <AutoText text="SearchVList"/> from the list of assigned formats. We first judge whether a file in the search result list is a PDF file, we can use</Text>
    1071 <Format>[ex.FileFormat] eq 'PDF'</Format>
    1072 <Text id="fw-24h">in an <Format>{If}</Format> statement to do this. Then we use the above format instead of the <AutoText text="[ex.srclink]"/> and <AutoText text="[ex./srclink]"/> variables just for the PDF files.</Text>
    1073 <Text id="fw-24b">The resulting format statement looks like:</Text>
     1067<Text id="fw-24f">instead to locate the PDF source file.)</Text>
     1068</NumberedItem>
     1069<NumberedItem>
     1070<Text id="fw-24g">Select <AutoText text="SearchVList"/> from the list of assigned formats. We need to test whether the file is a PDF file before linking to doc.pdf, using <Format>{If}{[ex.FileFormat] eq 'PDF',,}</Format>. For PDF files, we use the above format instead of the <Format>[ex.srclink]</Format> and <Format>[ex./srclink]</Format> variables to link to the file.</Text>
     1071<Text id="fw-24b">The resulting format statement is:</Text>
    10741072<Format>
    10751073&lt;td valign="top"&gt;[link][icon][/link]&lt;/td&gt;<br/>
    10761074&lt;td valign="top"&gt;<highlight>{If}{[ex.FileFormat] eq 'PDF', &lt;a
    1077 href=\\"_httpcollection_/index/assoc/[archivedir]/doc.pdf#search=&amp;quot;_cgiargq_&amp;quot;\"&gt;[ex.srcicon]&lt;/a&gt;,<br/>[ex.srclink][ex.srcicon][ex./srclink]}</highlight>&lt;/td&gt;<br/>
     1075href=\"_httpcollection_/index/assoc/[archivedir]/doc.pdf#search=&amp;quot;_cgiargq_&amp;quot;\"&gt;[ex.srcicon]&lt;/a&gt;,<br/>[ex.srclink][ex.srcicon][ex./srclink]}</highlight>&lt;/td&gt;<br/>
    10781076&lt;td valign="top"&gt;[highlight]<br/>
    10791077{Or}{[dc.Title],[ex.Title],Untitled}<br/>
    10801078[/highlight]{If}{[ex.Source],&lt;br&gt;&lt;i&gt;([ex.Source])&lt;/i&gt;}&lt;/td&gt;<br/>
    10811079</Format>
    1082 <Text id="fw-24i">When the PDF icons are clicked in the search results, Acrobat will open the file with the search window opened, and the query terms highlighted.</Text>
     1080<Text id="fw-24i">When the PDF icons are clicked in the search results, Acrobat will open the file with the search window open, and the query terms highlighted.</Text>
    10831081</NumberedItem>
    10841082</Content>
     
    11671165</NumberedItem>
    11681166<NumberedItem>
     1167<Text id="ep-23b">Change to <AutoText key="glidict::Preferences.Mode.Systems"/> mode so that you can add two of the same plugin, and use regular expressions in the plugin options (<Menu><AutoText key="glidict::Menu.File"/> &rarr; <AutoText key="glidict::Menu.File_Options"/> &rarr; <AutoText key="glidict::Preferences.Mode"/></Menu>). </Text>
     1168<Comment>
     1169<Text id="ep-23c">For version 2.71, you'll need to close GLI now then restart it to get the list of plugins to update properly.</Text>
     1170</Comment>
     1171</NumberedItem>
     1172<NumberedItem>
    11691173<Text id="ep-24">Switch to the <AutoText key="glidict::CDM.GUI.Plugins"/> section of the <AutoText key="glidict::GUI.Design"/> panel. Add a second PDF plugin by selecting <AutoText text="PDFPlug"/> from the <AutoText key="glidict::CDM.PlugInManager.PlugIn"/> drop-down list, and clicking <AutoText key="glidict::CDM.PlugInManager.Add" type="button"/>. This plugin will come after the first PDF plugin, so we configure it to process PDF documents as HTML. Set the <AutoText text="convert_to"/> option to <AutoText text="html"/>, and switch on the <AutoText text="use_sections"/> option. Click <AutoText key="glidict::General.OK" type="button"/>.</Text>
    11701174</NumberedItem>
    11711175<NumberedItem>
    1172 <Text id="ep-25">Now switch to <AutoText key="glidict::Preferences.Mode.Systems"/> mode, as you will need to use regular expressions in the options for the first PDFplugin (<Menu><AutoText key="glidict::Menu.File"/> &rarr; <AutoText key="glidict::Menu.File_Options"/> &rarr; <AutoText key="glidict::Preferences.Mode"/></Menu>). Configure the first PDF plugin, and set the <AutoText text="process_exp"/> option to <AutoText text="'notext.*\.pdf'"/>.</Text>
     1176<Text id="ep-25">Configure the first PDF plugin, and set the <AutoText text="process_exp"/> option to <AutoText text="'notext.*\.pdf'"/>.</Text>
    11731177</NumberedItem>
    11741178<NumberedItem>
     
    28302834</NumberedItem>
    28312835<NumberedItem>
    2832 <Text id="sc25b">Change the mode in the Librarian Interface to <AutoText key="glidict::Preferences.Mode.Systems"/> (or <AutoText key="glidict::Preferences.Mode.Expert"/>) mode (using <Menu><AutoText key="glidict::Menu.File"/> &rarr; <AutoText key="glidict::Menu.File_Options"/></Menu>), because you will need to change the order of plugins, and use regular expressions in the plugin options.</Text>
     2836<Text id="sc25b">Change the mode in the Librarian Interface to <AutoText key="glidict::Preferences.Mode.Systems"/> (or <AutoText key="glidict::Preferences.Mode.Expert"/>) mode (using <Menu><AutoText key="glidict::Menu.File"/> &rarr; <AutoText key="glidict::Menu.File_Options"/> &rarr; <AutoText key="glidict::Preferences.Mode"/></Menu>), because you will need to change the order of plugins, and use regular expressions in the plugin options.</Text>
     2837<Comment>
     2838<Text id="ep-23c">For version 2.71, you'll need to close GLI now then restart it to get the list of plugins to update properly.</Text>
     2839</Comment>
    28332840</NumberedItem>
    28342841<NumberedItem>
Note: See TracChangeset for help on using the changeset viewer.