academic

How to update hugo and academic theme (Part3)

先日,ブログのアップデートについて2回に分けてまとめたが(How to update hugo and academic theme (Part1), How to update hugo and academic theme (Part2)),読み直してみるとhugoとacademic themeの全体的なアップデートのことで終わっていて,具体的な内容のアップデートについてはあまり書いていないことに気がついた.そこで,今回はその辺の細かいところについて,後日の自分のためにも,まとめておくことにした.今回の内容に関しては,ox-hugoのレベル,つまり,org-mode file ではどうすれば良いのか分からず,直接マークダウンファイルを弄らざるを得ない事が多かった.

How to update hugo and academic theme (Part2)

前回(How to update hugo and academic theme (Part 1))にhutoとacademicのアップデートをまとめたが,やはり,githubにdeployするときのエラーが,どうしても気になる.そこで,今回は,Academic themeのインストールを一からやり直すことにした. Hugoとox-hugoのインストールやアップデートは前回の記事(How to update hugo and academic theme (Part 1))を参考にしていただきたい. <!–more–> Table of Contents References Install Academic Kickstart with Git Migrate Content References Install Academicご本家の解説 Update Academicご本家の解説 Install Academic Kickstart with Git やはり,公式ドキュメントに従うのが良いだろうと考え,上記のリンク先のInstallの解説の通りにしてみた.git submoduleを使うので,よく分からんと敬遠していたのだが,やってみると(作業自体は)簡単であった. Git submodule の基礎 によれば,「git submodule は、外部の git リポジトリを、自分の git リポジトリのサブディレクトリとして登録し、特定の commit を参照する仕組み」である. 1. まず,Academic Kickstart repository を自分のウェブサイトを作るためにクローンする. {{% alert note %}} またも間違っていた.上述の公式ドキュメントにはちゃんと,Fork the Academic Kickstart repository to create a new website と書いてあったのに読み過ごしていた. {{% /alert %}} ということで,まず,academic-kickstart に行って,右上の Fork ボタンを押して,自分のgithub pageにacademic-kickstartのrepositoryを作成する. ついで,この自分のgithub pageのforkをgit cloneで自分のサイトにクローンする. $ pwd /Data/MyBlog $ git clone https://github.

How to update hugo and academic theme (Part 1)

最近のニュースを見ていて思い出した言葉がある. “True patriotism hates injustice in its own land more than anywhere else.” ― Clarence Darrow “Patriotism is the last refuge of a scoundrel.” ― Samuel Johnson “Violence is the last refuge of the incompetent.”” ― Salvor Hardin ( Isaac Asimov) 3番目はオマケ 閑話休題,以前の記事(How to add horizontal scrollbar for codeblock in academic theme of hugo)で触れたように,このブログは,Hugoという静的サイトジェネレーター(themeはacademic)で作成している.

How to add horizontal scrollbar for codeblock in academic theme of hugo

いやー,めでたい.ついに,TexLive 2019がreleaseされた.それにしても,TeXってこんなに人気があったのだ.世の中がみんなお祝いしてる,凄いぞ,TeX....と思ったら,全然違った...これでまた年齢計算が複雑になる.システム担当者は大変である.まぁ,西暦を使用すればいいだけの話ではあるが.....というわけで,今回はTeXの話,ではなくて,ブログのCodeBlockの長い行がwrapされるのは2行と間違うことがあるので,scrollbarをつけましょうという話である. Table of Contents Wrap or scroll? How to add horizontal scrollbar Ref academic theme version cssの変更 Wrap or scroll? 以前の記事でも触れたように(How to automatically embed R plot in blog created by Hugo via ox-hugo),このサイトは,ox-hugoというorg-modeのパッケージで書いて,Hugoという静的サイトジェネレーター(themeはacademic)で作っているのだが,code blockの長い行がwrapされて,つまり,折り畳まれて表示されるようになっていた.Rのcodeで示してみると,こんな感じである. これは3行のcodeであるが,はっきり言って見にくい..... 行番号を入れるという方法もあるが,それよりもscrollbarをつけて横にスライドさせる方が分かりやすい.つまり,こうである. boxplot(data_melt.df$Drug1 ~ data_melt.df$Day, xlab = "", main = "Drug1", xaxt="n", cex.axis=1.5, ylab="Relative value", cex.lab = 1.5, pch=16, cex = 1.5) axis(1,at=c(1,2,3),formatC(c("Control", "Day1", "Day7")), cex.axis=1.5) beeswarm(data_melt.df$Drug1 ~ data_melt.df$Day, pch = 16, ad = TRUE, cex=1.