comparison mqppep_anova_preamble.tex @ 1:b76c75521d91 draft

planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/mqppep commit 43e7a43b545c24b2dc33d039198551c032aa79be
author galaxyp
date Fri, 28 Oct 2022 18:26:42 +0000
parents
children
comparison
equal deleted inserted replaced
0:8dfd5d2b5903 1:b76c75521d91
1 % -----------------------------------------------------------------------------
2 % preamble includes BEGIN
3 % -----------------------------------------------------------------------------
4 \usepackage{longtable, lscape, ifthen}
5
6 % -----------------------------------------------------------------------------
7 % put \T or \B at the ends of lines to add space for super- or sub-
8 % scripts above or below, respectively
9 % ref: ?
10 \newcommand\T{\rule{0pt}{2.6ex}} % Top strut
11 \newcommand\B{\rule[-1.2ex]{0pt}{0pt}} % Bottom strut
12
13 % -----------------------------------------------------------------------------
14 % horizontal line commands; ideally, these would compute the width rather than
15 % hardcoding it
16 % ref: ?
17 \def\hlinport{\makebox[6.5in]{\hrulefill} \\} % hline outside tabular, port
18 \def\hlinlscp{\makebox[9in]{\hrulefill} \\} % hline outside tabular, lndscp
19 %ref: https://stackoverflow.com/a/67335722
20 \def\hlinnotab{\\makebox[1.0\linewidth]{\hrulefill}\\[1ex]}
21
22 % -----------------------------------------------------------------------------
23 % ref: https://latex.org/forum/viewtopic.php?p=23257#p23257
24 \newcommand{\nonemptyline}[1]{%
25 %\ifthenelse{\equal{#1}{}}{do when empty}{do when not empty}
26 \ifthenelse{\equal{#1}{}}{}{#1}%
27 }
28
29 % -----------------------------------------------------------------------------
30 % For RMarkdown, I needed to put this into a preamble.tex file and include it
31 % via `output: pdf_document: includes: in_header: preamble.tex` because
32 % Markdown was expanding the \tabfill command before writing the tex file
33 % ref: https://tex.stackexchange.com/a/119477 in reply to
34 % https://tex.stackexchange.com/questions/119473/tabbing-and-line-wrapping
35 \makeatletter
36 \newlength\tdima
37 \newcommand\tabfill[1]{\setlength\tdima{\linewidth}%
38 \addtolength\tdima{\@totalleftmargin}%
39 \addtolength\tdima{-\dimen\@curtab}%
40 \parbox[t]{\tdima}{#1\ifhmode\strut\fi}}
41 %\parbox[t]{\tdima}{\nonemptyline{#1}\ifhmode\strut\fi}}
42 \makeatother
43 %
44 % Create a tabbing environment in which to use tabfill
45 % param #1 is specified the tabstops (as expected by the tabbing
46 % environment) and is provided in braces after invocation, e.g.:
47 % \begin{tabwrap}{\hspace{1.25in}\=}
48 % param #2 is the contents of the envirnent
49 \newenvironment{tabwrap}[2]{%
50 \begin{tabbing}#1\kill\ignorespaces%
51 #2}%
52 {\end{tabbing}%
53 }
54
55 % -----------------------------------------------------------------------------
56 % Make a caption for a non-floating figure or table, e.g.,
57 % ref: https://github.com/rf-latex/capt-of/blob/main/capt-of.dtx
58 % https://texfaq.org/FAQ-figurehere
59 %
60 % Usage: \captionof{*type*}[*move*]{*caption*}
61 % *type* is `figure` or `table` (or some type you've
62 % defined with the`float` package)
63 % *move* is the optional moving argument *caption* (the thing
64 % that goes to the list of tables/figures)
65 % *caption* is the text of the caption
66 \makeatletter
67 \newcommand\captionof[1]{\def\@captype{#1}\caption}
68 \makeatother
69 %
70 %%ACE \captionof{table}{Hello world from line 210}
71 % To circumvent mis-numbering of interleaved float and non-float table
72 % and figure captions, it is necessary to include the `perpage` package and
73 % "make them sorted" (FFI see https://texfaq.org/FAQ-figurehere)
74 % I (ACE) don't know how to get this package to include:
75 % \usepackage{bigfoot}
76 % so I included the source instead:
77 \makeatletter
78 \input{perpage.tex}
79 \makeatother
80 %
81 % Ensure that table numbers are sorted
82 \MakeSorted{table}
83 % Ensure that figure numbers are sorted
84 \MakeSorted{figure}
85
86 % -----------------------------------------------------------------------------
87
88 % -----------------------------------------------------------------------------
89 % preamble includes END
90 % -----------------------------------------------------------------------------