在信封上插入徽标

在信封上插入徽标

我正在使用envlab包裹制作信封,并想在回邮地址中插入徽标。我按照包裹文档说明操作,但没有看到任何结果。有什么线索可以说明应该怎么做吗?

答案1

如果您想更好地控制信封,可以使用以下步骤。

Geometry 创建一个信封大小的页面,其文本区域是可打印区域(或多或少)。Flowfram 为相对于文本区域左下角的地址创建字段。每页上的回信地址都相同。

\documentclass[landscape]{article}
\usepackage[paperwidth=9.5in,paperheight=4.125in,margin=0.5in]{geometry}
\usepackage{flowfram}
\usepackage{graphicx}

\parindent=0pt
\pagestyle{empty}
% logo (align centers)
\newsavebox{\logo}
\savebox{\logo}{\raisebox{-0.5\height}{\includegraphics[scale=0.15]{example-image}}}
% create address fields
\newflowframe{2.5in}{1in}{0.5\textwidth}{\dimexpr 0.5\textheight-1in}
\newstaticframe{2.5in}{1in}{0pt}{\dimexpr \textheight-1in}[return]
\begin{staticcontents*}{return}
\usebox{\logo}\hspace{\fboxsep}%
\raisebox{\dimexpr 0.5\depth-0.5\height}% geometric center
  {\begin{minipage}{\dimexpr 2.5in-\fboxsep-\wd\logo}
Name\\
Street\\
City, State Zip
\end{minipage}}\vfill\null
\end{staticcontents*}
% start addresses
\begin{document}
\rule{2.5in}{1in}\newpage
To Name\\
To Street\\
To City, State Zip
\end{document}

答案2

这是一个简单的 TikZ 解决方案。请注意,您必须对此进行两次 TeX 处理才能正确放置文本和徽标。TikZ 将有关.aux页面元素位置的信息写入 - 第二次 TeX 运行允许使用该信息。

\documentclass{article}

%% Adjust the size of the envelope here
\usepackage[papersize={9.5in,4.25in},margin=0pt]{geometry}
\usepackage{tikz}
\usetikzlibrary{calc}
\usepackage{graphicx}
\usepackage{xparse}

%% No logo
%% \mkenv[<other return address>]{Address\\to\\whom\\sent}
\NewDocumentCommand{\mkenv}{+O{Default\\address\\here} +m}{%
    \newpage
    \tikz[remember picture,overlay]\node[below right,text width=3in,align=flush left] at 
        (current page.center) {#2};
        %% Change the (0.25in,-0.25in) to adjust position of return address
    \tikz[remember picture,overlay]\node[below right,text width=3in,align=flush left] at 
        ($(current page.north west)+(0.25in,-0.25in)$) {#1};
}

%% With logo
%% \mkenvL[<optional\\return\\address>]{<To\\whom\\sent}[<optional graphic>]
\NewDocumentCommand{\mkenvL} {+O{Default\\Return\\Address} +m 
        +O{\includegraphics[scale=0.15]{example-image}}}{% Default graphic
    \newpage
    \begin{tikzpicture}[remember picture,overlay]
        \node[below right,text width=3in,align=flush left] at 
            (current page.center) {#2};
        %% Change the (0.25in,-0.25in) to adjust position of return address
        \node[below right] (A) at ($(current page.north west)+(0.25in,-0.25in)$) {#3};
        \node[anchor=west,text width=3in,align=flush left] at (A.east) {#1};    I'm 
    \end{tikzpicture}
}

\begin{document}

\mkenv{First line\\Second line\\Third line}

\mkenv[x1\\x2\\x3]{First line\\Second line\\Third line}

\mkenvL{First line\\Second line\\Third line}%[<Non-default graphic here>]

\end{document}

相关内容