Notebook

これは日々の作業を通して学んだことや毎日の生活で気づいたことをを記録しておく備忘録である。

HTML ファイル生成日時: 2025/07/30 08:17:51.269 (台灣標準時)

LaTeX で作るに QR code を埋め込む方法

これまで、 LaTeX で作る文書に QR code を貼り付けるときには、 Python の qrcode モジュールで画像を生成し、それを graphicx を使って取り込んでい たでござる。今日、 LaTeX の qrcode package を使えば、いちいち画像を生成しなくても、 LaTeX 文書 内に QR code を貼り付けられると知ったでござる。以下のようにすればよい ようでござる。


\documentclass[a4paper]{article}

%
% Time-stamp: <2025/01/08 21:28:02 (UT+8) daisuke>
%

\usepackage{qrcode}
\usepackage{graphicx}

\begin{document}

\begin{center}
 \scalebox{5.0}{\qrcode{https://github.com/kinoshitadaisuke}}
\end{center}

\end{document}

以下のような PDF ファイルが生成されるでござる。

fig_202501/pdf_qrcode_00.png

pkgsrc では、以下のようにすれば、 tex-qrcode がインストールされるでご ざる。


# cd /usr/pkgsrc/graphics/tex-qrcode
# make install
# make clean



Frequently accessed files

  1. Misc___Taiwan/20240819_00.html
  2. Computer___TeX/20231107_00.html
  3. Computer___NetBSD/20250301_01.html
  4. Computer___NetBSD/20250728_00.html
  5. Misc___Taiwan/20240207_00.html
  6. Computer___Hardware/20250319_00.html
  7. Misc___Taiwan/20220831_4.html
  8. Computer___TeX/20240410_00.html
  9. Computer___Network/20230516_00.html
  10. Food___Taiwan/20230608_04.html
  11. Misc___Taiwan/20250728_01.html
  12. Computer___NetBSD/20240805_03.html
  13. Food___Taiwan/20220605_4.html
  14. Food___Taiwan/20230609_06.html
  15. Computer___NetBSD/20250409_00.html
  16. Computer___Python/20240101_00.html
  17. Food___Taiwan/20220811_9.html
  18. Computer___NetBSD/20230119_00.html
  19. Food___Taiwan/20230604_00.html
  20. Food___Cooking/20230625_03.html
  21. Travel___Taiwan/20230525_09.html
  22. Computer___FreeBSD/20240123_00.html
  23. Food___Cooking/20220821_5.html
  24. Food___Taiwan/20210216_1.html
  25. Food___Taiwan/20230622_10.html
  26. Misc___Taiwan/20240903_01.html
  27. Computer___TeX/20230726_01.html
  28. Computer___NetBSD/20241102_00.html
  29. Computer___NetBSD/20220729_0.html
  30. Food___Taiwan/20230725_24.html


HTML file generated by Kinoshita Daisuke.