Select to view content in your preferred language

Formatting of Dynamic Text in Map Series Not Working

4386
7
12-29-2017 11:11 AM
pokateo_
Occasional Contributor

I am creating a map series in ArcGIS Pro and have dynamic text in the layout. I want some of this text to be bold, so I used the formatting tag <FNT style ="Bold"> </FNT> in the properties of the text. When I export the map series, this only works some of the time, i.e. one map in the series may have the correct bold text while another has the text <FNT style ="Bold"> in the text box! See pictures. What can I do to have it bold all the time?


Thanks!

PS: This is the text I have in the properties box: 

Parcel ID: <FNT style="Bold"> <dyn type="page" property="attribute" field="Parcel_id" domainlookup="true"/></FNT>
Owner: <FNT style="Bold"><dyn type="page" property="attribute" field="Owner" domainlookup="true"/></FNT>
Address: <FNT style="Bold"><dyn type="page" property="attribute" field="Address" domainlookup="true"/></FNT>

0 Kudos
7 Replies
WendyHarrison
Esri Contributor

Hi Kate,

My first instinct on this is that you have a < or & in the field used for the text.  this would explain why the bold tag works for some text but not others.  the images you shared don't let me see all the way across.  could you include one that shows the whole thing with all the tags?  We can fix this if it's the case.

thanks

Wendy

pokateo_
Occasional Contributor

Thanks Wendy! Good thinking, but I looked in the attribute table and there are no < or & in the text. The text has confidential information so I didn't share everything. Does this picture help?

0 Kudos
MarcoBoeringa
MVP Regular Contributor

Kate,

According to this Help page:

Add and modify dynamic text—Layouts | ArcGIS Desktop 

Dynamic text uses the same text formatting tags as labels. For the font tag (FNT), the only supported attributes are name, size and scale, not(!) style. So the

<FNT style="Bold">

is not a valid text formatting tag. Instead, you need to write simply:

<BOL>YOUR TEXT</BOL>

since in fact, you aren't using the FNT tag at all, since you do not specify a font name, size or scale attribute! You just need the BOL tag to make your text bold. So e.g.:

Parcel ID: <BOL><dyn type="page" property="attribute" field="Parcel_id" domainlookup="true"/></BOL>

See the list of valid tags and tag attributes here to better understand text formatting tag usage:

Text formatting tags—ArcGIS Pro | ArcGIS Desktop 

pokateo_
Occasional Contributor

Thanks, Marco! That makes sense. Unfortunately it still doesn't work...

EDIT: I also tried adding quotes around them like "<BOL>" as per your Text Formatting Tags page example. Still didn't work.

0 Kudos
MarcoBoeringa
MVP Regular Contributor

Hmm, I can get this to work in ArcMap:

As per @Wendy Harrison's remark: are you absolutely sure that the data source you are using doesn't have some invisible hidden characters, e.g. like a new line?

The fact that some records do work, but others fail, is indeed usually an indication of invalid characters, the most likely being the & "ampersand" and < "left arrow bracket" characters, as these aren't allowed, but I am still wondering if there are more that may raise issues?...

To be honest, I haven't yet tried this in ArcGIS Pro, so don't know if there are any issues or bugs there I am yet unaware of.

0 Kudos
WendyHarrison
Esri Contributor

Hi Kate - sorry for the delay, was out on vacation.  

The text you've blacked out is the text i was interested in seeing   could you narrow down the expression to the area in 8 yr floodplain, see which ones go to showing the tags and send me a screen shot of that?  that would get rid of the confidential part.

thanks

Wendy

Brian_Laws
Frequent Contributor

Just ran into this problem today in ArcGIS Pro where I had a text box and was trying to use the bold and underline formatting for the top line and it wasn't working (it would just print out the <BOL><UND></UND></BOL> as text).  Turns out that I did have ampersands (&) in subsequent text in the block and this was causing the issue.  Wanted to mention this in case anyone else comes across this issue.

It's weird because I was using a project that I used last year, in Pro version 2.9, and I used ampersands there and didn't seem to have this issue.  I've upgraded to Pro version 3.0 since then so I guess it must matter now for some reason.

 

0 Kudos