Graphics, Figures & Tablesclickable image + longtable

Information and discussion about graphics, figures & tables in LaTeX documents.
Post Reply
comandos
Posts: 15
Joined: Sat Dec 15, 2018 3:46 pm

clickable image + longtable

Post by comandos »

Greetings,
My current code generates a longtable with clickable images the problems comes:
1) itemized list from “Kriteriji” is not in line with text in “Delovanje”
2) inserting a clickable image completely shifts both text’s in “Kriteriji and Delovanje”

Code: Select all

\documentclass[a4paper,oneside,12pt]{book}
\usepackage[slovene]{babel}
\usepackage[utf8]{inputenc} 
\usepackage{titlesec}
\usepackage{xcolor}
\usepackage{tabularx}
\usepackage{float}
\usepackage{caption}
\usepackage{subcaption}
\usepackage{longtable}
\usepackage{array,booktabs,enumitem,makecell}% http://ctan.org/pkg/{array,booktabs,enumitem}
\usepackage{tabu}


\newcolumntype{P}[1]{>{\endgraf\vspace*{-\baselineskip}}p{#1}}



\usepackage{graphicx} \graphicspath{{./slike/}} %%%%%%%%%ZA klicanje SLIK
\usepackage[headsep=40pt,left=1in, right=1in, bottom=1.4in, top=0.8in]{geometry}



\setlength{\parindent}{0in}
\linespread{1.25}
\def\labelitemi{--}

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%CLICABLE IMAGES%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\newsavebox\zbox
\newcounter{zoom}
\newcommand{\zoombox}[2][0]{%
	\leavevmode%
	\sbox\zbox{#2}%
	\pdfdest name {zb\thezoom.out} fit
	\pdfdest name {zb\thezoom.in} fitr
	width  \the\wd\zbox\space
	height \the\ht\zbox\space
	depth  \the\dp\zbox\space
	\immediate\pdfannot
	width  \the\wd\zbox\space
	height \the\ht\zbox\space
	depth  \the\dp\zbox\space
	{%
		/Subtype/Link/H/N
		/Border [0 0 #1 [1 2]]
		/A <<
		/S/JavaScript
		/JS (
		if(typeof(zoomed\thezoom)=='undefined'){
			this.gotoNamedDest('zb\thezoom.out');
			var zoomed\thezoom=false;
		}
		)
		/Next <<
		/S/GoTo/D (zb\thezoom.in)
		/Next <<
		/S/JavaScript
		/JS(
		if(zoomed\thezoom){
			this.gotoNamedDest('zb\thezoom.out');
			zoomed\thezoom=false;
		}else{
			zoomed\thezoom=true;
		}
		)
		>>
		>>
		>>
	}%
	\usebox{\zbox}%
	\stepcounter{zoom}%
}
\makeatother
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%



\begin{document}
	
	
	
			\begin{longtabu} to \textwidth {|X|X|X|X|X|}		
	
		
		\hline \multicolumn{1}{|c|}{\textbf{Oznaka}} & \multicolumn{1}{c|}{\textbf{Slika}} & \multicolumn{1}{c|}{\textbf{Izgled}}&\multicolumn{1}{c|}{\textbf{Kriteriji}}&\multicolumn{1}{c|}{\textbf{Delovanje}} \\ \hline 
		\endfirsthead
		
		\multicolumn{5}{c}%
		{{\bfseries \tablename\ \thetable{} -- Nadaljevanje s prejšne strani}} \\
		\hline \multicolumn{1}{|c|}{\textbf{Oznaka}} & \multicolumn{1}{c|}{\textbf{Slika}} & \multicolumn{1}{c|}{\textbf{Izgled}}&\multicolumn{1}{c|}{\textbf{Kriteriji}}&\multicolumn{1}{c|}{\textbf{Delovanje}} \\ \hline 
		\endhead
		
		\hline \multicolumn{5}{|r|}{{Se nadaljuje}} \\ \hline
		\endfoot
		
		\hline \hline
		\endlastfoot
		

		&\zoombox{\includegraphics[scale=.2]{example-image-a}}&&\begin{itemize}[noitemsep,leftmargin=*,topsep=-2cm,partopsep=0pt]
			\item Posture sway
			\item Two or more falls in previous year
			\item Low hand grip strength
			\item Depressive state of mind
			\item Posture sway
			\item Two or more falls in previous year
			\item Low hand grip strength
			\item Depressive state of mind
			\item Posture sway
			\item Two or more falls in previous year
			\item Low hand grip strength
			\item Depressive state of mind
		\end{itemize}&Imajo modro obrobo, pokriti želežni prehod s hiško za module.\\
		&&&&\\\hline	
&&&&\\\hline
&&&&\\\hline
&&&&\\\hline
&&&&\\\hline
&&&&\\\hline
&&&&\\\hline	
&&&&\\\hline
&&&&\\\hline
&&&&\\\hline
&&&&\\\hline	

	
	\end{longtabu}



\end{document}


Do you recommend a solution that could fix this?

BR

Recommended reading 2024:

LaTeXguide.org • LaTeX-Cookbook.net • TikZ.org

NEW: TikZ book now 40% off at Amazon.com for a short time.

comandos
Posts: 15
Joined: Sat Dec 15, 2018 3:46 pm

clickable image + longtable

Post by comandos »

Any one?
Post Reply