# Alignment within a code block

**URL:** https://discourse.notenik.app/t/alignment-within-a-code-block/854
**Category:** Questions
**Created:** [June 1, 2026, 11:17am UTC](https://discourse.notenik.app/t/alignment-within-a-code-block/854 "2026-06-01T11:17:43Z")
**Posts on this page:** 6
**Page:** 1

<div class="post-metadata">

### Author: ![recceleas](https://discourse.notenik.app/user_avatar/discourse.notenik.app/recceleas/32/453_2.png) [@recceleas](https://discourse.notenik.app/u/recceleas)
#### Post date: [June 1, 2026, 11:17am UTC](https://discourse.notenik.app/t/alignment-within-a-code-block/854/1 "2026-06-01T11:17:43Z")

</div>

I’m having trouble aligning text within a code block. I have tried using spaces and tabs both, but it doesn’t want to cooperate. How can I do it? Thanks.

 ![Screenshot 2026-06-01 at 07.17.17](https://discourse.notenik.app/uploads/db0641/original/1X/d4a4bfbc4d87d3bb255b01644023b64ed00d3229.jpeg)

---

<div class="post-metadata">

### Author: ![hbowie](https://discourse.notenik.app/user_avatar/discourse.notenik.app/hbowie/32/6_2.png) [@hbowie](https://discourse.notenik.app/u/hbowie)
#### Post date: [June 1, 2026, 2:29pm UTC](https://discourse.notenik.app/t/alignment-within-a-code-block/854/2 "2026-06-01T14:29:41Z")

</div>

Welcome to the Notenik forums, and thanks for posting!

Let me look into this a bit…

---

<div class="post-metadata">

### Author: ![hbowie](https://discourse.notenik.app/user_avatar/discourse.notenik.app/hbowie/32/6_2.png) [@hbowie](https://discourse.notenik.app/u/hbowie)
#### Post date: [June 1, 2026, 2:43pm UTC](https://discourse.notenik.app/t/alignment-within-a-code-block/854/3 "2026-06-01T14:43:16Z")

</div>

The basic problem is the use of a monospaced font for editing, to match the monospacing used when the code is displayed.

There are a couple of possibilities.

1. If you put the code in a separate `Code` field, instead of in the Body, and then click on the _Edit_ button to edit the code, the resulting edit box should be using a monospaced font, to match the monospacing of the display.
2. You could use a separate text editor to edit the notes. Typically such a text editor will allow more control over the font, and/or will allow you to set a coding mode that will use monospacing by default.

Let me know if one of these works for you!

And thanks again for reporting the issue!

---

<div class="post-metadata">

### Author: ![hbowie](https://discourse.notenik.app/user_avatar/discourse.notenik.app/hbowie/32/6_2.png) [@hbowie](https://discourse.notenik.app/u/hbowie)
#### Post date: [June 1, 2026, 4:53pm UTC](https://discourse.notenik.app/t/alignment-within-a-code-block/854/4 "2026-06-01T16:53:32Z")

</div>

Also, if you use the _View → Adjust Edit Fonts_ window, you can change the editing font to something more appropriate for code, such as Menlo.

This will provide a monospaced font for editing, even when editing in the Body field.

Be sure and use the [latest beta](https://discourse.notenik.app/t/notenik-19-0-3-available-for-beta-testing-on-june-1st-2026/856) for this, though, since your inquiry prompted me to use this window for the first time in Tahoe and it turned out it needed better spacing for the new System UI. The new beta should provide this fix.

Be aware, though, that this adjustment will apply to all of your collections, and not just to the current one.

Hope this helps!

---

<div class="post-metadata">

### Author: ![recceleas](https://discourse.notenik.app/user_avatar/discourse.notenik.app/recceleas/32/453_2.png) [@recceleas](https://discourse.notenik.app/u/recceleas)
#### Post date: [June 1, 2026, 10:15pm UTC](https://discourse.notenik.app/t/alignment-within-a-code-block/854/5 "2026-06-01T22:15:46Z")

</div>

Thanks, Mr Bowie. This one worked. Changed the font to Menlo. I’m running v. 19.0.0 (982).

---

<div class="post-metadata">

### Author: ![Malcolm](https://discourse.notenik.app/letter_avatar_proxy/v4/letter/m/e19b73/32.png) [@Malcolm](https://discourse.notenik.app/u/Malcolm)
#### Post date: [June 2, 2026, 8:50am UTC](https://discourse.notenik.app/t/alignment-within-a-code-block/854/6 "2026-06-02T08:50:22Z")

</div>

@hbowie missed a third option.

Notenik allows you to specify multiple editing apps.

You have to specify the ones you want to use. Do so using the command at the bottom of the File menu, `Add Editing App(s)...`

 ![image](https://discourse.notenik.app/uploads/db0641/original/1X/2e8cf93015ace496e79370fc4416ee52d8426762.png)

When you have more than one editing app, you can set one to monospace font and another to a proportional font, then you have the best of both worlds.

 ![image](https://discourse.notenik.app/uploads/db0641/original/1X/fefe39fec3a0c2ec1f4d5b1e3f1146df75c5865f.png)
