Skip to content

Instantly share code, notes, and snippets.

@pasberth
Last active August 29, 2015 14:00
Show Gist options
  • Select an option

  • Save pasberth/11444456 to your computer and use it in GitHub Desktop.

Select an option

Save pasberth/11444456 to your computer and use it in GitHub Desktop.

To build

platex a.tex
platex a.tex
dvipdfmx a
Display the source blob
Display the rendered blob
Raw
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
\documentclass{tbook}
\usepackage{graphicx}
\usepackage[dvipdfmx]{hyperref}
\AtBeginDvi{\special{papersize=105mm,148mm}}
\renewcommand{\baselinestretch}{0.9}
\setlength{\textwidth}{120mm}
\setlength{\textheight}{90mm}
\setlength{\topmargin}{-20mm}
\setlength{\oddsidemargin}{-17.5mm}
\setlength{\evensidemargin}{-17.5mm}
\newcommand{\ruby}[2]{%
\leavevmode
\setbox0=\hbox{#1}%
\setbox1=\hbox{\tiny #2}%
\ifdim\wd0>\wd1 \dimen0=\wd0 \else \dimen0=\wd1 \fi
\hbox{%
\kanjiskip=0pt plus 2fil
\xkanjiskip=0pt plus 2fil
\vbox{%
\hbox to \dimen0{%
\tiny \hfil#2\hfil}%
\nointerlineskip
\hbox to \dimen0{\mathstrut\hfil#1\hfil}}}}
\begin{document}
\title{\LaTeX で小説を書きたい……\LaTeX で小説を書きたくない?}
\author{Pasberth}
\date{\today}
\maketitle
\tableofcontents
TeXで小説を書くのかなり良い選択肢っぽいです。
\href{http://uk.various-colors.net/friday/index.php?TeX%A4%C7%BE%AE%C0%E2%A4%F2%BD%F1%A4%B3%A4%A6}{参考リンク}。
たとえばこんな感じ \raisebox{-0.2zh}{\scalebox{1}[0.8]{!}}\kern-1zw\hbox{\raisebox{0.2zh}{\scalebox{1}[0.8]{?}}}
のテキスト入力できたり (Word でもできるかもしれない)。
\ruby{振仮名}{ルビ}もちゃんとできます。\ruby{漢字}{かんじ}。いろいろ試したら余白も良い感じにできるっぽい。
\end{document}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment