Re: elenco allegati numerati

#88583
Up
0
Down
::


Con questo codice ottengo un risultato quasi soddisfacente.
`\documentclass[12pt,twoside]{article}
\usepackage[utf8]{inputenc}
\usepackage[T1]{fontenc}
\usepackage[largesmallcaps,easyscsl]{kpfonts}
\usepackage[italian]{babel}
\usepackage{lipsum}
\usepackage{hyperref}
\usepackage{pdfpages}

\baselineskip=10mm
\usepackage[a4paper, left=2.8cm, right=5.3cm, top=3.4cm, lines=25]{geometry}
\AtBeginDocument{\baselineskip=10mm}

\topmargin=-10mm
\marginparwidth=40mm
\marginparsep=5mm

\usepackage[letterspace=640]{microtype}
\usepackage{pict2e}[2009/06/01]
\usepackage{tocloft,xcolor}
\cftsetrmarg{0cm}
\usepackage{xparse}
\usepackage{tikz}
\newcommand*\round[1]{\tikz[baseline=(char.base)]{
\node[shape=circle,ultra thick,draw,inner sep=2.5pt] (char) {#1};}}
\newcommand{\listofencl}{\vspace{-1.3cm}}
\newlistof{allegato}{all}{\listofencl}
\cftpagenumbersoff{allegato}
\renewcommand{\cftallegatoaftersnum}{.}
\usepackage{siunitx}
\newenvironment{myfont}{\fontfamily{augie}\selectfont}{\par}

\newcounter{numallegato}
\setcounter{numallegato}{0}
\newcommand{\StampaNumeroAllegato}{%
\stepcounter{numallegato}
\noindent
\put(15,819){\makebox[200mm][r]{\textcolor{red}{\Large \begin{myfont}Documento \end{myfont}{\LARGE \round{\textbf{\begin{myfont}\thenumallegato \end{myfont}}}}}}}
}

\ExplSyntaxOn
\clist_new:N \g_attach_files_clist
\NewDocumentCommand{\ProcessFiles}{m}
{
\clist_gclear:N \g_attach_files_clist
\clist_gset:Nn \g_attach_files_clist { #1 }
\clist_map_inline:Nn \g_attach_files_clist { \_import_files:w ##1? }
}

\cs_new_protected:Npn \_import_files:w #1! #2! #3?
{
\includepdf[pages=-,
%openright,
addtolist={1,allegato,{#3},all:#2},picturecommand*=\StampaNumeroAllegato]{#1.pdf}
}
\ExplSyntaxOff

\begin{document}\errorcontextlines=9

\listofallegato

\makeatletter
\immediate\write\@auxout{\string\newlabel{MyLastPage}{{}{\thepage}{}{}{}}}%
\makeatother

\ProcessFiles{%
cv!cv!Un curriculum
}

\end{document}
`

Il problema è che avrei bisogno che tutti gli allegati si aprissero a destra (funzione openright di pdfpage) con il numero cerchiato stampato in alto sulla prima pagina.
Se però decommento l’opzione openright, il numero viene stampato su una pagina bianca separata dal testo dell’allegato (e non sulla prima pagina dell’allegato stesso). Dove sbaglio?
Grazie
Carlo
[attachment=1362]cv.pdf[/attachment]

Attachments:
You must be logged in to view attached files.

Go to top