Changeset 13292
- Timestamp:
- 2006-11-17T11:11:16+13:00 (17 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/gsdl-documentation/tutorials/xml-source/tutorial_en.xml
r13291 r13292 1057 1057 </Heading> 1058 1058 <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 canappend <AutoText text="#search="_cgiargq_""/> 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="_cgiargq_""/> 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> 1064 1064 <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, thenthe 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> 1066 1066 <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> 1074 1072 <Format> 1075 1073 <td valign="top">[link][icon][/link]</td><br/> 1076 1074 <td valign="top"><highlight>{If}{[ex.FileFormat] eq 'PDF', <a 1077 href=\ \"_httpcollection_/index/assoc/[archivedir]/doc.pdf#search=&quot;_cgiargq_&quot;\">[ex.srcicon]</a>,<br/>[ex.srclink][ex.srcicon][ex./srclink]}</highlight></td><br/>1075 href=\"_httpcollection_/index/assoc/[archivedir]/doc.pdf#search=&quot;_cgiargq_&quot;\">[ex.srcicon]</a>,<br/>[ex.srclink][ex.srcicon][ex./srclink]}</highlight></td><br/> 1078 1076 <td valign="top">[highlight]<br/> 1079 1077 {Or}{[dc.Title],[ex.Title],Untitled}<br/> 1080 1078 [/highlight]{If}{[ex.Source],<br><i>([ex.Source])</i>}</td><br/> 1081 1079 </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 open ed, 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> 1083 1081 </NumberedItem> 1084 1082 </Content> … … 1167 1165 </NumberedItem> 1168 1166 <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"/> → <AutoText key="glidict::Menu.File_Options"/> → <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> 1169 1173 <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> 1170 1174 </NumberedItem> 1171 1175 <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"/> → <AutoText key="glidict::Menu.File_Options"/> → <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> 1173 1177 </NumberedItem> 1174 1178 <NumberedItem> … … 2830 2834 </NumberedItem> 2831 2835 <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"/> → <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"/> → <AutoText key="glidict::Menu.File_Options"/> → <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> 2833 2840 </NumberedItem> 2834 2841 <NumberedItem>
Note:
See TracChangeset
for help on using the changeset viewer.