Use italics in a portion of layout text box in ArcGIS Pro

525
10
06-23-2020 09:14 AM
YusefSamari
New Contributor III

I am using ArcGIS Pro 2.5.1.

I am making a bird distribution atlas and have a text box containing the species common name, Latin name, and survey the data is based from. I want the Latin name of each species in the text box to be italicised - nothing else. So the words 'Alcedo atthis' in the example below:

I've already learned from this thread - Italic text in ArcGIS Pro layout  - that the default text, Tahoma, doesn't support italics. I've changed the font and that allows me to select 'Italic', but it changes the entirety of the text in the text box.

If I select the words in the text box I want to change, the selection disappears as soon as I click on the Format Text pane. I could of course make a separate text box for the Latin name, but that would be cumbersome and create more work with additional dragging around to line them up every time I change the species. In ArcMap layout view I could italicise text in a text box by placing the tags <ITA> on either side. I tried that here but it doesn't work.

Does anyone have any ideas?

0 Kudos
10 Replies
SarahFox1
New Contributor III

<bump>

I need help with this also.  Anyone have any solutions?  I have a list of 70 parks that need the name in regular font and their address next to them in italics.

Thanks!

0 Kudos
TomBole
Esri Regular Contributor

Hi Sarah, 

For text elements in the Layout you will first need to use a font that supports italics (ex: Arial). The drop down below the font name will display the styles the font supports.

After you have selected the text element you want to work with you can set italics (or any other supported style) on a specific piece of text 2 ways. You can double click the text and set the style from the ribbon, or you can enter the appropriate Text formatting tags—ArcGIS Pro | Documentation

For the example below: Text <FNT style="Italic">Italics</FNT>

Hope this helps, 

Tom

SarahFox1
New Contributor III

I'm missing something.  I have it like your example, but the tags show in the text box.  I put the font on Arial also, but it did the same thing.

0 Kudos
TomBole
Esri Regular Contributor

Hi Sarah, 

The problem is with the ampersands (&). From the help topic - Text formatting tags—ArcGIS Pro | Documentation 

The ampersand (&) and angle bracket (<) are special characters and are not valid in your text if formatting tags are used. Use the equivalent character codes &amp; and &lt; instead.

Annotation

Instead of <ITA>John & Paul</ITA>, use:

<ITA>John &amp; Paul</ITA>

You will need to enter "amp;" after each instance of an ampersand in your text.

Instead of using a text element to display this list you may want to consider placing you list into a table (in a file geodatabase or excel table) and inserting a table frame into your layout (see Add and modify table frames—ArcGIS Pro | Documentation). That way you can have the address in a separate field which you can then set to be italic (provided the font supports italics) using the symbol properties for this field (see Add and modify table frame fields—ArcGIS Pro | Documentation)

Depending on your workflow you may find working with a table frame easier than a text element. The following tutorial should help you get started - Work with a table frame—ArcGIS Pro | Documentation.

Tom

SarahFox1
New Contributor III

I added the amp; after the &, and it's showing that in the text box.  Does there need to be an option checked somewhere that the tags aren't registering?

I'm not sure a table will work in this case, since some of the park names are crazy long, but I'll give it a try and see if I can get that up and running!

0 Kudos
TomBole
Esri Regular Contributor

There is no option that I'm aware of.  It is likely that the tags have not been formatted correctly. Make sure that you are starting and ending the tag correctly. Here are some examples: Text formatting tags—ArcGIS Pro | Documentation

When working with fields with "long" values in a table frame I would recommend enabling word wrapping for the table field. 

Auto width is checked by default, meaning the field will automatically widen to fit all the data. When it is not checked, you can set the width of the field in the units of the page. If set to a specific width, the values of some fields may be truncated. You can check Enable word wrapping, which will write the data on multiple lines if the field is too narrow to fit all the information.

From Add and modify table frame fields—ArcGIS Pro | Documentation 

Tom

0 Kudos
SarahFox1
New Contributor III

The dynamic tags are working just fine it looks like!  So there is something up with just the font tags.  I copy/pasted the code from the dynamic text tags, so it should be right, but it's still just showing the font tags.  I asked someone else to open the workspace, just to see if it was my machine, but they see the font tags in the text also.

Is there something else I can do to see why only the dynamic tags are registering?


Thank you!

0 Kudos
TomBole
Esri Regular Contributor

Sarah, my guess is that the other ampersands are causing a problem.  I think you will need to properly escape these characters by adding "amp;" to all instances of "&" in the text element. 

SarahFox1
New Contributor III

That was it!  Once all the & were &amp; then the formatting worked.

Thank you so much for working through this with me!

0 Kudos