This wiki has undergone a migration to Confluence found Here
<meta name="googlebot" content="noindex">

Difference between revisions of "Publishing and Linking Thumbnail Graphics"

From HL7Wiki
Jump to navigation Jump to search
 
(2 intermediate revisions by the same user not shown)
Line 1: Line 1:
 +
[[Category:HowTo]]
 
=Introduction=
 
=Introduction=
 
The [[Publishing Committee]] created an [[Diagram Thumbnail Pub Task|action item to create thumbnail-large diagram capability]] in publishing documents.  This method is above and beyond the implementation of thumbnails for publishing RMIMs. This has been accomplished, and is documented here.
 
The [[Publishing Committee]] created an [[Diagram Thumbnail Pub Task|action item to create thumbnail-large diagram capability]] in publishing documents.  This method is above and beyond the implementation of thumbnails for publishing RMIMs. This has been accomplished, and is documented here.
Line 8: Line 9:
 
=Working with "stand-alone" graphics (as opposed to RMIMs)=  
 
=Working with "stand-alone" graphics (as opposed to RMIMs)=  
 
This process allows editors to create thumbnails for large graphics that are part of their descriptions and to link these into the document using the "<graphic/>" tag.  These methods will create the appropriate links using "Desktop Publishing" to verify the content before it is submitted for a ballot.
 
This process allows editors to create thumbnails for large graphics that are part of their descriptions and to link these into the document using the "<graphic/>" tag.  These methods will create the appropriate links using "Desktop Publishing" to verify the content before it is submitted for a ballot.
==Creating the thumbnail and Identifying the graphics==
+
==Stand-alone: Creating the thumbnail and Identifying the graphics==
 
# Assuming that you are starting with a ''gif'' file, give it an artifact name in your domain.  An example i in another domain might be "''REAL_NA000020.gif''".
 
# Assuming that you are starting with a ''gif'' file, give it an artifact name in your domain.  An example i in another domain might be "''REAL_NA000020.gif''".
 
# Use a graphics editor to create a "thumbnail".  Any editor that reduces the number of pixels in the ''gif'' file will do.  The author uses Visio.  Starting with the large diagram:  
 
# Use a graphics editor to create a "thumbnail".  Any editor that reduces the number of pixels in the ''gif'' file will do.  The author uses Visio.  Starting with the large diagram:  
Line 20: Line 21:
 
# Submit '''both files''' when you send your material to HQ for publishing.
 
# Submit '''both files''' when you send your material to HQ for publishing.
  
==Using the thumbnail in PubDb and Desktop Publishing==
+
==Stand-alone: Using the thumbnail in PubDb and Desktop Publishing==
 
Place both the original file and the thumbnail in the "''outputgraphics''" folder under the "''C:\Program Files\HL7\PubDb\LocalPub\''" for desk-top publishing of your material.
 
Place both the original file and the thumbnail in the "''outputgraphics''" folder under the "''C:\Program Files\HL7\PubDb\LocalPub\''" for desk-top publishing of your material.
  
Line 27: Line 28:
 
Note that the ''<graphic/>'' must be inside a paragraph ''<p/>'' element.  You can either make this the only content of the paragraph, or add text.  See the example provided for the impact of text upon the left-to-right positioning of the thumbnail.
 
Note that the ''<graphic/>'' must be inside a paragraph ''<p/>'' element.  You can either make this the only content of the paragraph, or add text.  See the example provided for the impact of text upon the left-to-right positioning of the thumbnail.
  
==Example==
+
==Stand-alone: Example==
 
An example of this use can be downloaded as [[Media:PubsGraphicsTestExample.zip]].  It contains:
 
An example of this use can be downloaded as [[Media:PubsGraphicsTestExample.zip]].  It contains:
 
* a large image
 
* a large image
Line 57: Line 58:
 
=Working with RMIM Graphics in their "normal" position=
 
=Working with RMIM Graphics in their "normal" position=
 
The above methods work with stand-alone graphics that are referenced with a "<graphic/>" tag, but they will not place RMIM graphics in their "usual" place as part of the RMIM definition.  The following outlines a similar, but distinct process for creating these graphics.  It '''will''' allow these graphics to be displayed for verification in "Desktop Publishing" before the material is submitted to ballot.
 
The above methods work with stand-alone graphics that are referenced with a "<graphic/>" tag, but they will not place RMIM graphics in their "usual" place as part of the RMIM definition.  The following outlines a similar, but distinct process for creating these graphics.  It '''will''' allow these graphics to be displayed for verification in "Desktop Publishing" before the material is submitted to ballot.
==Creating the thumbnail and Identifying the graphics==
+
==RMIMs: Creating the thumbnail and Identifying the graphics==
 
Unlike the case for stand-alone graphics (above), the process of creating the graphic and the thumbnail are "automated" by the RMIM designer when creating RMIM reference graphics.  The steps are as follows:
 
Unlike the case for stand-alone graphics (above), the process of creating the graphic and the thumbnail are "automated" by the RMIM designer when creating RMIM reference graphics.  The steps are as follows:
 
#Create or select a '''''WorkingDirectory''''' for use in generating the graphics.  This can be anywhere on your system, and can be named anything.
 
#Create or select a '''''WorkingDirectory''''' for use in generating the graphics.  This can be anywhere on your system, and can be named anything.
Line 72: Line 73:
  
 
'''Note: ''' This process will not produce the table-views and the Excel views that are linked to the clickable graphics.  These subsidiary files can be created using the V3 Generator (building from the HMD files) and placed in the "editable" directory for testing.
 
'''Note: ''' This process will not produce the table-views and the Excel views that are linked to the clickable graphics.  These subsidiary files can be created using the V3 Generator (building from the HMD files) and placed in the "editable" directory for testing.
 +
==RMIMs: Using the thumbnail in PubDb and Desktop Publishing==
 +
The RMIM graphics are referenced automatically '''provided the RMIM is defined in the PubDb''', and if the graphics files are found in the "expected" place.  Thus for desktop publishing, the only challenge is to place the files where they will be found.  The following graphic annotates and depicts the desired file structure.[[Image:DirectoriesForVisioGraphicsForDesktopPublishing.gif]] 
 +
 +
At the risk of being redundant, the steps are:
 +
#Find your '''''LocalPub''''' directory which is usually ''C:\Program files\HL7\PubDb\LocalPub''
 +
#Under '''''LocalPub''''', locate the '''''input''''' sub-directory.
 +
#Under the '''''input''''' sub-directory, create a sub-directory named '''''domains'''''
 +
#Under the '''''domains''''' sub-directory, create a sub-directory identified with the two-letter code for your domain, such as ''lb'' for the Lab domain.
 +
#Place a copy of the '''''editable''''' sub-directory and all of its contents (as created in the [[#RMIMs: Creating the thumbnail and Identifying the graphics|section above]]) in the sub-directory just created for your domain.
 +
 +
That's it.  Running the normal desktop publishing process from within the PubDb of your domain should correctly find and link the RMIM thumbnails.
 +
 +
[[User:Gwbeeler|Woody]] 20:32, 11 December 2006 (CST)

Latest revision as of 16:38, 12 June 2010

Introduction

The Publishing Committee created an action item to create thumbnail-large diagram capability in publishing documents. This method is above and beyond the implementation of thumbnails for publishing RMIMs. This has been accomplished, and is documented here.

It turned out that this capability was already there. It simply needed documenting, so here goes. The steps are straightforward, and assume that the committee has a large diagram that they wish to include by "thumbnail".

Note that this process is somewhat different if you want to use the RMIM Designer Clickable graphics and thumbnails that can be generated in the RMIM Designer in Visio. The first section of this document discusses creating thumbnails for stand-alone graphics, while the second goes into the use of thumbnails for RMIMs.

Working with "stand-alone" graphics (as opposed to RMIMs)

This process allows editors to create thumbnails for large graphics that are part of their descriptions and to link these into the document using the "<graphic/>" tag. These methods will create the appropriate links using "Desktop Publishing" to verify the content before it is submitted for a ballot.

Stand-alone: Creating the thumbnail and Identifying the graphics

  1. Assuming that you are starting with a gif file, give it an artifact name in your domain. An example i in another domain might be "REAL_NA000020.gif".
  2. Use a graphics editor to create a "thumbnail". Any editor that reduces the number of pixels in the gif file will do. The author uses Visio. Starting with the large diagram:
    1. scale the diagram down to about 3-inches wide;
    2. select the Visio File...Save as capability;
    3. select to output as gif;
    4. select a name that is the same as assigned above, but with "T-" prefixed, such as "T-REAL_NA000020.gif"
    5. Under "Resolution" on the final panel, select "Screen" which is 96 pixels/in.
    6. save the thumbnail
  3. Note that 400 pixels wide is what HL7 is using for RMIM designer graphics, but there is no hard and fast rule on width. They should not exceed 500 pixels, but anything smaller is OK.
  4. Submit both files when you send your material to HQ for publishing.

Stand-alone: Using the thumbnail in PubDb and Desktop Publishing

Place both the original file and the thumbnail in the "outputgraphics" folder under the "C:\Program Files\HL7\PubDb\LocalPub\" for desk-top publishing of your material.

In your PubDb document, the thumbnail is used as the attribute value of the "source" attribute in a <graphic/> element. Be sure to use the thumbnail identifier in this reference, such as "T-REAL_NA000020.gif". The value of the "alt" attribute of this element will not be rendered and can be left empty.

Note that the <graphic/> must be inside a paragraph

element. You can either make this the only content of the paragraph, or add text. See the example provided for the impact of text upon the left-to-right positioning of the thumbnail.

Stand-alone: Example

An example of this use can be downloaded as Media:PubsGraphicsTestExample.zip. It contains:

  • a large image
  • its corresponding thumbnail
  • the code fragment from the PubDb that will render this, and
  • A screen shot of the same content rendered in html by the HL7 publishing transforms.

The code fragment is

<div id="tst1" title="Graphics Thumbnail Test">
  <p>This paragraph uses RIM graphics to test whether the inclusion
     of thumbnails may be "automatic" in the publishing paradigm.  
     It is. There are two examples.  In this one, the thumbnail is 
     a <graphic/> element stuck in the middle of the text of 
     a paragraph.  The element "alt" tag does <b>not </b>seem to be 
     rendered, although it should be a caption. 
     <graphic source="T-REAL_NA000001.gif"/> Note that the text that 
     immediately precedes and follows the graphic element ends up 
     aligned (somewhat clumsily) with the bottom of the thumbnail.  
     The second example follows. </p>
  <p>
    <graphic source="T-REAL_NA000001.gif"/>
  </p>
  <p>This example uses a paragraph with only the the <graphic/> 
     element in it (the preceding <p/> element and this following 
     text is in a separate paragraph, leaving a thumbnail that stands 
     alone and is cleaner.</p>
</div>

Woody 13:59, 1 November 2006 (CST)

Working with RMIM Graphics in their "normal" position

The above methods work with stand-alone graphics that are referenced with a "<graphic/>" tag, but they will not place RMIM graphics in their "usual" place as part of the RMIM definition. The following outlines a similar, but distinct process for creating these graphics. It will allow these graphics to be displayed for verification in "Desktop Publishing" before the material is submitted to ballot.

RMIMs: Creating the thumbnail and Identifying the graphics

Unlike the case for stand-alone graphics (above), the process of creating the graphic and the thumbnail are "automated" by the RMIM designer when creating RMIM reference graphics. The steps are as follows:

  1. Create or select a WorkingDirectory for use in generating the graphics. This can be anywhere on your system, and can be named anything.
  2. Create a sub-directory under your WorkingDirectory to hold the Visio ("vsd") files (RMIM Desings) for which you wish to create graphics. This vsd sub-directory can be named anything you like.
  3. Copy the RMIM "vsd" files for which you wish to create graphics into your WorkingDirectory\vsd sub-directory (or whatever you have named them)
  4. Open up Visio, and select to create a "new" RMIM2 drawing. Leave the page blank.
  5. In the Visio menus, select the HL7...HTML Exports...Batch Process VSD to HTML Graphics Only option.
  6. In the first dialog box, simply click Export HTML Graphics unless you wish to change the thumbnail width.
  7. In the following, file-selection dialog, navigate to your WorkingDirectory\vsd sub-directory and select the VSD file(s) for which you wish graphics, and then click Open. The files will be converted in sequence.
  8. The conversion creates three sets of files. These are placed in a sub-directory named editable under your WorkingDirectgory and this new directory will also have an images sub-directory. Each of the files will be named with the name of the RMIM, as found in the EntryPoint of your Visio drawing. (The name of the VSD file is not used in naming the results.) The three sets of files are:
    1. An HTML file named with the RMIM identifier and a file type of "hmd", such as REAL_RM987654UV.hmd. This file holds the "map" that makes the clickable graphics work.
    2. A "PNG" file in the images sub-directory that is the full-size graphic for the drawing, named such as REAL_RM987654UV.png
    3. A "PNG" file in the images sub-directory that is the thumbnail graphic for drawing, and will be displayed in-line in the RMIM definition.

Note: This process will not produce the table-views and the Excel views that are linked to the clickable graphics. These subsidiary files can be created using the V3 Generator (building from the HMD files) and placed in the "editable" directory for testing.

RMIMs: Using the thumbnail in PubDb and Desktop Publishing

The RMIM graphics are referenced automatically provided the RMIM is defined in the PubDb, and if the graphics files are found in the "expected" place. Thus for desktop publishing, the only challenge is to place the files where they will be found. The following graphic annotates and depicts the desired file structure.DirectoriesForVisioGraphicsForDesktopPublishing.gif

At the risk of being redundant, the steps are:

  1. Find your LocalPub directory which is usually C:\Program files\HL7\PubDb\LocalPub
  2. Under LocalPub, locate the input sub-directory.
  3. Under the input sub-directory, create a sub-directory named domains
  4. Under the domains sub-directory, create a sub-directory identified with the two-letter code for your domain, such as lb for the Lab domain.
  5. Place a copy of the editable sub-directory and all of its contents (as created in the section above) in the sub-directory just created for your domain.

That's it. Running the normal desktop publishing process from within the PubDb of your domain should correctly find and link the RMIM thumbnails.

Woody 20:32, 11 December 2006 (CST)