תוכן
\<bookmark_value\>comparisons; hidden text fields\</bookmark_value\>\<bookmark_value\>hidden text; displaying\</bookmark_value\>\<bookmark_value\>text; hiding\</bookmark_value\>\<bookmark_value\>sections;hiding\</bookmark_value\>\<bookmark_value\>paragraphs;hiding\</bookmark_value\>\<bookmark_value\>non-printing text\</bookmark_value\>\<bookmark_value\>text; non-printable\</bookmark_value\>\<bookmark_value\>hiding;text, with conditions\</bookmark_value\>\<bookmark_value\>displaying;hidden text\</bookmark_value\>

# Hiding Text

You can use fields and sections to hide or display text in your document if a condition is met.

Before you can hide text, you must first create a variable to use in the condition for hiding the text.

## To Create a Variable

1. Click in your document and choose \<emph\>Insert - Fields - Other\</emph\>.

2. Click the \<emph\>Variables \</emph\>tab and click "Set Variable" in the \<emph\>Type \</emph\>list.

3. Click "General" in the \<emph\>Format \</emph\>list.

4. Type a name for the variable in the \<emph\>Name \</emph\>box, for example, "Hide".

5. Enter a value for the variable in the \<emph\>Value \</emph\>box, for example, "1".

6. To hide the variable in your document, select \<emph\>Invisible\</emph\>.

7. Click \<emph\>OK\</emph\>.

## To hide text:

1. Click in the document where you want to add the text.

2. Choose \<emph\>Insert - Fields - Other\</emph\> and click the \<emph\>Functions \</emph\>tab.

3. Click "Hidden Text" in the \<emph\>Type \</emph\>list.

4. Enter a statement in the \<emph\>Condition \</emph\>box. For example, using the variable you previously defined, enter "Hide==1".

5. Type the text that you want to hide in the \<emph\>Hidden text \</emph\>box.

6. Click \<emph\>OK\</emph\>.

## To hide a paragraph:

1. Click in the paragraph where you want to add the text.

2. Choose Insert - Field - More Fields and click the Functions tab.

3. Click "Hidden Paragraph" in the \<emph\>Type \</emph\>list.

4. Enter a statement in the \<emph\>Condition \</emph\>box. For example, using the variable you previously defined, enter "Hide==1".

5. Click \<emph\>OK\</emph\>.

You must enable this feature by removing the check mark Hidden Paragraphs in the dialog LibreOffice - Preferences Tools - Options - LibreOffice Writer - View. When the check mark is set, you cannot hide any paragraph.

## To hide a section:

1. Select the text that you want to hide in your document.

2. Choose Insert - Section.

3. In the\<emph\> Hide\</emph\> area, select\<emph\> Hide\</emph\>, and then enter an expression in the\<emph\> Condition\</emph\> box. For example, using the variable you previously defined, enter "Hide==1".

4. Click \<emph\>OK\</emph\>.

נושאים קשורים

Conditional Text

Querying User Data in Fields or Conditions

Displaying Hidden Text

Creating Non-printing Text

Insert - Field - More Fields

Insert - Section

List of Operators