1. Centering Content

First, navigate to the .../layouts/shortcodes folder and create a new file named center.html. If the layouts folder doesn’t exist at your root, create one yourself. Do not look for this under the PaperMod theme directory; create it in your own project root.

Then paste in the following code and save:

<div style="margin: 0 auto; width: fit-content; min-width: 10%; overflow-x: auto;">
    {{ .Inner }}
</div>
```markdown

When calling it later, use this format before rendering:

```markdown
{{% center %}}
| Top | Bottom | Left | Right |
| :---: | :---: | :---: | :---: |
| 54.79% | 53.76% | 53.91% | 52.43% |
{{% /center %}}

{{% center %}}
**Table 1.** Variance Explained by 5 Principal Components
{{% /center %}}

After rendering:

TopBottomLeftRight
54.79%53.76%53.91%52.43%

Table 1. Variance Explained by 5 Principal Components

2. Changing Text Alignment Logic

For example, let’s say I want to use justify alignment instead of left alignment.

If you want to apply this globally, add the following CSS to .../assets/css/extended/blank.css (or your override file), then restart the Hugo server or redeploy.

.post-content p {
    text-align: justify;
    text-justify: inter-word;
    hyphens: auto;
}
```css

- `text-justify`: defines the word spacing strategy for justification.
- `hyphens`: defines hyphenation behavior; `auto` helps avoid awkward spacing.

If you only want this in one specific article, insert this style block at the top of that markdown file:

```html
<style>
  .post-content p {
    text-align: justify;
    text-justify: inter-word;
    hyphens: auto;
  }
</style>

Example usage in markdown:

+++
date = '2025-11-27'
title = 'Random title...'
tags = ["111"]
...
+++

<style>
  .post-content p {
    text-align: justify;
    text-justify: inter-word;
    hyphens: auto;
  }
</style>

The main body goes here. As long as you include the style block above before your content, the paragraphs below will use the new alignment.

The same principle applies to other alignment styles.

3. Nothing Else Yet

I’ll add more when I have them.