ページの左下に画像を挿入する方法

ページの左下に画像を挿入する方法

ページの右下隅に画像を挿入するドキュメントがあります。 minpage 環境を作成してそれを実行しようと考えました。 しかし、この画像を目的の場所に挿入する方法が見つかりません。 どうすればいいですか?

\documentclass[14pt]{extarticle}
\usepackage{fontspec}
\setmainfont{industry-blackitalic}
\usepackage{lipsum}
\usepackage{mwe}
\usepackage{textpos}
\usepackage{graphics}
\pagenumbering{gobble}

\begin{document}
    \lipsum [1-1]\\

\newpage %------ II pagina ------------

    \lipsum [1-1]\\

\newpage %-------- III pagina ------------

    \lipsum [1-1]\\

\newpage %--------IV pagina --------------

    \lipsum[1-1]
\end{document}

ありがとう

レナート

答え1

まだ、何が欲しいのかよく分かりません。ただし、1 ページの 4 隅に画像を印刷する方法の例を次に示しますtextpos(例では最初のページ)。

\documentclass[14pt]{extarticle}
\usepackage{fontspec}
%\setmainfont{industry-blackitalic}% Removed, because not essential for the problem.
%\usepackage{lipsum}% Removed, because also loaded by mwe
\usepackage{mwe}
\usepackage[absolute]{textpos}
\usepackage{graphics}
\pagenumbering{gobble}

\begin{document}
\begin{textblock*}{\paperwidth}(0mm,0mm)% Upper
  \raggedright% left edge of page
  \includegraphics[page=1,width=4cm]{example-image-a4-numbered}
\end{textblock*}
\begin{textblock*}{\paperwidth}(0mm,0mm)% Upper
  \raggedleft% right edge of page
  \includegraphics[page=2,width=4cm]{example-image-a4-numbered}
\end{textblock*}
\begin{textblock*}{\paperwidth}(0mm,\paperheight)% Lower
  \raggedright% left edge of page
  \raisebox{0pt}[0pt][0pt]{\includegraphics[page=3,width=4cm]{example-image-a4-numbered}}
\end{textblock*}
\begin{textblock*}{\paperwidth}(0mm,\paperheight)% Lower
  \raggedleft% right edge of page
  \raisebox{0pt}[0pt][0pt]{\includegraphics[page=4,width=4cm]{example-image-a4-numbered}}
\end{textblock*}

    \lipsum [1-1]%\\% You should never use \\ at the end of a paragraph!

\newpage %------ II pagina ------------

    \lipsum [1-1]%\\% You should never use \\ at the end of a paragraph!

\newpage %-------- III pagina ------------

    \lipsum [1-1]%\\% You should never use \\ at the end of a paragraph!

\newpage %--------IV pagina --------------

    \lipsum[1-1]

\end{document}

紙の角にある4つの画像

代わりにテキスト領域の隅に画像を配置したい場合は、オプションを削除してabsolute\paperwidth\textwidthを置き換え\paperheightます\textheight

すべてのページに画像を表示したい場合は、次のようにするとeso-pic簡単です:

\documentclass[14pt]{extarticle}
\usepackage{fontspec}
%\setmainfont{industry-blackitalic}% Removed, because not essential for the problem.
%\usepackage{lipsum}% Removed, because also loaded by mwe
\usepackage{mwe}
\usepackage{eso-pic}
\usepackage{adjustbox}
\usepackage{graphics}
\pagenumbering{gobble}

\AddToShipoutPictureBG{% put the images in the background of every page
  \AtPageUpperLeft{% upper left corner of the page
    \adjincludegraphics[page=1,width=4cm,valign=T]{example-image-a4-numbered}%
  }%
  \AtPageUpperLeft{% upper
    \makebox[\paperwidth][r]{% right corner of the page
      \adjincludegraphics[page=2,width=4cm,valign=T]{example-image-a4-numbered}%
    }%
  }%
  \AtPageLowerLeft{% lower left corner of the page
    \includegraphics[page=3,width=4cm]{example-image-a4-numbered}%
  }%
  \AtPageLowerLeft{% lower
    \makebox[\paperwidth][r]{% right corner of the page
      \includegraphics[page=3,width=4cm]{example-image-a4-numbered}%
    }%
  }%
}
\begin{document}

    \lipsum [1-1]%\\% You should never use \\ at the end of a paragraph!

\newpage %------ II pagina ------------

    \lipsum [1-1]%\\% You should never use \\ at the end of a paragraph!

\newpage %-------- III pagina ------------

    \lipsum [1-1]%\\% You should never use \\ at the end of a paragraph!

\newpage %--------IV pagina --------------

    \lipsum[1-1]
\end{document}

eso-picまたはフックを使用してページの隅々に画像を追加する

もう一度、これらの例を適応させて、画像を紙ではなくテキスト領域の端に配置することができます。そのためには、もう一度 を\paperwidthに置き換え、 もに置き換え、もに\textwidth置き換えます。\AtPageUpperLeft\AtTextUpperLeft\AtPageLowerLeft\AtTextLowerLeft

この提案は、 star-variant を使用して 1 ページにのみ画像を追加する場合にも使用できます\AddToShipoutPictureBG*

最新のLaTeXでは、出荷フック:

\documentclass[14pt]{extarticle}
\usepackage{fontspec}
%\setmainfont{industry-blackitalic}% Removed, because not essential for the problem.
%\usepackage{lipsum}% Removed, because also loaded by mwe
\usepackage{mwe}
\usepackage{adjustbox}
\usepackage{graphics}
\pagenumbering{gobble}

\AddToHook{shipout/background}{% Put the images in the background of every page
  \put(0,0){% upper left corner
    \adjincludegraphics[page=1,width=4cm,valign=T]{example-image-a4-numbered}%
  }%
  \put(0,0){% upper
    \makebox[\paperwidth][r]{% right corner
      \adjincludegraphics[page=2,width=4cm,valign=T]{example-image-a4-numbered}%
    }%
  }%
  \put(0,-\pageheight){% lower left corner
    \includegraphics[page=3,width=4cm]{example-image-a4-numbered}%
  }%
  \put(0,-\pageheight){% lower
    \makebox[\paperwidth][r]{% right corner
      \includegraphics[page=4,width=4cm]{example-image-a4-numbered}%
    }%
  }%
}
\begin{document}

    \lipsum [1-1]%\\% You should never use \\ at the end of a paragraph!

\newpage %------ II pagina ------------

    \lipsum [1-1]%\\% You should never use \\ at the end of a paragraph!

\newpage %-------- III pagina ------------

    \lipsum [1-1]%\\% You should never use \\ at the end of a paragraph!

\newpage %--------IV pagina --------------

    \lipsum[1-1]
\end{document}

詳しい情報については、使用するパッケージのマニュアルを参照してください。汎用フックマニュアルフックの使用に関する情報。


注: ドキュメントの個々のページまたはすべてのページで画像やその他の資料を固定位置に配置する方法は他にも多数あります。ここで紹介したものはおそらく最もシンプルで、最も一般的に使用されているものです。ティックZユーザーは、この答えすでにコメントとしてリンクされている質問かなり型破りなソリューションの例として、パッケージの使用をscrlayer-scrpage次に示します。

\documentclass[14pt]{extarticle}
\usepackage{fontspec}
%\setmainfont{industry-blackitalic}% Removed, because not essential for the problem.
%\usepackage{lipsum}% Removed, because also loaded by mwe
\usepackage{mwe}
\usepackage{adjustbox}
\usepackage{graphics}
\pagenumbering{gobble}
\usepackage{scrlayer-scrpage}
\pagestyle{plain}

\DeclareNewLayer[%
  background,%
  mode=picture,%
  page,
  contents={%
    \put(0,\paperheight){%
      \adjincludegraphics[page=1,width=4cm,valign=T]{example-image-a4-numbered}%
    }%
    \put(\paperwidth,\paperheight){%
      \makebox[0pt][r]{%
        \adjincludegraphics[page=2,width=4cm,valign=T]{example-image-a4-numbered}%
      }%
    }%
    \put(0,0){%
      \includegraphics[page=3,width=4cm]{example-image-a4-numbered}%
    }%
    \put(\paperwidth,0){%
      \makebox[0pt][r]{%
        \includegraphics[page=4,width=4cm]{example-image-a4-numbered}%
      }%
    }%
  }%
]
{cornerimages}
\AddLayersToPageStyle{plain.scrheadings}{cornerimages}

\begin{document}

    \lipsum [1-1]%\\% You should never use \\ at the end of a paragraph!

\newpage %------ II pagina ------------

    \lipsum [1-1]%\\% You should never use \\ at the end of a paragraph!

\newpage %-------- III pagina ------------

    \lipsum [1-1]%\\% You should never use \\ at the end of a paragraph!

\newpage %--------IV pagina --------------

    \lipsum[1-1]
\end{document}

この提案の優れた機能は、新しく宣言されたレイヤーを、必要なすべてのページのすべてのページ スタイルに追加したり、ページ スタイルから削除したりできることです。このレイヤーの有無にかかわらず、新しいページ スタイルを宣言することもできます。したがって、\pagenumbering{gobble}画像のみのページを作成する必要はありません。

\documentclass[14pt]{extarticle}
\usepackage{fontspec}
%\setmainfont{industry-blackitalic}% Removed, because not essential for the problem.
%\usepackage{lipsum}% Removed, because also loaded by mwe
\usepackage{mwe}
\usepackage{adjustbox}
\usepackage{graphics}
\usepackage{scrlayer-scrpage}

\DeclareNewLayer[%
  background,%
  mode=picture,%
  page,
  contents={%
    \put(0,\paperheight){%
      \adjincludegraphics[page=1,width=4cm,valign=T]{example-image-a4-numbered}%
    }%
    \put(\paperwidth,\paperheight){%
      \makebox[0pt][r]{%
        \adjincludegraphics[page=2,width=4cm,valign=T]{example-image-a4-numbered}%
      }%
    }%
    \put(0,0){%
      \includegraphics[page=3,width=4cm]{example-image-a4-numbered}%
    }%
    \put(\paperwidth,0){%
      \makebox[0pt][r]{%
        \includegraphics[page=4,width=4cm]{example-image-a4-numbered}%
      }%
    }%
  }%
]
{cornerimages}
\DeclareNewPageStyleByLayers{imagepagestyle}{cornerimages}
\pagestyle{imagepagestyle}

\begin{document}

\pagestyle{empty}

\lipsum[1-3]

\thispagestyle{imagepagestyle}% Use the images only on this page

\lipsum[4-10]

\pagestyle{imagepagestyle}% And from this page.

\lipsum

\end{document}

答え2

あなたの質問は非常にわかりにくいですが (期待する出力の例を少なくとも 1 つと、問題を再現するための最小限のコード例を示す必要があります)、何をしたいのかを「推測」してみます。

\documentclass[12pt]{article}
\usepackage[utf8]{inputenc}
\usepackage{graphicx}

\begin{document}

% Your document content here

\vfill % push the minipage to the bottom of the page
\noindent % prevent indentation
\begin{minipage}[b]{\linewidth}
    \raggedleft % right-align the content of the minipage
    \includegraphics[width=0.3\linewidth]{example-image} % replace 'example-image' with your image file name
\end{minipage}

\end{document}

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

関連情報