如何打印流程图书?

如何打印流程图书?

我准备了一个小册子,其中的颜色到达了实体纸张的边界(称为流血正在印刷)。

我还必须设置裁切标记。

但是如果任何彩色物体与页面边界接触 — — 那么它必须延伸到边界之外,以补偿裁剪过程中可能出现的偏差。

以下是我所拥有的:

在此处输入图片描述

以下是我想要得到的:

在此处输入图片描述

问题是crop包裹除了农作物痕迹之外不会留下任何东西。

MWE(XeLaTeX):

\documentclass[a5paper,twoside,openany]{book}


% =======
%% xetex:

\usepackage{fontspec}
\defaultfontfeatures{Scale=MatchLowercase,Mapping=tex-text}

\setmainfont{Linux Libertine O}
\setsansfont{Linux Biolinum O}
\setmonofont{DejaVu Sans Mono}


% ==========
%% packages:

\usepackage{lipsum}

\usepackage[xetex,margin=1.4cm,top=2.5cm,bottom=1.5cm]{geometry}

\usepackage{xcolor}
\definecolor{Small}{HTML}{99D277}
\definecolor{Large}{HTML}{9FC9E0}
\definecolor{Pages}{HTML}{FFB341}
\definecolor{CAM}{RGB}{1,1,1}

\usepackage[cam,a4,center,color=CAM]{crop}

\usepackage[colorlinks,
            linkcolor=black,
            urlcolor=black,
            plainpages=false,
            pdfpagelabels=true,
            ]{hyperref}
\usepackage{fancybox}
\usepackage{flowfram}

\newdynamicframe{\textwidth}{3\baselineskip}{0pt}{\textheight}[Header]


% ========
%% thumbs:

\makethumbtabs{3.7cm}

\setthumbtab{1}{backcolor=Pages}
\setthumbtab{2}{backcolor=Pages}
\setthumbtab{3}{backcolor=Pages}

\newcommand{\thumbtabstyle}[1]{\textsc{\sffamily \normalsize \normalfont #1}}
\setthumbtab{all}{style=thumbtabstyle,textcolor=white}


% ========
%% footer:

\pagestyle{plain}

\makedfheaderfooter

\newlength{\xoffset}
\computerightedgeodd{\xoffset}
\addtolength{\xoffset}{-1.2cm}
\newlength{\yoffset}
\computebottomedge{\yoffset}

\newcommand{\footstyle}[1]{\bfseries\Large #1}

\setdynamicframe*{footer}{oddx=\xoffset,y=\yoffset,width=1.2cm,height=1.2cm,backcolor=Small,textcolor=white,style=footstyle,pages=none}

\computeleftedgeeven{\xoffset}
\setdynamicframe*{footer}{evenx=\xoffset}

\dfchaphead*{header}


% =========
%% stripes:

\newlength{\leftwidth}
\newlength{\rightwidth}

\computeleftedgeodd{\leftwidth}
\setlength{\leftwidth}{-\leftwidth}
\addtolength{\leftwidth}{0.2\textwidth}
\setlength{\rightwidth}{\paperwidth}
\addtolength{\rightwidth}{-\leftwidth}

\vtwotone[1]{\leftwidth}{Small}{backleft}{\rightwidth}{Large}{backright}

\vtwotone[none]{\rightwidth}{Large}{lastbackright}{\leftwidth}{Small}{lastbackleft}

\vtwotonetop[odd]{0.5cm}{\leftwidth}{Small}{oddtopleft}{\rightwidth}{Large}{oddtopright}
\vtwotonetop[even]{0.5cm}{\rightwidth}{Large}{eventopleft}{\leftwidth}{Small}{eventopright}


% ================
%% customizations:

% to prevent vertical justification when inserting picture without floats:
\raggedbottom

% tables:
\usepackage{tabularx}


% ============
%% title page:

\begin{document}

\noindent
\begin{tabularx}{\textwidth}{p{0.19\textwidth}X}

  &

  \color{white}

  \vspace{2cm}

  International Symposium

  \vspace{1cm}

  {\LARGE
  {\bf \textsc{Frontiers}}

  {\bf \textsc{In Electronic Structure Theory}}

  {\bf \textsc{And Multi Scale Modeling}}
  }

  \vspace{1cm}

  \hfill\textit{book of abstracts}

  \vspace{\baselineskip}

  \vspace{6.7cm}

  {21–22 October, 2013}

\end{tabularx}

\clearpage
\setstaticframe*{backleft}{pages=none}
\setstaticframe*{backright}{pages=none}


% =============
%% second page:

\noindent
\lipsum[1]

\frontmatter

\setdynamicframe*{footer}{pages=all}
\setdynamicframe*{header}{pages=all}


\mainmatter
\chapter{Program}
\enablethumbtabs
\pagenumbering{arabic}

\lipsum[2-9]



\cleardoublepage
\chapter{Abstracts}

\lipsum[10-18]


% ============
%% back cover:

\cleardoublepage
\finishthispage\mbox{}
\disablethumbtabs
\setdynamicframe*{footer}{pages=none}
\setstaticframe*{lastbackleft,lastbackright}{pages=even}

\end{document}

pdf 输出

一种可能的解决方案是将裁剪标记添加为水印,或添加为 tikz 图片。那么问题就是将其添加到每个页面上。但我认为对crop包进行调整会更容易操作和使用。

答案1

快捷便利命令,例如\vtwotone从页面边框开始创建框架。如果您希望它们出血,则必须使用定义框架\newstaticframe并考虑出血。我不喜欢在答案中使用内部命令,但我在任何地方都找不到crop文档如何访问出血尺寸,所以我不得不使用\CROP@overlap。MWE:

\documentclass[a5paper,twoside,openany]{book}

\usepackage{lipsum}

\usepackage{etoolbox}
\usepackage{calc}
\usepackage[margin=1.4cm,top=2.5cm,bottom=1.5cm]{geometry}

\usepackage{xcolor}
\definecolor{Small}{HTML}{99D277}
\definecolor{Large}{HTML}{9FC9E0}
\definecolor{Pages}{HTML}{FFB341}
\definecolor{CAM}{RGB}{1,1,1}

\usepackage{flowfram}

\usepackage[cam,a4,center,color=CAM]{crop}

\newlength\bleed
\setlength{\bleed}{\csuse{CROP@overlap}}

\newlength{\leftwidth}
\newlength{\rightwidth}

\newlength\oddbleedoriginX
\newlength\evenbleedoriginX
\newlength\bleedoriginY

\computeleftedgeodd{\leftwidth}
\computeleftedgeeven{\evenbleedoriginX}
\computebottomedge{\bleedoriginY}

\setlength{\oddbleedoriginX}{\leftwidth-\bleed}
\addtolength{\evenbleedoriginX}{-\bleed}
\addtolength{\bleedoriginY}{-\bleed}

\setlength{\leftwidth}{-\leftwidth}
\addtolength{\leftwidth}{0.2\textwidth}
\setlength{\rightwidth}{\paperwidth}
\addtolength{\rightwidth}{-\leftwidth}

\addtolength{\leftwidth}{\bleed}
\addtolength{\rightwidth}{\bleed}

\newlength\paperandbleedheight
\setlength{\paperandbleedheight}{\paperheight+2\bleed}

\newstaticframe[1]% page list
 {\leftwidth}{\paperandbleedheight}% dimensions
 {\oddbleedoriginX}{\bleedoriginY}% location
 [backleft]% label
\setstaticframe*{backleft}{backcolor=Small}

\newlength\xshift
\setlength{\xshift}{\oddbleedoriginX+\leftwidth}

\newstaticframe[1]% page list
 {\rightwidth}{\paperandbleedheight}% dimensions
 {\xshift}{\bleedoriginY}% location
 [backright]% label
\setstaticframe*{backright}{backcolor=Large}

\newlength\stripheight
\setlength{\stripheight}{0.5cm+\bleed}

\newlength\yshift
\setlength{\yshift}{\bleedoriginY+\paperheight-\stripheight+2\bleed}

\newstaticframe[odd]% page list
 {\leftwidth}{\stripheight}% dimensions
 {\oddbleedoriginX}{\yshift}% location
 [oddtopleft]% label
\setstaticframe*{oddtopleft}{backcolor=Small}

\newstaticframe[odd]% page list
 {\rightwidth}{\stripheight}% dimensions
 {\xshift}{\yshift}% location
 [oddtopright]% label
\setstaticframe*{oddtopright}{backcolor=Large}

\setlength{\xshift}{\evenbleedoriginX+\rightwidth}

\newstaticframe[even]% page list
 {\rightwidth}{\stripheight}% dimensions
 {\evenbleedoriginX}{\yshift}% location
 [eventopleft]% label
\setstaticframe*{eventopleft}{backcolor=Large}

\newstaticframe[even]% page list
 {\leftwidth}{\stripheight}% dimensions
 {\xshift}{\yshift}% location
 [eventopright]% label
\setstaticframe*{eventopright}{backcolor=Small}

\onecolumn

\begin{document}

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

这将产生以下内容:

第 1 页:

第 1 页图片

第2页:

第 2 页图片

第 3 页:

第 3 页图片

答案2

根据尼古拉回答我添加了标签出血、标签文本旋转、页码以及封底:

\documentclass[a5paper,twoside,openany]{book}

% =======
%% LaTeX:

% penalty for breaking inline math:
\relpenalty=9999
\binoppenalty=9999

% penalty for a hanging line:
\sloppy
\widowpenalty=10000
\clubpenalty=10000

% to prevent vertical justification when inserting picture without floats:
\raggedbottom


% ==========
%% flowfram:

\usepackage{lipsum}

\usepackage{etoolbox}
\usepackage{calc}
\usepackage[margin=1.4cm,top=2.5cm,bottom=1.5cm]{geometry}

\usepackage{xcolor}
\definecolor{Small}{HTML}{99D277}
\definecolor{Large}{HTML}{9FC9E0}
\definecolor{Pages}{HTML}{FFB341}
\definecolor{CAM}{RGB}{1,1,1}

\usepackage{flowfram}



% =========
%% stripes:

\newlength\bleed
% bleed:
\usepackage[cam,a4,center,color=CAM]{crop}
\setlength{\bleed}{\csuse{CROP@overlap}}
% no bleed:
% \setlength{\bleed}{0cm}

\newlength{\leftwidth}
\newlength{\rightwidth}

\newlength\oddbleedoriginX
\newlength\evenbleedoriginX
\newlength\bleedoriginY

\computeleftedgeodd{\leftwidth}
\computeleftedgeeven{\evenbleedoriginX}
\computebottomedge{\bleedoriginY}

\setlength{\oddbleedoriginX}{\leftwidth-\bleed}
\addtolength{\evenbleedoriginX}{-\bleed}
\addtolength{\bleedoriginY}{-\bleed}

\setlength{\leftwidth}{-\leftwidth}
\addtolength{\leftwidth}{0.2\textwidth}
\setlength{\rightwidth}{\paperwidth}
\addtolength{\rightwidth}{-\leftwidth}

\addtolength{\leftwidth}{\bleed}
\addtolength{\rightwidth}{\bleed}

\newlength\paperandbleedheight
\setlength{\paperandbleedheight}{\paperheight+2\bleed}


% ============
%% First page:

\newstaticframe[999]% page list
 {\leftwidth}{\paperandbleedheight}% dimensions
 {\oddbleedoriginX}{\bleedoriginY}% location
 [backleft]% label
\setstaticframe*{backleft}{backcolor=Small}

\newlength\xshift
\setlength{\xshift}{\oddbleedoriginX+\leftwidth}

\newstaticframe[999]% page list
 {\rightwidth}{\paperandbleedheight}% dimensions
 {\xshift}{\bleedoriginY}% location
 [backright]% label
\setstaticframe*{backright}{backcolor=Large}


% ===========
%% Last page:

\newstaticframe[1000]% page list
 {\rightwidth}{\paperandbleedheight}% dimensions
 {\evenbleedoriginX}{\bleedoriginY}% location
 [lastbackleft]% label
\setstaticframe*{lastbackleft}{backcolor=Large}

\newstaticframe[1000]% page list
 {\leftwidth}{\paperandbleedheight}% dimensions
 {\evenbleedoriginX+\rightwidth}{\bleedoriginY}% location
[lastbackright]% label
\setstaticframe*{lastbackright}{backcolor=Small}


% =========
%% Stripes:

\newlength\stripheight
\setlength{\stripheight}{0.5cm+\bleed}

\newlength\yshift
\setlength{\yshift}{\bleedoriginY+\paperheight-\stripheight+2\bleed}

\newstaticframe[odd]% page list
 {\leftwidth}{\stripheight}% dimensions
 {\oddbleedoriginX}{\yshift}% location
 [oddtopleft]% label
\setstaticframe*{oddtopleft}{backcolor=Small}

\newstaticframe[odd]% page list
 {\rightwidth}{\stripheight}% dimensions
 {\xshift}{\yshift}% location
 [oddtopright]% label
\setstaticframe*{oddtopright}{backcolor=Large}

\setlength{\xshift}{\evenbleedoriginX+\rightwidth}

\newstaticframe[even]% page list
 {\rightwidth}{\stripheight}% dimensions
 {\evenbleedoriginX}{\yshift}% location
 [eventopleft]% label
\setstaticframe*{eventopleft}{backcolor=Large}

\newstaticframe[even]% page list
 {\leftwidth}{\stripheight}% dimensions
 {\xshift}{\yshift}% location
 [eventopright]% label
\setstaticframe*{eventopright}{backcolor=Small}

\onecolumn


% ==========
%% Packages:

\usepackage{graphicx}
\usepackage{changepage}
\strictpagecheck


% ========
%% Thumbs:

\makeatletter

\renewcommand{\@@dothumbtabs}[2]{%
  \setlength{\@ff@tmp@y}{\textheight}%
  \addtolength{\@ff@tmp@y}{-#2}%
  \addtolength{\@ff@tmp@y}{-#1}%
  \computerightedgeodd{\@ff@tmp@x}%
  \addtolength{\@ff@tmp@x}{-\thumbtabwidth+\bleed}%
  \computeleftedgeeven{\@ff@tmp@x@even}%
   \addtolength{\@ff@tmp@x@even}{-\bleed}%
  \@ff@tmpN=0\relax
  \whiledo{\@ff@tmpN<\c@maxthumbtabs}%
  {%
    \advance\@ff@tmpN by 1\relax
    \@greyscale=\@ff@tmpN\relax
    \multiply\@greyscale by 60\relax
    \divide\@greyscale by \c@maxthumbtabs
    \advance\@greyscale by 25\relax
    \edef\@ff@greyscale{0.\number\@greyscale}%
    \newdynamicframe[none]{\thumbtabwidth}{#2}%
      {\@ff@tmp@x}{\@ff@tmp@y}[thumbtab\number\@ff@tmpN]%
    \expandafter\global\expandafter
      \setlength\csname @df@\romannumeral\c@maxdynamic @evenx\endcsname
        {\@ff@tmp@x@even}%
    \ifthenelse{\boolean{@ttb@title}\and\boolean{@ttb@num}}%
    {%
      \expandafter
        \xdef\csname @dynamicframe@\romannumeral\c@maxdynamic\endcsname{%
          \noexpand\thumbtabformat
          {%
            \csname thumbtab@num@\romannumeral\@ff@tmpN\endcsname\
            \csname thumbtab@title@\romannumeral\@ff@tmpN\endcsname
          }%
          {#2}%
        }%
    }%
    {%
      \if@ttb@title
        \expandafter
          \xdef\csname @dynamicframe@\romannumeral\c@maxdynamic\endcsname{%
            \noexpand\thumbtabformat
            {%
              \csname thumbtab@title@\romannumeral\@ff@tmpN\endcsname
            }%
            {#2}%
          }%
      \fi
      \if@ttb@num
        \expandafter
          \xdef\csname @dynamicframe@\romannumeral\c@maxdynamic\endcsname{%
            \noexpand\thumbtabformat
            {%
              \csname thumbtab@num@\romannumeral\@ff@tmpN\endcsname
            }%
            {#2}%
          }%
    \fi
    }%
    \expandafter
      \xdef\csname @df@backcol@\romannumeral\c@maxdynamic\endcsname
        {[gray]{\@ff@greyscale}}
    \newdynamicframe[none]{\thumbtabwidth}{#2}%
      {\@ff@tmp@x}{\@ff@tmp@y}[thumbtabindex\number\@ff@tmpN]%
    \expandafter\global\expandafter
      \setlength\csname @df@\romannumeral\c@maxdynamic @evenx\endcsname
        {\@ff@tmp@x@even}%
    \expandafter
    \ifthenelse{\boolean{@ttb@title}\and\boolean{@ttb@num}}%
    {%
      \expandafter
        \xdef\csname @dynamicframe@\romannumeral\c@maxdynamic\endcsname{%
          \noexpand\thumbtabindexformat
          {%
            \csname thumbtab@link@\romannumeral\@ff@tmpN\endcsname
          }%
          {%
            \csname thumbtab@num@\romannumeral\@ff@tmpN\endcsname\
            \csname thumbtab@title@\romannumeral\@ff@tmpN\endcsname
          }%
          {#2}%
        }%
    }%
    {%
      \if@ttb@title
        \expandafter
        \xdef\csname @dynamicframe@\romannumeral\c@maxdynamic\endcsname{%
          \noexpand\thumbtabindexformat
          {%
            \csname thumbtab@link@\romannumeral\@ff@tmpN\endcsname
          }%
          {%
            \csname thumbtab@title@\romannumeral\@ff@tmpN\endcsname
          }%
          {#2}%
        }%
      \fi
      \if@ttb@num
        \expandafter
            \xdef\csname @dynamicframe@\romannumeral\c@maxdynamic\endcsname{%
              \noexpand\thumbtabindexformat
              {%
                \csname thumbtab@link@\romannumeral\@ff@tmpN\endcsname
              }%
              {%
                \csname thumbtab@num@\romannumeral\@ff@tmpN\endcsname
              }%
              {#2}%
            }%
      \fi
    }%
    \expandafter
      \xdef\csname @df@backcol@\romannumeral\c@maxdynamic\endcsname
        {[gray]{\@ff@greyscale}}
    \addtolength{\@ff@tmp@y}{-#2}%
  }%
}


\renewcommand{\thumbtabformat}[2]{%
  \if@ttb@rotate
    \rotatebox{-90}%
    {%
  \checkoddpage
  \ifoddpage
      \parbox[c][\thumbtabwidth-\bleed]{#2}{%
        \centering#1%
      }%
  \else
      \parbox[c][\thumbtabwidth+\bleed]{#2}{%
        \centering#1%
      }%
  \fi
    }%
  \else
    \parbox[c][#2]{\thumbtabwidth}{%
      \centering\@ttb@stack{#1}%
    }%
  \fi
}

\renewcommand*{\makedfheaderfooter}{%
  \setlength{\@ff@tmp@y}{\textheight}%
  \addtolength{\@ff@tmp@y}{\headsep}%
  \newdynamicframe{\textwidth}{\headheight}{0pt}{\@ff@tmp@y}[header]%
  \newdynamicframe{\textwidth}{\headheight}{0pt}{-\footskip}[footer]%
  \renewcommand{\@dothehead}{}%
  \renewcommand{\@dothefoot}{}%
  \renewcommand{\@dodynamicthehead}{%
    \@dynamicframeid{header}%
    \expandafter
      \def\csname @dynamicframe@\romannumeral\ff@id\endcsname{%
        \vfill\@thehead\vfill
      }%
  }%
  \renewcommand{\@dodynamicthefoot}{%
    \@dynamicframeid{footer}%
    \expandafter
     \def\csname @dynamicframe@\romannumeral\ff@id\endcsname{%
       \vspace{-1.0\bleed}\vfill\@thefoot\vfill
     }%
  }%
}
\makeatother


\makethumbtabs{3.7cm}
% \setlength{\thumbtabwidth}{1cm+\bleed}

\setthumbtab{1}{backcolor=Pages}
\setthumbtab{2}{backcolor=Pages}
\setthumbtab{3}{backcolor=Pages}

\newcommand{\thumbtabstyle}[1]{
  \checkoddpage
  \ifoddpage
    \textsc{\sffamily \normalsize \normalfont #1}
  \else
    \rotatebox{180}{\textsc{\sffamily \normalsize \normalfont #1}}
  \fi
}
\setthumbtab{all}{style=thumbtabstyle,textcolor=white}


% ========
%% Footer:

\pagestyle{plain}

\makedfheaderfooter

\newlength{\pagenumber}
\addtolength{\pagenumber}{1cm+\bleed}

\newlength{\xoffset}
\computerightedgeodd{\xoffset}

\addtolength{\xoffset}{-\pagenumber+\bleed}

\newlength{\yoffset}
\computebottomedge{\yoffset}
\addtolength{\yoffset}{-\bleed}

% \newcommand{\footstyle}[1]{\bfseries\Large #1}
\newcommand{\footstyle}[1]{#1}


\setdynamicframe*{footer}{oddx=\xoffset,y=\yoffset,width=\pagenumber,height=\pagenumber,backcolor=Small,textcolor=white,style=footstyle,pages=none}

\computeleftedgeeven{\xoffset}
\addtolength{\xoffset}{-\bleed}
\setdynamicframe*{footer}{evenx=\xoffset}

\dfchaphead*{header}


\begin{document}

% ============
%% Title page:

\setcounter{page}{999}

Title page code.

\newpage

\setcounter{page}{1}

% \mainmatter

\setdynamicframe*{footer}{pages=all}
\setdynamicframe*{header}{pages=all}


% ==============
%% Main content:

\chapter{Program}
\enablethumbtabs

\lipsum[1-9]

\chapter{Abstracts}
\enablethumbtabs

\lipsum[10-19]

\chapter{Venue}
\enablethumbtabs

\lipsum[20-25]

% ============
%% Back cover:

% \cleardoublepage
\finishthispage\mbox{}
\disablethumbtabs
\setdynamicframe*{footer}{pages=none}
\setcounter{page}{1000}


\end{document}

结果:

在此处输入图片描述

要关闭第 43-44 行注释并取消注释第 46 行:

在此处输入图片描述

要再次打开它,请注释第 46 行并取消注释第 43-44 行。

相关内容