1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
|
\documentclass[DIV13]{scrartcl}
\usepackage[T1]{fontenc}
\usepackage[utf8]{inputenc}
\usepackage[english]{babel}
\usepackage[default,scale=0.95]{opensans}
\usepackage[scaled=0.85]{beramono}
\usepackage{listings}
\usepackage{tabularx}
\usepackage{booktabs}
\usepackage{grid-system}
\usepackage{xcolor}
\definecolor{linkcolor}{rgb}{0, 0, 0.93}
\usepackage[
hidelinks,
colorlinks=true,
urlcolor=linkcolor
]{hyperref}
\setlength{\parindent}{0cm}
\lstset{language=[LaTeX]tex,xleftmargin=2em}
\title{Grid System}
\author{Marcus Bitzl\\ \url{marcus@bitzl.com}}
\begin{document}
\maketitle
\begin{abstract}
Grid system is a package that implements grid like layouts for \LaTeX, as it is commonly known from CSS. You can easily divide your horizontal space into equal parts and assign these to boxes containing your content.
\end{abstract}
\section{Usage}
There are two environments to divide your area into boxes: \texttt{row} to divide your area into columns and \texttt{cell} to fill the area with content:
\medskip
\begin{lstlisting}
\begin{row}{<Number of columns}{<Number of cells>}
\begin{cell}{<Number of columns to span>}
...
\end{cell}
\begin{cell}{<Number of columns to span>}
...
\end{cell}
\end{row}
\end{lstlisting}
Each cell is created using a \texttt{minipage} environment. In future versions the will be a switch to choose either minipages or parboxes.
\section{Parameters}
There is one optional parameter for the environment \texttt{row} right now:
\medskip
\begin{tabularx}{\linewidth}{llX}\toprule
\textbf{Parameter} & \textbf{Default} & \textbf{Description},\\ \midrule
cellsep & 1.75em & horizonal space between two cells.\\\bottomrule
\end{tabularx}
\section{Contribute}
You want to contribute? Just fork me on Github, start discussions and send me you pull requests:
\begin{center}
\href{https://github.com/bitzl/latex-grid-system}{\tt bitzl/latex-grid-system}
\end{center}
\section{License}
Copyright 2013 Marcus Bitzl
\medskip
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
\medskip
\hspace*{1.2em}\href{http://www.apache.org/licenses/LICENSE-2.0}{\texttt{http://www.apache.org/licenses/LICENSE-2.0}}
\medskip
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
\section{Example}
\begin{row}[cellsep=0.75cm]{3}{3}
\begin{cell}{1}
\section*{Overview}
\vspace{-1.5ex}
This shows what you can do with the \texttt{grid-system} package and three columns.
\end{cell}
\begin{cell}{1}
\section*{Why use it?}
\vspace{-1.5ex}
Sometimes you need to split your text in several independent columns based on equal division of the available space. This package allows you to easily do so.
\end{cell}
\begin{cell}{1}
\section*{Contribute}
\vspace{-1.5ex}
You want to contribute? Just fork me on Github, start discussions and send me you pull requests:
\begin{center}
\href{https://github.com/bitzl/latex-grid-system}{\tt bitzl/latex-grid-system}
\end{center}
\end{cell}
\end{row}
\bigskip
\begin{row}[cellsep=0.75cm]{3}{2}
\begin{cell}{2}
\section*{License}
\vspace{-1.5ex}
Copyright 2013 Marcus Bitzl
\medskip
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
\medskip
\hspace*{1.2em}\href{http://www.apache.org/licenses/LICENSE-2.0}{\texttt{http://www.apache.org/licenses/LICENSE-2.0}}
\medskip
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
\end{cell}%
\begin{cell}{1}
\section*{Why use it?}
\vspace{-1.5ex}
Sometimes you need to split your text in several independent columns based on equal division of the available space. This package allows you to easily do so.
\end{cell}
\end{row}
\bigskip
\begin{row}[cellsep=0.75cm]{3}{2}
\begin{cell}{1}
\section*{Short}
\vspace{-1.5ex}
This shows the capabilities of grid-system with three equal columns.
\end{cell}
\begin{cell}{2}
\section*{Long}
\vspace{-1.5ex}
Sometimes you need to split your text in several independent columns based on equal division of the available space. This package allows you to easily do so.
\end{cell}
\end{row}
\end{document}
|