2

I use pandoc with some custom LaTeX template to generate a PDF Table. Hence, I cannot easily influence how Pandoc generates the table code, but instead I can change the configuration in the Latex document.

When I use Pandoc to have a table with long links, the column count is overflowing. How can I prevent this?

Markdown for Pandoc

#### Adblock Findings

The Adblock findings summarise requests that would have been detected and blocked by the Adblock list [easyprivacy.txt](https://easylist.to/easylist/easyprivacy.txt) from <https://easylist.to/>.

  -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
  sample                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          count
  ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- -----------------------------------
  <http://www.google-analytics.com/analytics.js>                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  1

  <http://www.google-analytics.com/r/collect?v=1&_v=j68&a=1570329088&t=pageview&_s=1&dl=http%3A%2F%2Fwww.eba.europa.eu%2F&ul=en-us&de=UTF-8&dt=Home%20-%20European%20Banking%20Authority&sd=24-bit&sr=1366x768&vp=1356x694&je=0&_u=IEBAAEAB~&jid=799733851&gjid=1328499242&cid=1310586057.1530548844&tid=UA-41571870-1&_gid=670816676.1530548844&_r=1&z=1576148449>                                                                                                                                                               2
  -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------

LaTeX (simplified)

\documentclass[12pt,DIV=14,a4paper,parskip=true,titlepage=true]{scrartcl}
% \usepackage{lmodern}
\usepackage{amssymb,amsmath}
\usepackage{ifxetex,ifluatex}
\usepackage{fixltx2e} % provides \textsubscript
\ifnum 0\ifxetex 1\fi\ifluatex 1\fi=0 % if pdftex
  \usepackage[T1]{fontenc}
  \usepackage[utf8]{inputenc}
  \usepackage[scaled=0.90]{helvet}
  \usepackage[lining]{ebgaramond}
\else % if luatex or xelatex
  \ifxetex
\usepackage{mathspec}
  \else
\usepackage{fontspec}
  \fi
  \setsansfont{TeX Gyre Heros}
  \defaultfontfeatures{Ligatures=TeX,Scale=MatchLowercase,Mapping=tex-text}
  \setromanfont[Numbers=Lining]{EB Garamond}
\fi
% use upquote if available, for straight quotes in verbatim environments
\IfFileExists{upquote.sty}{\usepackage{upquote}}{}
% use microtype if available
\IfFileExists{microtype.sty}{%
\usepackage[]{microtype}
\UseMicrotypeSet[protrusion]{basicmath} % disable protrusion for tt fonts
}{}
\PassOptionsToPackage{hyphens}{url} % url is loaded by hyperref
\usepackage[usenames,dvipsnames]{xcolor} % color is loaded by hyperref
\usepackage[unicode=true,draft]{hyperref}

\hypersetup{%
  pdftitle={},
  pdfsubject={},
  colorlinks=true,
  linkcolor=darkblue,
  citecolor=Red,
  urlcolor=darkblue,
  breaklinks=true,
  pdfpagemode=UseNone,
  pageanchor=true,
  pdfpagemode=UseOutlines,
}

\ifnum 0\ifxetex 1\fi\ifluatex 1\fi=0 % if pdftex
  \usepackage[shorthands=off,main=british]{babel}
\else
  \usepackage{polyglossia}
  \setmainlanguage[variant=uk]{english}
\fi

\usepackage{longtable}
\usepackage{booktabs}

\usepackage[style=british]{csquotes}

\begin{document}

\hypertarget{adblock-findings}{%
\paragraph{Adblock Findings}\label{adblock-findings}}

The Adblock findings summarise requests that would have been detected and blocked by the Adblock list \href{https://easylist.to/easylist/easyprivacy.txt}{easyprivacy.txt} from \url{https://easylist.to/}.

\mbox{}

\begin{longtable}[]{@{}ll@{}}
\toprule
\begin{minipage}[b]{0.90\columnwidth}\raggedright
sample\strut
\end{minipage} & \begin{minipage}[b]{0.04\columnwidth}\raggedright
count\strut
\end{minipage}\tabularnewline
\midrule
\endhead
\begin{minipage}[t]{0.90\columnwidth}\raggedright
\url{http://www.google-analytics.com/analytics.js}\strut
\end{minipage} & \begin{minipage}[t]{0.04\columnwidth}\raggedright
1\strut
\end{minipage}\tabularnewline
\begin{minipage}[t]{0.90\columnwidth}\raggedright
\url{http://www.google-analytics.com/r/collect?v=1\&_v=j68\&a=1570329088\&t=pageview\&_s=1\&dl=http\%3A\%2F\%2Fwww.eba.europa.eu\%2F\&ul=en-us\&de=UTF-8\&dt=Home\%20-\%20European\%20Banking\%20Authority\&sd=24-bit\&sr=1366x768\&vp=1356x694\&je=0\&_u=IEBAAEAB~\&jid=799733851\&gjid=1328499242\&cid=1310586057.1530548844\&tid=UA-41571870-1\&_gid=670816676.1530548844\&_r=1\&z=1576148449}\strut
\end{minipage} & \begin{minipage}[t]{0.04\columnwidth}\raggedright
2\strut
\end{minipage}\tabularnewline
\bottomrule
\end{longtable}




\end{document}

Result

PDF Screenhot of MWE

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.