﻿<?xml version="1.0" encoding="utf-8"?>
<?xml-stylesheet href="guide.xsl" type="text/xsl"?>
<guide platform="win" title="Inserting XFigures Using the Visual Editor" section="editing">
  <div class="info">
      Before proceeding, make sure you are in Basic View by choosing <span class="menu">View &gt; Basic</span>
      <img class="screenshot-noshadow" src="images/basicview.png"></img><br></br>
    </div>
<div class="tip">Before you can use your own images in Acces4, you must save them in the User Folder. The location of this folder can be
	specified by choosing <span class="menu">Edit > Preferences</span> and clicking on <span class="option">Paths</span>. The default is Documents\My Acces4 Content\.
	Acces will look for files in this folder before looking in any other folder. For more information about where Acces looks for images, 
	refer to <a href="precedence.xml">Precedence in Acces4</a>. We recommend using images with a resolution of 300 dpi for the best
	print quality.
</div>
  <p>
      Images can be inserted into problems as <b>inline figures</b> or as <b>xfigures</b>. Inline figures are inserted
      into the text of the problem. XFigures, on the other hand, "float" around a problem and have properties that can be
      configured to change the placement of the image as well as conditional formatting options. For example, an
      XFigure can be configured to display one message if it is displayed and a different message if it is hidden. 
	  For information on using inline figures, refer to <a href="insertimages.xml">Inserting Figures Using the Visual Editor</a>.
    </p>
	<p>XFigures are useful if several problems refer to the same figure, but you want the figure to display only once. Using xfigures
		in this way allows you to change the order of the problems without having to change the properties of the figure. Acces4 can 
		automatically display the figure with the problem that appears first and hide the figure for subsequent problems.
	</p>
<!--<p>Acces4 allows you to insert images in two ways: as a figure and as an xfigure. Figures are in-line with the problem text and have limited
	formatting options. XFigures can "float" around a problem and have additional options such as the ability to hide repeated xfigures. This
	guide will focus on using xfigures. 
</p>
-->	
  <ol>
      <li>Select a problem and <a href="editbasic.xml" shape="rect">open the Visual Editor</a>.  <img class="screenshot" src="images/insertimage.png"></img>
      </li>
      <li>Click the <span class="option">XFigure</span> tab. <img class="screenshot" src="images/xfiguretab.png"></img>
        </li>
      <li>Click the <span class="button">folder icon</span> to browse for a figure <img class="screenshot" src="images/xfigurebrowse.png"></img>
      </li>
      <li>Select the source for your image by double-clicking a source in the list. <img class="screenshot" src="images/xfiguredatasource.png"></img>
      <div class="note">If "My Content" is not one of the options, then you have not saved a compatible image in the User Folder.
	  </div>
	  </li>
      <li>If you have image editing software installed, and wish to edit the image before adding it to the problem, click
		<span class="button">Edit</span> or <span class="button">Edit a Copy</span>. <span class="button">Edit</span> will edit the image
		for all problems referencing the image. <span class="button">Edit a Copy</span> will create an edited copy of the image for the
		current problem. In either case, when you save your changes to the image in your image editing program, Acces will automatically
		update the image in your problem to reflect the changes.<img class="screenshot" src="images/xfigureedit.png"></img>
		<div class="note">
			If you edit an image for all problems, then decide later that you want to revert to the original copy of the image, delete the image file
			from your User Folder and Acces will refer to the original copy in the database.
		</div>
      </li>
      <li>If you don't need to edit the image, select the image and click <span class="button">Insert</span> to add the image to your problem as
			an xfigure. <img class="screenshot" src="images/xfigureinsert.png"></img>
      </li>
	  <li>
		
         By default, xfigures will inherit the style options set in the <span class="menu">Format > Inserts...</span> menu. To change these options
		 for this xfigure, deselect <span class="option">Use default style option</span>. <img class="screenshot" src="images/xfigurelayoutmenu.png"/>
		The position of xfigures can be set to:

      <ul>
        <li>beginning
        </li>
        <li>right
        </li>
        <li>above
        </li>
        <li>below
        </li>
        <li>optimized
        </li>
      </ul>

	  <div class="horizontal">
      <div>
        <img src="images/xfigurelayout4.png"></img>
      </div>
      <div>
        If the position of the xfigure is set to <span class="option">beginning</span>, then the xfigure will appear above the
        problem, aligned with the problem label.
      </div>
    </div>	  
	  <div class="horizontal">
      <div>
        <img src="images/xfigurelayout1.png"></img>
      </div>
      <div>
        If the position of the xfigure is set to <span class="option">right</span>, then the xfigure will appear to the
        right of the problem (and multiple-choice options, if the problem is multiple-choice).
      </div>
    </div>
  <div class="horizontal">
      <div>
        <img src="images/xfigurelayout2.png"></img>
      </div>
      <div>
        If the position of the xfigure is set to <span class="option">above</span>, then the xfigure will appear above
        the problem text and problem label, aligned with the text.
      </div>
    </div>
  <div class="horizontal">
      <div>
        <img src="images/xfigurelayout3.png"></img>
      </div>
      <div>
        If the position of the xfigure is set to <span class="option">below</span>, then the xfigure will appear below
        the problem text (and multiple-choice options, if the problem is multiple-choice), aligned with the text.
      </div>
    </div>
  <div class="info">
      Regardless of how xfigures are configured, they will always display on the same page as the
      problem with which they are associated. In the diagrams above, the dashed line around each problem represents an
      "unbreakable box" that will not break across pages.
    </div>
  <p>
      Setting the xfigure position to <span class="option">optimized</span> allows Acces4 to determine the best
      placement of the xfigure.
    </p>
  <div class="horizontal">
      <div>
        <img src="images/xfigureoptimized1.png"></img>
      </div>
      <div>
        If a problem does not have multiple-choice items, then setting the xfigure position to <span class="option">optimized</span> 
		will position the xfigure below the problem text, aligned with the text.
      </div>
    </div>
  <div class="horizontal">
      <div>
        <img src="images/xfigureoptimized2.png"></img>
      </div>
      <div>
        If a problem has multiple-choice items, then setting the xfigure position to <span class="option">optimized</span> will 
		position the xfigure to the right of the answer choices, if there is room.
      </div>
    </div>
  <div class="horizontal">
      <div>
        <img src="images/xfigureoptimized3.png"></img>
      </div>
      <div>
        If there is not room to the right of the answer choices, then the xfigure will be positioned below the problem
        text and above the answer choices.
      </div>
    </div>
	</li>
	<li>If two or more consecutive problems include the same xfigure, the default behavior is to hide the xfigure in all problems
		except the first one. To display the xfigure for all problems, deselect <span class="option">Hide figure if already shown in 
		previous problem</span>. <img class="screenshot" src="images/xfigurelayoutmenu.png"/>
	</li>
	<li>To set conditional text for your xfigure, enter the text you wish to display if the figure is shown and/or hidden.
		<img class="screenshot" src="images/xfiguretext.png"/>
	</li>
	<li>Click <span class="button">OK</span> to close the editor and return to the Document Window.
	</li>
    </ol>


</guide>