Merge branch 'master' of git.246060.ru:f1x1t/xelatex-template

This commit is contained in:
Andrei Astafev 2020-10-13 12:05:30 +03:00
commit c5b9f9d197
3 changed files with 163 additions and 0 deletions

View File

@ -0,0 +1,46 @@
\documentclass{article}
% MWE from http://tex.stackexchange.com/questions/40411/import-files-with-pgfplotstable-and-split-tables-across-multiple-pages
\usepackage{pgfplotstable}
\usepackage{fr-longtable}
\usepackage{booktabs}
\usepackage{array}
\usepackage[a4paper]{geometry} %%% change the margins in your file suitably.
\usepackage{filecontents}
\newcolumntype{C}{>{\centering\arraybackslash}p}
\begin{document}
\pgfplotstableset{
begin table=\begin{longtable},
end table=\end{longtable},
}
\pgfplotstabletypeset[
col sep=space,
header=true,
columns={Idx,Nam,Dim,Grd}, % display specified columns
columns/Idx/.style={precision=2,column type=|C{40mm}},
columns/Nam/.style={column type=|C{40mm},string type},
columns/Dim/.style={precision=1,column type=|r},
columns/Grd/.style={column type=|l|,string type},
every even row/.style={after row=\hline},
every odd row/.style={after row=\hline},
% requires booktabs to place horiz rules
every head row/.style={before row=\toprule, after row=\midrule\endhead},
every head row/.style={
before row={%
\caption{The caption}
\endfirsthead
\multicolumn{4}{c}{{\tablename\ \thetable{}: continued from previous page}} \\
\endhead
\multicolumn{4}{c}{{\tablename\ \thetable{}: last page}} \\
\endlasthead
\hline
},
after row=\hline
}
]{test.dat}
\end{document}

View File

@ -0,0 +1,114 @@
%% LaTeX2e file `testdata.dat'
%% generated by the `filecontents' environment
%% from source `b' on 2020/01/02.
%%
Idx Nam Dim Grd
1 Ady 53 F
2 Bar 72 C
3 Cor 83 B
3 Cor 83 B
3 Cor 83 B
3 Cor 83 B
3 Cor 83 B
3 Cor 83 B
3 Cor 83 B
3 Cor 83 B
3 Cor 83 B
4 Dar 58 D
5 Esa 68 C
6 Foo 67 C
7 Gar 74 C
8 Hur 65 D
9 Jaz 85 B
10 Ker 91 A
4 Dar 58 D
5 Esa 68 C
6 Foo 67 C
7 Gar 74 C
8 Hur 65 D
9 Jaz 85 B
10 Ker 91 A
4 Dar 58 D
5 Esa 68 C
6 Foo 67 C
7 Gar 74 C
8 Hur 65 D
9 Jaz 85 B
10 Ker 91 A
4 Dar 58 D
5 Esa 68 C
6 Foo 67 C
7 Gar 74 C
8 Hur 65 D
9 Jaz 85 B
10 Ker 91 A
4 Dar 58 D
5 Esa 68 C
6 Foo 67 C
7 Gar 74 C
8 Hur 65 D
9 Jaz 85 B
10 Ker 91 A
4 Dar 58 D
5 Esa 68 C
6 Foo 67 C
7 Gar 74 C
8 Hur 65 D
9 Jaz 85 B
10 Ker 91 A
4 Dar 58 D
5 Esa 68 C
6 Foo 67 C
7 Gar 74 C
8 Hur 65 D
9 Jaz 85 B
10 Ker 91 A
4 Dar 58 D
5 Esa 68 C
6 Foo 67 C
7 Gar 74 C
8 Hur 65 D
9 Jaz 85 B
10 Ker 91 A
4 Dar 58 D
5 Esa 68 C
6 Foo 67 C
7 Gar 74 C
8 Hur 65 D
9 Jaz 85 B
10 Ker 91 A
1 Ady 53 F
2 Bar 72 C
3 Cor 83 B
10 Ker 91 A
4 Dar 58 D
5 Esa 68 C
6 Foo 67 C
7 Gar 74 C
8 Hur 65 D
9 Jaz 85 B
10 Ker 91 A
4 Dar 58 D
5 Esa 68 C
6 Foo 67 C
7 Gar 74 C
8 Hur 65 D
9 Jaz 85 B
10 Ker 91 A
4 Dar 58 D
5 Esa 68 C
6 Foo 67 C
7 Gar 74 C
8 Hur 65 D
9 Jaz 85 B
10 Ker 91 A
4 Dar 58 D
5 Esa 68 C
6 Foo 67 C
7 Gar 74 C
8 Hur 65 D
9 Jaz 85 B
10 Ker 91 A
4 Dar 58 D
5 Esa 68 C
6 Foo 67 C

View File

@ -213,6 +213,9 @@
\newcolumntype{Z}{>{\HY\raggedright\arraybackslash\hspace{0pt}}X}
\newcolumntype{M}{>{\HY\RaggedRight\arraybackslash\hspace{0pt}}c}
\newcolumntype{L}{>{\HY\RaggedRight\arraybackslash\hspace{0pt}}l}
\newcolumntype{C}{>{\centering\arraybackslash}p}
\usepackage{pgfplotstable}
%%%%% Заголовок на последней странице таблицы (обязательно после hyperref)
\usepackage{fr-longtable}