[英]Inserting a PDF file in LaTeX
我正在嘗試在 LaTeX 文件中插入 PDF 或 doc 文件作為附錄。 你知道我怎么做嗎?
使用pdfpages
包。
\usepackage{pdfpages}
要在 PDF 文件中包含所有頁面:
\includepdf[pages=-]{myfile.pdf}
要僅包含 PDF 的第一頁:
\includepdf[pages={1}]{myfile.pdf}
在 shell 中運行texdoc pdfpages
以查看pdfpages
的完整手冊。
要將整個 pdf 放入您的文件中,而不僅僅是一頁,請使用:
\usepackage{pdfpages}
\includepdf[pages=-]{myfile.pdf}
\includegraphics{myfig.pdf}
我認為不會有自動方式。 您可能還想在附錄中正確添加頁碼。 假設您已經擁有多頁的 pdf 文檔,您必須首先使用 Adobe Acrobat Professional 提取 pdf 文檔的每一頁,並將它們中的每一個保存為單獨的 pdf 文件。 然后,您必須將每個 pdf 文檔作為圖像包含在每頁基礎上(每頁 1 個),並在每頁之間使用newpage ,例如,
\appendix
\section{Quiz 1}\label{sec:Quiz}
\begin{figure}[htp] \centering{
\includegraphics[scale=0.82]{quizz.pdf}}
\caption{Experiment 1}
\end{figure}
\newpage
\section{Sample paper}\label{sec:Sample}
\begin{figure}[htp] \centering{
\includegraphics[scale=0.75]{sampaper.pdf}}
\caption{Experiment 2}
\end{figure}
現在每頁將顯示每頁 1 個 pdf 圖像,您將在底部有一個正確的頁碼。 如我的示例所示,您必須對每個圖像的比例因子進行一些調整,以使其大小適合單個頁面。 希望有幫助...
有一個選項,沒有在 pdflatex 下工作的附加包
調整此代碼
\begin{figure}[h]
\centering
\includegraphics[width=\ScaleIfNeeded]{figuras/diagrama-spearman.pdf}
\caption{Schematical view of Spearman's theory.}
\end{figure}
“diagrama-spearman.pdf”是用 TikZ 生成的圖,這是代碼(它是另一個 .tex 文件,與我想在其中插入 pdf 的 .tex 文件不同)
\documentclass[border=3mm]{standalone}
\usepackage[applemac]{inputenc}
\usepackage[protrusion=true,expansion=true]{microtype}
\usepackage[bb=lucida,bbscaled=1,cal=boondoxo]{mathalfa}
\usepackage[stdmathitalics=true,math-style=iso,lucidasmallscale=true,romanfamily=bright]{lucimatx}
\usepackage{tikz}
\usetikzlibrary{intersections}
\newcommand{\at}{\makeatletter @\makeatother}
\begin{document}
\begin{tikzpicture}
\tikzset{venn circle/.style={draw,circle,minimum width=5cm,fill=#1,opacity=1}}
\node [venn circle = none, name path=A] (A) at (45:2cm) { };
\node [venn circle = none, name path=B] (B) at (135:2cm) { };
\node [venn circle = none, name path=C] (C) at (225:2cm) { };
\node [venn circle = none, name path=D] (D) at (315:2cm) { };
\node[above right] at (barycentric cs:A=1) {logical};
\node[above left] at (barycentric cs:B=1) {mechanical};
\node[below left] at (barycentric cs:C=1) {spatial};
\node[below right] at (barycentric cs:D=1) {arithmetical};
\node at (0,0) {G};
\end{tikzpicture}
\end{document}
這是我包含的圖表
聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.