最終更新:2015/10/12 19:13:59 JST
自分が作業する上での備忘録です.内容の正確さ,設定後の動作など諸々は,すべて自己責任でお願いします.
pLaTeXからLuaLaTeXへの引っ越しの際の作業メモです.
イメージとしては研究会やシンポジウムの予稿集.複数のPDFファイルをまとめて一続きのPDFファイルにするとともに,目次とランニングヘッドとページ数打ちをLuaLaTeXでpdfpagesを使って作るときのメモ.
\documentclass[aj4,10pt,twoside,report]{ltjsbook} \usepackage{luatexja-fontspec} \setmainjfont[BoldFont=HiraMinProN-W6]{HiraMinProN-W3} \setsansjfont[BoldFont=HiraKakuProN-W6]{HiraKakuProN-W3} \usepackage{luatexja-otf} \usepackage{layout} \usepackage[top=20truemm, bottom=15truemm, hmargin=15truemm, hcentering,truedimen]{geometry} \usepackage{amsmath} \usepackage{titlesec} \usepackage{ascmac} \usepackage{xcolor} \usepackage[margin=4\zw, font={small,sf},format=hang]{caption} \usepackage{metalogo} \usepackage{tocloft} \usepackage[unicode=true,bookmarks=true,bookmarksnumbered=true, linkbordercolor={1 1 1}, pdfborder={0 0 0}]{hyperref} \usepackage{pdfpages} \usepackage{fancyhdr} \pagestyle{fancy} \fancyhead[ol,er]{} % 引数1:題目,引数2:著者,引数3:所属,引数4:原稿PDFファイル \newcommand{\article}[4]{ \fancyhead[el]{#1}% 偶数ページ左に題目 \fancyhead[or]{#2}% 奇数ページ右に著者 \phantomsection \addcontentsline{toc}{section}{#1\\ #2(#3)}% 個々のタイトルなどは目次ではsection扱い \includepdf[pages=-, pagecommand={\thispagestyle{fancy}}]{#4} } \begin{document} \frontmatter \renewcommand{\cftdot}{} % 目次の各項目とページ数の間のドットを消す \tableofcontents \mainmatter \fancyhead[ol]{なんちゃらの会議予稿}% 奇数ページの左に全原稿とも会議名称表示 \phantomsection \cftaddtitleline{toc}{chapter}{2015年11月13日}{}% 目次にchapter扱いで年月日を表示 \article{ほげほげ0}{だれそれ0}{どこどこ0}{article00.pdf} %ランニングヘッドと目次に掲載する情報を変える場合は直接記述 \fancyhead[el]{ほげほげ1} \fancyhead[or]{だれそれ1} \phantomsection \addcontentsline{toc}{section}{ほげほげ1\\ だれそれ1(どこどこ1),だれそれ2(どこどこ2)} \includepdf[pages=-, pagecommand={\thispagestyle{fancy}}]{article01.pdf} \phantomsection \cftaddtitleline{toc}{section}{休憩}{}% 目次にページ数なしで項目を追加 \fancyhead[el]{ほげほげ2} \fancyhead[or]{だれそれ2} \phantomsection \addcontentsline{toc}{section}{ほげほげ2\\ だれそれ2(どこどこ2)} \includepdf[pages=-, pagecommand={\thispagestyle{fancy}}]{article02.pdf} \end{document}
[*]下へこのページのボトムへ▼ ▲[#]上へこのページのトップへ
最近は電子書籍の形で扱う方が楽なこともあり頻度は減ってきているが,印刷用小冊子を作るときの設定メモ.signatureに小冊子の単位(4の倍数,例えば32とか64)を指定すると,その単位での小冊子がうまく印刷できるように配置してくれる.両面2 in 1で印刷するので指定した単位を4で割ったものが印刷される紙の枚数.あまり景気よく大きくするとステープラで止めれないなど悲しい事態が発生する(経験済み).なお縦置き原稿の場合はlandscapeを指定.また全ページでなくて部分的に印刷の場合はpagesで印刷するページを指定.
\documentclass[a4paper]{article} \usepackage{pdfpages} \begin{document} \includepdf[pages=-, signature=16,landscape]{target.pdf} \end{document}
[*]下へこのページのボトムへ▼ ▲[#]上へこのページのトップへ
参考にさせていただいたサイトは順次追加(現在準備中).