From 5deab22ee01deac19f2ba30bdb6b89bae168c903 Mon Sep 17 00:00:00 2001 From: Utkarsh Singh Date: Fri, 17 Jan 2025 19:56:47 +0100 Subject: [PATCH] anew --- _posts/2024-12-12-wannier_elf.md | 11 ++++--- _sass/_base.scss | 50 ++++++++++++++++++++++++-------- 2 files changed, 45 insertions(+), 16 deletions(-) diff --git a/_posts/2024-12-12-wannier_elf.md b/_posts/2024-12-12-wannier_elf.md index b77fc66b..1dcf5323 100644 --- a/_posts/2024-12-12-wannier_elf.md +++ b/_posts/2024-12-12-wannier_elf.md @@ -186,7 +186,7 @@ Note that, at the end, we need $$D_h(r)$$ and $$D(r) = \tau - \tau_w(r)$$. In terms of implementation, the electron density and its gradient can be constructed as: -{% highlight python %} +{% highlight python linenos %} # Process the wannier function @@ -228,11 +228,14 @@ Since the wannier functions are not **symmetry-adapted**, but **maximally-locali {: .block-tip } > **Hint:** Try to disable symmetrization in the code. > -> Or, relax the constraints from 1e-5 to say, 1e-1. -> -> And, see what happens! > > See the `symmetrize_field()` method. +> +> +> Or, relax the constraints from `1e-5` to say, `1e-1`. +> +> +> And, see what happens! The following symmetrizations are therefore essential. diff --git a/_sass/_base.scss b/_sass/_base.scss index 97603ec8..fa53baa1 100644 --- a/_sass/_base.scss +++ b/_sass/_base.scss @@ -870,11 +870,12 @@ footer.sticky-bottom { } } +/* // Rouge Color Customization figure.highlight { margin: 0 0 1rem; } -/* + pre { color: var(--global-theme-color); background-color: var(--global-code-bg-color); @@ -889,18 +890,37 @@ pre { padding: 0; } } + +code { + color: var(--global-theme-color); + background-color: var(--global-code-bg-color); + border-radius: 3px; + padding: 3px 3px; +} */ +// Rouge Color Customization +figure.highlight { + margin: 0 0 1rem; + + pre { + white-space: pre-wrap !important; + word-wrap: break-word !important; + word-break: break-word !important; + } + + code { + white-space: pre-wrap !important; + word-wrap: break-word !important; + word-break: break-word !important; + } +} + pre { - color: var(--global-text-color); + color: var(--global-theme-color); background-color: var(--global-code-bg-color); - border-radius: 8px; - padding: 12px 16px; - margin: 1em 0; - white-space: pre-wrap; /* Since CSS 2.1 */ - word-wrap: break-word; /* Internet Explorer 5.5+ */ - overflow-wrap: break-word; /* Modern browsers */ - overflow-x: auto; /* For compatibility */ + border-radius: 6px; + padding: 6px 12px; pre, code { @@ -908,9 +928,6 @@ pre { border-radius: 0; margin-bottom: 0; padding: 0; - white-space: pre-wrap; - word-wrap: break-word; - overflow-wrap: break-word; } } @@ -1366,3 +1383,12 @@ ninja-keys::part(ninja-input-wrapper) { background-color: var(--global-theme-color); color: var(--global-text-color); } + +// Add general highlight class wrapping +.highlight { + pre, code { + white-space: pre-wrap !important; + word-wrap: break-word !important; + word-break: break-word !important; + } +} \ No newline at end of file