Skip to content

Commit

Permalink
pdf: implement automatic underscore wrapping table cells (#16389) (#1…
Browse files Browse the repository at this point in the history
  • Loading branch information
ti-chi-bot authored Jan 29, 2024
1 parent a0d615d commit 351286c
Showing 1 changed file with 13 additions and 2 deletions.
15 changes: 13 additions & 2 deletions templates/template.tex
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,8 @@
\usepackage{setspace}
\setstretch{$linestretch$}
$endif$
\usepackage{etoolbox}
\usepackage{xstring}
\usepackage{amssymb,amsmath}
\usepackage{ifxetex,ifluatex}
\usepackage{fixltx2e} % provides \textsubscript
Expand Down Expand Up @@ -68,6 +70,7 @@
\usepackage{xcolor}
\usepackage{listings}
\lstset{
literate={_}{\_}1,
basicstyle=\ttfamily,
keywordstyle=\color[rgb]{0.13,0.29,0.53}\bfseries,
stringstyle=\color[rgb]{0.31,0.60,0.02},
Expand All @@ -92,6 +95,14 @@
$endif$
$if(tables)$
\usepackage{longtable,booktabs}
% set table to left-aligned
\setlength\LTleft{0pt}
\setlength\LTright{0pt}
% fill the columns to page width
\makeatletter
\patchcmd\LT@array{\tabskip\z@}{\extracolsep{\fill}}
\makeatletter

$endif$
$if(graphics)$
\usepackage{graphicx,grffile}
Expand All @@ -113,8 +124,8 @@
\fi
\hypersetup{breaklinks=true,
bookmarks=true,
pdfauthor={$author-meta$},
pdftitle={$title-meta$},
pdfauthor={$author$},
pdftitle={$title$},
colorlinks=true,
citecolor=$if(citecolor)$$citecolor$$else$blue$endif$,
urlcolor=$if(urlcolor)$$urlcolor$$else$blue$endif$,
Expand Down

0 comments on commit 351286c

Please sign in to comment.