How to draw a box around characters

Community Beginner ,
Apr 15, 2019 Apr 15, 2019

Copy link to clipboard

Copied

Hello,

I'm trying to figure out a way to draw a box around characters to indicate certain keyboard actions. For example, I'd like to draw a box around CR to indicate Carriage return and LF for line feed. I need to include these this kind of thing a number of times throughout the document. I was trying to use a table (which might work) or text frame but thus far, I couldn't get it the way I wanted. Plus, I was hoping that there might be an easier way to do it.

Here is an example of what I am trying to do. Any help is greatly appreciated.

Views

1.3K

Likes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines

correct answers 1 Correct answer

Adobe Community Professional , Apr 16, 2019 Apr 16, 2019
*I noticed my first screen capture didn't show the character designer settings. I've updated to include the settings I used in the example.Here's an example, using Winfried Reng​'s suggestion of using a character tag to control the "box" and the color of the text. Note that because LF has both a leading and trailing space, Smart Spaces needs to be turned off in Format > Document > Text Options, or you need to place the LF and character tag in a variable.While this doesn't have a box around the c...

Likes

Translate

Translate
Adobe Community Professional ,
Apr 15, 2019 Apr 15, 2019

Copy link to clipboard

Copied

There are two options.

  1. Create individual graphics and insert them inline using the File > Import > Image function. You can probably find free graphics images of the different keyboard keycaps.
  2. Find a keycap font and use a character tag to alter regular letters to a keycap image. There's one at the ShareFonts site. I've never used the site or the font, though, so I can't really comment on how well either would suit your needs.

Both of these will probably require some fiddling with the spacing between lines to prevent overlap, but Frame does a fair job of handling that if you make sure that the paragraph tag does NOT have Fixed line spacing selected.

Likes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Beginner ,
Apr 15, 2019 Apr 15, 2019

Copy link to clipboard

Copied

Thank you for the help. I'm going to try your first suggestion and see how works.

Likes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Adobe Community Professional ,
Apr 15, 2019 Apr 15, 2019

Copy link to clipboard

Copied

Hmmm. Looking at the preview for keycaps, it doesn't appear to have anything like CR or LF as a character. So it looks as if your option is to create a graphic that can be inserted using the image insert. Sorry about that.

Likes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Adobe Community Professional ,
Apr 15, 2019 Apr 15, 2019

Copy link to clipboard

Copied

What's the semantic context here?

I haven't seen a keyboard with a LineFeed cap since the ASR 33 teletype, and don't ever recall seeing one that had a Return/Enter key actually labeled "CR" or "CarriageReturn". The only key usually seen nowadays is "Enter↵" (and even that will vary by localization).

When I've had this requirement, I usually rely on a keycap-style font, or use a custom embedded vector graphic enclosing actual text (Frame graphics or SVG).

In a Unicode future that may not be near us, and a suitably populated font, the literal enclosed CR and LFs might be implemented with:
U+240D SYMBOL FOR CARRIAGE RETURN
U+240A SYMBOL FOR LINE FEED
U+20E3 COMBINING ENCLOSING KEYCAP

Likes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Adobe Community Professional ,
Apr 16, 2019 Apr 16, 2019

Copy link to clipboard

Copied

Hi,

You might also create a character style and set a background.

This would also highlight your characters.

Best regards

Winfried

Likes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Beginner ,
Apr 16, 2019 Apr 16, 2019

Copy link to clipboard

Copied

Thanks Winfried.

Likes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Beginner ,
Apr 16, 2019 Apr 16, 2019

Copy link to clipboard

Copied

Thanks for the reply Bob. I will have to take a look and see the reasons for requiring carriage return etc. I'd rather use something a bit more up to date if I can.

Likes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Adobe Community Professional ,
Apr 16, 2019 Apr 16, 2019

Copy link to clipboard

Copied

*I noticed my first screen capture didn't show the character designer settings. I've updated to include the settings I used in the example.

Here's an example, using Winfried Reng​'s suggestion of using a character tag to control the "box" and the color of the text. Note that because LF has both a leading and trailing space, Smart Spaces needs to be turned off in Format > Document > Text Options, or you need to place the LF and character tag in a variable.

While this doesn't have a box around the characters like your example, the text and background color can be whatever you want.

Placing the text and character tag in a variable would also give you an easy way to quickly and consistently insert the codes you need.

Capture3.png

Likes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Beginner ,
Apr 16, 2019 Apr 16, 2019

Copy link to clipboard

Copied

Thank you Matt. I've never used this feature before. I'll give it a try.

Likes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Adobe Community Professional ,
Apr 17, 2019 Apr 17, 2019

Copy link to clipboard

Copied

did you get something usable?

Likes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Beginner ,
Apr 17, 2019 Apr 17, 2019

Copy link to clipboard

Copied

LATEST

Yes. I ended up going with a dark colored background and white text and it seems to serve the purpose. My LF box did not have spaces before and after the letters so I did not need to turn off Smart Spaces. The only small issue with this method is that when the boxes were side by side, I had to leave space between them so that it looks like they are separate.

That being said, it certainly does the trick for my purposes.

Thanks for checking up.

Bob

Likes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines