> ## Documentation Index
> Fetch the complete documentation index at: https://docs.abbyy.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Reference layout

> Create and edit reference layouts in ABBYY FlexiLayout Studio to benchmark matching results, compare differences, and work with block-editing tools.

You can create a reference layout for each image in the batch. The reference layout shows where you want blocks to be located on the image. You can create a reference layout manually or from the results of matching the FlexiLayout, and you can edit it by adding or removing blocks and by changing their sizes and positions.

Reference layouts are used when debugging FlexiLayouts, because they let you compare the results of matching your FlexiLayout with the block locations on each image.

## Reference layout and Difference layout modes

You create reference layouts in **Reference layout** mode. To switch to this mode, click <img src="https://mintcdn.com/abbyy/fmgRWFNHKYN2MLSg/images/flexi-capture/fls/Mode_ReferenceLayout.gif?fit=max&auto=format&n=fmgRWFNHKYN2MLSg&q=85&s=ae59515ce5497aabaeb0a780685df3f6" alt="Reference layout button" style={{display:"inline-block",verticalAlign:"middle",margin:0}} width="21" height="23" data-path="images/flexi-capture/fls/Mode_ReferenceLayout.gif" /> on the toolbar.

**Difference layout** mode (<img src="https://mintcdn.com/abbyy/fmgRWFNHKYN2MLSg/images/flexi-capture/fls/Mode_Differences.gif?fit=max&auto=format&n=fmgRWFNHKYN2MLSg&q=85&s=8858abb0b1940432238e7581c56f75f1" alt="Difference layout button" style={{display:"inline-block",verticalAlign:"middle",margin:0}} width="24" height="24" data-path="images/flexi-capture/fls/Mode_Differences.gif" /> button on the toolbar) shows the difference between the reference layout and the results of matching the FlexiLayout.

It highlights two kinds of area:

* **Missing Areas** – Areas present in the reference layout blocks but absent from the blocks detected by matching the FlexiLayout, highlighted in red.
* **Excess Areas** – Areas absent from the reference layout blocks but present in the blocks detected by matching the FlexiLayout, highlighted in green.

The **Batch** window shows the percentages of **Missing Areas** and **Excess Areas**.

## Create a reference layout manually

<Steps>
  <Step title="Open the image">
    Open the image you want to create a reference layout for.
  </Step>

  <Step title="Match the FlexiLayout with the image">
    For more information, see [Match the FlexiLayout with images](/flexi-capture/fls/settings/analyze).
  </Step>

  <Step title="Switch to Reference layout mode">
    Click <img src="https://mintcdn.com/abbyy/fmgRWFNHKYN2MLSg/images/flexi-capture/fls/Mode_ReferenceLayout.gif?fit=max&auto=format&n=fmgRWFNHKYN2MLSg&q=85&s=ae59515ce5497aabaeb0a780685df3f6" alt="Reference layout button" style={{display:"inline-block",verticalAlign:"middle",margin:0}} width="21" height="23" data-path="images/flexi-capture/fls/Mode_ReferenceLayout.gif" /> on the toolbar.
  </Step>

  <Step title="Draw the blocks">
    Draw the blocks you need with the [Block-Drawing Tools toolbar](/flexi-capture/fls/interface/toolbars#blockdrawingtools).
  </Step>

  <Step title="Save the reference layout">
    Click <img src="https://mintcdn.com/abbyy/fmgRWFNHKYN2MLSg/images/flexi-capture/fls/Button_Save.gif?fit=max&auto=format&n=fmgRWFNHKYN2MLSg&q=85&s=846be68a674f044a4ed6434e3074affa" alt="Save button" style={{display:"inline-block",verticalAlign:"middle",margin:0}} width="23" height="23" data-path="images/flexi-capture/fls/Button_Save.gif" /> on the toolbar.
  </Step>
</Steps>

## Create a reference layout from a matched FlexiLayout

<Steps>
  <Step title="Open the image">
    Open the image you want to create a reference layout for.
  </Step>

  <Step title="Match the FlexiLayout with the image">
    For more information, see [Match the FlexiLayout with images](/flexi-capture/fls/settings/analyze).
  </Step>

  <Step title="Copy the matched layout">
    Select **Copy Matched Layout to Reference** from the **Batch** menu or the shortcut menu.
  </Step>

  <Step title="Adjust the blocks">
    Move or resize the blocks if the copied layout needs correcting.
  </Step>

  <Step title="Save the reference layout">
    Click <img src="https://mintcdn.com/abbyy/fmgRWFNHKYN2MLSg/images/flexi-capture/fls/Button_Save.gif?fit=max&auto=format&n=fmgRWFNHKYN2MLSg&q=85&s=846be68a674f044a4ed6434e3074affa" alt="Save button" style={{display:"inline-block",verticalAlign:"middle",margin:0}} width="23" height="23" data-path="images/flexi-capture/fls/Button_Save.gif" /> on the toolbar.
  </Step>
</Steps>

You can also use the **Copy Matched Layout to Reference** command on the shortcut menu of the batch to save the results of matching the FlexiLayout with selected batch pages as a reference layout.

## Reference layout tools

The commands for creating and editing blocks are available in **View → Images → Tool → Select**. The corresponding buttons are on the toolbar.

### Move a block border

<Steps>
  <Step title="Activate the Select tool">
    Click the **Select** tool on the toolbar, or select it in **View → Images → Tool**.
  </Step>

  <Step title="Point to the border">
    Place the mouse pointer on the block border you want to move.
  </Step>

  <Step title="Drag the border">
    Hold down the left mouse button, drag the border in the direction you want, and release.
  </Step>
</Steps>

<Note>
  If you place the mouse pointer in the corner of the block, dragging the mouse moves both the vertical and horizontal block borders.
</Note>

### Move a selected block

<Steps>
  <Step title="Activate the Select tool">
    Click the **Select** tool on the toolbar, or select it in **View → Images → Tool**.
  </Step>

  <Step title="Point to the block">
    Place the mouse pointer on the block. The pointer changes shape to show that you can move the block.
  </Step>

  <Step title="Drag the block">
    Hold down the left mouse button, drag the block in the direction you want, and release.
  </Step>
</Steps>

Sometimes a block is too small to move, because its borders are very close together and pointing at any of them activates the change-size mode. Hold down the **Ctrl** key to move such blocks.

### Create a new block

<Steps>
  <Step title="Select the Create Block tool">
    Click the **Create Block** tool on the toolbar, or select it in **View → Images → Tool**.
  </Step>

  <Step title="Draw the block">
    Place the mouse pointer in the corner of the new block, hold down the left mouse button, drag the corner diagonally in the direction you want, and release.
  </Step>

  <Step title="Name the block">
    In the **Create Block** dialog box, enter a name for the new block.
  </Step>
</Steps>

### Draw a block or element

<Steps>
  <Step title="Switch to training mode">
    Select **Training Mode** from the **Training** menu.
  </Step>

  <Step title="Select a block or element">
    In the **FlexiLayout** window, select a block or a static element.
  </Step>

  <Step title="Select the Draw Location tool">
    Click the **Draw Location** tool on the toolbar, or select it in **View → Images → Tool**.
  </Step>

  <Step title="Draw the location">
    Place the mouse pointer in the corner of the new block, hold down the left mouse button, drag the corner diagonally in the direction you want, and release.
  </Step>
</Steps>

### Delete a block

<Steps>
  <Step title="Select the Delete Region tool">
    Click the **Delete Region** tool on the toolbar, or select it in **View → Images → Tool**.
  </Step>

  <Step title="Delete the block">
    Click the block you want to delete.
  </Step>
</Steps>

### Add a rectangular area to a block

<Steps>
  <Step title="Select the Add Region Part tool">
    Click the **Add Region Part** tool on the toolbar, or select it in **View → Images → Tool**.
  </Step>

  <Step title="Point inside the block">
    Place the mouse pointer inside the block you want to add a rectangular area to.
  </Step>

  <Step title="Drag the area">
    Hold down the mouse button, drag the pointer diagonally in the direction you want, and release.
  </Step>
</Steps>

The rectangle is added to the block.

### Cut out a rectangular area from a block

<Steps>
  <Step title="Select the Cut Region Part tool">
    Click the **Cut Region Part** tool on the toolbar, or select it in **View → Images → Tool**.
  </Step>

  <Step title="Point inside the block">
    Place the mouse pointer inside the block you want to cut a rectangular area from.
  </Step>

  <Step title="Drag the area">
    Hold down the left mouse button, drag the pointer diagonally in the direction you want, and release.
  </Step>
</Steps>

The rectangle is cut from the block.

<Note>
  When you cut out top or bottom block areas, the adjoining area on the right, up to the border of the block, is also cut out. This happens because the OCR engine can only recognize continuous text blocks. This constraint does not apply to left-hand and right-hand areas.
</Note>

### Add a vertical separator

<Steps>
  <Step title="Select the Add Vertical Separator tool">
    Click the **Add Vertical Separator** tool on the toolbar, or select it in **View → Images → Tool**.
  </Step>

  <Step title="Point to the location">
    Rest the mouse pointer over the location you want in the **Table** block. The pointer changes appearance.
  </Step>

  <Step title="Add the separator">
    Click the block.
  </Step>
</Steps>

### Add a horizontal separator

<Steps>
  <Step title="Select the Add Horizontal Separator tool">
    Click the **Add Horizontal Separator** tool on the toolbar, or select it in **View → Images → Tool**.
  </Step>

  <Step title="Point to the location">
    Rest the mouse pointer over the location you want in the **Table** block. The pointer changes appearance.
  </Step>

  <Step title="Add the separator">
    Click the block.
  </Step>
</Steps>

### Delete a separator

<Steps>
  <Step title="Select the Delete Separator tool">
    Click the **Delete Separator** tool on the toolbar, or select it in **View → Images → Tool**.
  </Step>

  <Step title="Point to the location">
    Rest the mouse pointer over the location you want in the **Table** block. The pointer changes appearance.
  </Step>

  <Step title="Delete the separator">
    Click the block.
  </Step>
</Steps>

### Create a reference layout for Table block columns

<Steps>
  <Step title="Select the Table block">
    Click the **Table** block on the image.
  </Step>

  <Step title="Divide the block into cells">
    Use the <img src="https://mintcdn.com/abbyy/fmgRWFNHKYN2MLSg/images/flexi-capture/fls/Button_Vert_Sep.png?fit=max&auto=format&n=fmgRWFNHKYN2MLSg&q=85&s=7f87681ac68d0bdebcb781429495a8b1" alt="Add Vertical Separator button" style={{display:"inline-block",verticalAlign:"middle",margin:0}} width="26" height="26" data-path="images/flexi-capture/fls/Button_Vert_Sep.png" />, <img src="https://mintcdn.com/abbyy/fmgRWFNHKYN2MLSg/images/flexi-capture/fls/Button_Hor_Sep.png?fit=max&auto=format&n=fmgRWFNHKYN2MLSg&q=85&s=9777e776939181836f9d2e25c0436fa9" alt="Add Horizontal Separator button" style={{display:"inline-block",verticalAlign:"middle",margin:0}} width="26" height="26" data-path="images/flexi-capture/fls/Button_Hor_Sep.png" />, and <img src="https://mintcdn.com/abbyy/fmgRWFNHKYN2MLSg/images/flexi-capture/fls/Button_Del_Sep.png?fit=max&auto=format&n=fmgRWFNHKYN2MLSg&q=85&s=b1623b412c2535871668ae1983079bf2" alt="Delete Separator button" style={{display:"inline-block",verticalAlign:"middle",margin:0}} width="26" height="26" data-path="images/flexi-capture/fls/Button_Del_Sep.png" /> tools.
  </Step>

  <Step title="Name the column">
    Right-click the column and select the column name from the shortcut menu.
  </Step>
</Steps>

To delete a column from a **Table** block, right-click the column and select **Delete Column** from the shortcut menu.
