投稿

9月, 2025の投稿を表示しています

bloggerのコード表示を変更しました

イメージ
𖧷 prettyprint 今ままではprettyprintを使っていて、こんな感じでした↓ console.log("Hello, World!"); これは、 ① Blogger管理画面に行く ② 適用されているテーマのHTMLの編集 ③ <head>直下に <script src="https://cdn.rawgit.com/google/code-prettify/master/loader/run_prettify.js?skin=sunburst"> を入れ、HTMLビューで <pre class="prettyprint lang-js"> コード内容 </pre> と記述することで実装していました。 𖧷 prettyprint これを今回、 console.log("Hello, World!"); headの前に <link href='https://cdnjs.cloudflare.com/ajax/libs/highlight.js/11.8.0/styles/github.min.css' rel='stylesheet'/> <script src='https://cdnjs.cloudflare.com/ajax/libs/highlight.js/11.8.0/highlight.min.js'/> <script>hljs.highlightAll();</script> <!-- CSSをここに書く --> <style> .code-container { position: relative; margin: 2em 0; padding: 0; line-height: 1; font-size: 15px; background: #F7F7F7 !important; border-radius: 4px; overflow: hidden...

bloggerにtex形式で数式を表示

イメージ
① Blogger管理画面に行く ② 適用されているテーマのHTMLの編集 ③ <head>要素内に以下をペースト <script src='//cdn.mathjax.org/mathjax/latest/MathJax.js' type='text/javascript'>         MathJax.Hub.Config({         HTML: ["input/TeX","output/HTML-CSS"],         TeX: { extensions: ["AMSmath.js","AMSsymbols.js"],                  equationNumbers: { autoNumber: "AMS" } },         extensions: ["tex2jax.js"],         jax: ["input/TeX","output/HTML-CSS"],         tex2jax: { inlineMath: [ ['$','$'], ["\\(","\\)"] ],                    displayMath: [ ['$$','$$'], ["\\[","\\]"] ],                    processEscapes: true },         "HTML-CSS": { availableFonts: ["TeX"],                   ...

【blender/python】階段生成スクリプト試作1 メモ

イメージ
以下のコードをblenderの「Scripting」タブに貼り付けて実行(▶︎)するとどうなるかのメモ。 import bpy import mathutils # 既存のオブジェクトを削除 bpy.ops.object.select_all(action='SELECT') bpy.ops.object.delete(use_global=False) # ========= パラメータ ========= step_width = 1.0         # 階段の幅(X方向) step_height = 0.18       # 1段の高さ(Z方向) step_depth = 0.28       # 1段の奥行(Y方向) num_steps = 12           # 段数 board_thickness = 0.03   # 踏み板の厚み rail_height = 0.9       # 手すり高さ post_radius = 0.02       # 支柱半径 rail_radius = 0.03       # 手すり半径 post_spacing = 2         # 支柱を何段ごとに置くか # ============================= # --- 階段(踏み板+蹴込み板) --- for i in range(num_steps):     y = i * step_depth     z = i * step_height     # 踏み板     bpy.ops.mesh.primitive_cube_add(         size=2,   # ★ 幅の扱いをシンプルに         location=(0, y, z + board_thic...