ファイル名も1つのPDFに表示される複数のPDFからPDFを作成するには?

ファイル名も1つのPDFに表示される複数のPDFからPDFを作成するには?

Titlepageファイル(最小10個のPDF)がtitlepage_1.pdf、、、…であるディレクトリがありますtitlepage_2.pdftitlepage_3.pdf各コピーは1ページ分のPDFです。

人々がタイトルページを簡単にダウンロードできるように、目次もGithubでホストされています。 Github ディレクトリには対応する LaTeX ファイルも含まれています。

このファイルを使用して、ページあたり4つのPDFファイルを含むマージされたPDFファイルを作成したいと思います。そして、各ページのタイトルページにも元の名前があります。これにより、誰でも1つのPDFにあるすべてのコンテンツを比較してPDFを選択し、必要なタイトルページをダウンロードできます。

[これは使えるようですpdfuite。不可能な場合と組み合わせてのみpdfunite使用できます。LaTeX

ここに画像の説明を入力してください。

または

ここに画像の説明を入力してください。

編集する

ここに画像の説明を入力してください。

ベストアンサー1

順序はあなたの順序と一致しませんが、次のコマンドは指定されたページをLaTeXを使用してPDFに配置します。

\documentclass[twocolumn]{article}

\usepackage{graphicx}

\newcommand\putTitlepage[1]
  {%
    \bgroup
    \fboxsep=-\fboxrule
    \noindent
    \fbox{%
      \includegraphics[width=\columnwidth,height=.4\textheight,keepaspectratio]
        {#1}%
    }\\%
    \texttt{\detokenize{#1}}%
    \egroup
  }

\newcount\myTPcounter

\makeatletter
\newcommand\putTheTitlepages[1]
  {%
    \@for\cs:={#1}\do
      {%
        \expandafter\putTitlepage\expandafter{\cs}%
        \par
      }%
  }
\newcommand\putTitlepagesPattern[4]
  {%
    \myTPcounter=\numexpr#3-1\relax
    \loop\ifnum\myTPcounter<#4
      \advance\myTPcounter by 1
      \typeout{}%
      \typeout{Now processing file}%
      \typeout{\the\myTPcounter}%
      \typeout{}%
      \expandafter\putTitlepagesPattern@i\expandafter{\the\myTPcounter}{#1}{#2}%
      \par
    \repeat
  }
\newcommand\putTitlepagesPattern@i[3]
  {%
    \putTitlepage{#2#1#3}%
  }
\makeatother


\begin{document}
\centering
% if you need to specify their names because they don't match a pattern
\putTheTitlepages{titlepage-1.pdf,titlepage-2.pdf}

\putTitlepagesPattern{titlepage-}{.pdf}{3}{10}
\end{document}

ここに画像の説明を入力してください。

おすすめ記事