| 1 |
% !TeX TXS-program:compile = txs:///arara |
| 2 |
% arara: pdflatex: {shell: yes, synctex: no, interaction: batchmode} |
| 3 |
% arara: pdflatex: {shell: yes, synctex: no, interaction: batchmode} if found('log', '(undefined references|Please rerun|Rerun to get)') |
| 4 |
|
| 5 |
\documentclass[a4paper]{article} |
| 6 |
\usepackage[english]{babel} |
| 7 |
\usepackage[utf8]{inputenc} |
| 8 |
\usepackage[T1]{fontenc} |
| 9 |
\usepackage{WriteOnGrid} |
| 10 |
\usetikzlibrary{decorations.pathreplacing} |
| 11 |
\usepackage{amsmath,amssymb} |
| 12 |
\usepackage{fontawesome5} |
| 13 |
\usepackage{enumitem} |
| 14 |
\usepackage{frcursive} |
| 15 |
\usepackage{lipsum} |
| 16 |
\usepackage{tabularray} |
| 17 |
\usepackage{fancyvrb} |
| 18 |
\usepackage{fancyhdr} |
| 19 |
\fancyhf{} |
| 20 |
\renewcommand{\headrulewidth}{0pt} |
| 21 |
\lfoot{\sffamily\small [WriteOnGrid]} |
| 22 |
\cfoot{\sffamily\small - \thepage{} -} |
| 23 |
\rfoot{\hyperlink{matoc}{\small\faArrowAltCircleUp[regular]}} |
| 24 |
|
| 25 |
\usepackage{hologo} |
| 26 |
\usepackage{xspace} |
| 27 |
\newcommand\tikzlogo{Ti\textit{k}Z} |
| 28 |
\newcommand\TeXLive{\hologo{TeX}Live\xspace} |
| 29 |
\let\TikZ\tikzlogo |
| 30 |
\newcommand\TableauDocumentation{% |
| 31 |
\begin{tblr}{width=\linewidth,colspec={X[c]X[c]X[c]X[c]X[c]X[c]},cells={font=\sffamily}} |
| 32 |
{\huge \LaTeX} & & & & &\\ |
| 33 |
& {\huge \hologo{pdfLaTeX}} & & & & \\ |
| 34 |
& & {\huge \hologo{LuaLaTeX}} & & & \\ |
| 35 |
& & & {\huge \TikZ} & & \\ |
| 36 |
& & & & {\huge \TeXLive} & \\ |
| 37 |
& & & & & {\huge \hologo{MiKTeX}} \\ |
| 38 |
\end{tblr} |
| 39 |
} |
| 40 |
|
| 41 |
\usepackage{hyperref} |
| 42 |
\urlstyle{same} |
| 43 |
\hypersetup{pdfborder=0 0 0} |
| 44 |
\usepackage[margin=1.5cm]{geometry} |
| 45 |
\setlength{\parindent}{0pt} |
| 46 |
\definecolor{LightGray}{gray}{0.9} |
| 47 |
|
| 48 |
\def\TPversion{0.1.9} |
| 49 |
\def\TPdate{13/01/2026} |
| 50 |
|
| 51 |
\usepackage{minted2} |
| 52 |
\usepackage[most]{tcolorbox} |
| 53 |
\usepackage{minted2} |
| 54 |
\tcbuselibrary{minted} |
| 55 |
\NewTCBListing{PresentationCode}{ O{blue} m }{% |
| 56 |
sharp corners=downhill,enhanced,arc=12pt,skin=bicolor,% |
| 57 |
colback=#1!1!white,colframe=#1!75!black,colbacklower=white,% |
| 58 |
attach boxed title to top right={yshift=-\tcboxedtitleheight},title=Code \LaTeX,% |
| 59 |
boxed title style={% |
| 60 |
colframe=#1!75!black,colback=#1!15!white,% |
| 61 |
,sharp corners=downhill,arc=12pt,% |
| 62 |
},% |
| 63 |
fonttitle=\color{#1!90!black}\itshape\ttfamily\footnotesize,% |
| 64 |
listing engine=minted,minted style=colorful, |
| 65 |
minted language=tex,minted options={tabsize=4,fontsize=\footnotesize,autogobble}, |
| 66 |
#2 |
| 67 |
} |
| 68 |
|
| 69 |
\newcommand\Cle[1]{{\bfseries\sffamily\textlangle #1\textrangle}} |
| 70 |
|
| 71 |
\begin{document} |
| 72 |
|
| 73 |
\pagestyle{fancy} |
| 74 |
|
| 75 |
\thispagestyle{empty} |
| 76 |
|
| 77 |
\vspace{2cm} |
| 78 |
|
| 79 |
\begin{center} |
| 80 |
\begin{minipage}{0.75\linewidth} |
| 81 |
\begin{tcolorbox}[colframe=yellow,colback=yellow!15] |
| 82 |
\begin{center} |
| 83 |
\begin{tabular}{c} |
| 84 |
{\Huge \texttt{WriteOnGrid [en]}}\\ |
| 85 |
\\ |
| 86 |
{\LARGE To write on lines} \\ |
| 87 |
{\LARGE of a grid.} |
| 88 |
\end{tabular} |
| 89 |
|
| 90 |
\medskip |
| 91 |
|
| 92 |
{\small \texttt{Version \TPversion{} -- \TPdate}} |
| 93 |
\end{center} |
| 94 |
\end{tcolorbox} |
| 95 |
\end{minipage} |
| 96 |
\end{center} |
| 97 |
|
| 98 |
\vspace{0.5cm} |
| 99 |
|
| 100 |
\begin{center} |
| 101 |
\begin{tabular}{c} |
| 102 |
\texttt{Cédric Pierquet}\\ |
| 103 |
{\ttfamily c pierquet -- at -- outlook . fr}\\ |
| 104 |
\texttt{\url{https://forge.apps.education.fr/pierquetcedric/packages-latex}} |
| 105 |
\end{tabular} |
| 106 |
\end{center} |
| 107 |
|
| 108 |
\vspace{0.5cm} |
| 109 |
|
| 110 |
{$\blacktriangleright$~~Some commands to create a grid (5x5 or Seyes or Ruled) and to write "on" the lines.} |
| 111 |
|
| 112 |
\smallskip |
| 113 |
|
| 114 |
{$\blacktriangleright$~~Possibility to personnalize size, margins, ...} |
| 115 |
|
| 116 |
\vspace{1cm} |
| 117 |
|
| 118 |
\begin{center} |
| 119 |
\begin{EnvGrid}[NumSquares=22x8] |
| 120 |
\WriteLine{my text on line 1\ldots} |
| 121 |
\WriteLine<center>{my centered text on line 2\ldots} |
| 122 |
\WriteLine<right>{my right-align text on ligne 3\ldots} |
| 123 |
\WriteLine[OffsetH=2]{my 2-squares shifted text on line 4\ldots} |
| 124 |
\PassLine |
| 125 |
\WriteLine{\sffamily my text, sans serif, on line 6\ldots} |
| 126 |
\WriteLine[OffsetH=-1]{\small\cursive my -1-square shifted text on line 7\ldots} |
| 127 |
\end{EnvGrid} |
| 128 |
\end{center} |
| 129 |
|
| 130 |
\begin{EnvGrid}[NumSquares=24x5,Margin=1,Enlarge=2/2,Grid=Seyes]<\ColSeyes> |
| 131 |
\WriteLine[Scale=1.5]{\textcolor{red}{my text on line 1\ldots}} |
| 132 |
\WriteLine[Scale=1.5]{\textcolor{blue}{my text on line 2\ldots}} |
| 133 |
\WriteLine[Scale=1.5,OffsetH=-1]{$1+\frac{1}{2}=\frac32$ et $(1+x)^2=1+2x+x^2$ on line 3\ldots} |
| 134 |
\WriteLine[Scale=1.5]{\cursive my text on line 4\ldots} |
| 135 |
\end{EnvGrid} |
| 136 |
|
| 137 |
\vspace{0.5cm} |
| 138 |
|
| 139 |
\hfill{}\textit{Thanks to Patrick Bideault for ideas and help !} |
| 140 |
|
| 141 |
\vfill |
| 142 |
|
| 143 |
\hrule |
| 144 |
|
| 145 |
\medskip |
| 146 |
|
| 147 |
\TableauDocumentation |
| 148 |
|
| 149 |
\medskip |
| 150 |
|
| 151 |
\hrule |
| 152 |
|
| 153 |
\medskip |
| 154 |
|
| 155 |
\newpage |
| 156 |
|
| 157 |
\part*{Usage} |
| 158 |
|
| 159 |
\section{The package} |
| 160 |
|
| 161 |
\subsection{Loading of the package, used packages} |
| 162 |
|
| 163 |
The package \textsf{WriteOnGrid} loads within the preamble: |
| 164 |
|
| 165 |
\begin{PresentationCode}{listing only} |
| 166 |
\usepackage{WriteOnGrid} |
| 167 |
\end{PresentationCode} |
| 168 |
|
| 169 |
It’s mostly compatible with \textsf{latex}, \textsf{pdflatex}, \textsf{lualatex} or \textsf{xelatex} compilation ! |
| 170 |
|
| 171 |
\medskip |
| 172 |
|
| 173 |
For a better compatibility, \texttt{xcolor} isn't charged anymore with options, so the usefull colors are directly defined within the package. |
| 174 |
|
| 175 |
\medskip |
| 176 |
|
| 177 |
It loads the following packages and libraries: |
| 178 |
|
| 179 |
\begin{itemize} |
| 180 |
%\item \texttt{xcolor} with options \Cle{table,svgnames}; |
| 181 |
\item \texttt{tikz} with the librairies \Cle{calc} and \Cle{positionning}; |
| 182 |
\item \texttt{xstring}, \texttt{xparse} and \texttt{simplekv}. |
| 183 |
\end{itemize} |
| 184 |
|
| 185 |
\subsection{The package itself} |
| 186 |
|
| 187 |
The idea is to, thanks to \TikZ, propose commands and environment to work with a grid, and to write on the lines. |
| 188 |
|
| 189 |
\begin{PresentationCode}{listing only} |
| 190 |
%environment, with keys to prepare the grid |
| 191 |
%commands to write or pass a line |
| 192 |
|
| 193 |
\begin{EnvGrid}[keys]<color> |
| 194 |
\WriteLine[keys]<alignment>{text} |
| 195 |
\PassLine |
| 196 |
\end{EnvGrid} |
| 197 |
\end{PresentationCode} |
| 198 |
|
| 199 |
\subsection{Overall functioning} |
| 200 |
|
| 201 |
The grid is given by the number of squares (nbCol$\times$nbRow), and after we can adjust with \textit{overtakings} to enlarge the grid onto the margins of the paper (left or right). We can also \textit{adjust} the global margin, to begin the lines differently. |
| 202 |
|
| 203 |
\medskip |
| 204 |
|
| 205 |
For example, a $5\times5$ grid: |
| 206 |
|
| 207 |
\begin{itemize} |
| 208 |
\item with a size 24x5 squares; |
| 209 |
\item with an overtaking by \textcolor{red}{2 squares at the left} and \textcolor{blue}{3 squares at the right}; |
| 210 |
\item with a global margin of \textcolor{orange}{1 square}; |
| 211 |
\item with a \textcolor{green!50!black}{\textit{border}} to show the \textit{basis} grid. |
| 212 |
\end{itemize} |
| 213 |
|
| 214 |
\medskip |
| 215 |
|
| 216 |
\begin{tikzpicture} |
| 217 |
\useasboundingbox (0,0) rectangle ({0.5*24},{-0.5*5}) ; |
| 218 |
\draw[xstep=0.5,ystep=0.5,thin,lightgray!75] ({-0.5*2},0) grid ({0.5*24+0.5*3},{-0.5*5}) ; |
| 219 |
\draw[thick,decorate,decoration={brace,amplitude=8pt,mirror}](0,{-0.5*5-0.25})--({0.5*24},{-0.5*5-0.25}) node[midway,below=8pt,font=\small\sffamily] {24C} ; |
| 220 |
\draw[red,thick,decorate,decoration={brace,amplitude=8pt,mirror}] ({-2*0.5},{-0.5*5-0.25})--({0},{-0.5*5-0.25}) node[midway,below=8pt,font=\small\sffamily] {2C} ; |
| 221 |
\draw[blue,thick,decorate,decoration={brace,amplitude=8pt,mirror}] ({0.5*24},{-0.5*5-0.25})--({0.5*24+3*0.5},{-0.5*5-0.25}) node[midway,below=8pt,font=\small\sffamily] {3C} ; |
| 222 |
\draw[thick,decorate,decoration={brace,amplitude=8pt}] ({0.5*24+3*0.5+0.25},0)--({0.5*24+3*0.5+0.25},{-0.5*5}) node[midway,right=8pt,font=\small\sffamily] {5C} ; |
| 223 |
\draw[very thick,orange,densely dashed] ({0.5*1},0)--({0.5*1},{-0.5*5}) ; |
| 224 |
\draw[green!50!black,thick] (0,0) rectangle ({0.5*24},{-0.5*5}) ; |
| 225 |
\end{tikzpicture} |
| 226 |
|
| 227 |
\vspace{1.25cm} |
| 228 |
|
| 229 |
The \texttt{tikzpicture} is \textit{bounded} by the \textcolor{green!50!black}{\textit{border}}, in order to specify overtakings or alignment. |
| 230 |
|
| 231 |
\smallskip |
| 232 |
|
| 233 |
Le left-border of the \textcolor{green!50!black}{\textit{border}} is aligned on the left-margin of the page, so take care of the \texttt{\textbackslash parindent}. |
| 234 |
|
| 235 |
\subsection{Predefined colors and styles} |
| 236 |
|
| 237 |
The package \textsf{WriteOnGrid} proposes "shortcuts" for classic colors ! |
| 238 |
|
| 239 |
\begin{PresentationCode}{listing only} |
| 240 |
\definecolor{TyrianPurple}{rgb}{0.4,0.01,0.24} |
| 241 |
\definecolor{PapierRose}{HTML}{E6B8E6} |
| 242 |
\definecolor{PapierGris}{HTML}{D7E2EE} |
| 243 |
%Colors for Seyes |
| 244 |
\def\ColSeyes{PapierRose/PapierGris} |
| 245 |
%Colors for Ruled |
| 246 |
\def\ColRuled{PapierGris/TyrianPurple} |
| 247 |
\end{PresentationCode} |
| 248 |
|
| 249 |
\begin{PresentationCode}{text only} |
| 250 |
{\tikz \filldraw[TyrianPurple] (0,0) rectangle++ (6,1) node[midway,font=\bfseries\large,text=white] {\verb+TyrianPurple+};} |
| 251 |
|
| 252 |
{\tikz \filldraw[PapierRose] (0,0) rectangle++ (6,1) node[midway,font=\bfseries\large,text=black] {\verb+PapierRose+};} |
| 253 |
|
| 254 |
{\tikz \filldraw[PapierGris] (0,0) rectangle++ (6,1) node[midway,font=\bfseries\large,text=black] {\verb+PapierGris+};} |
| 255 |
\end{PresentationCode} |
| 256 |
|
| 257 |
Note that, since the latest version \texttt{0.1.8}, rules thicknesses can be globally redefined via \texttt{tikzset} (for printing purposes in particular). |
| 258 |
|
| 259 |
\begin{PresentationCode}{listing only} |
| 260 |
%grid |
| 261 |
\tikzset{WoGridp/.style={semithick}} %0.6pt |
| 262 |
%secondary grid (if Seyes) |
| 263 |
\tikzset{WoGridp/.style={thin}} %0.4pt |
| 264 |
%bar |
| 265 |
\tikzset{WoGridbar/.style={thick}} %0.8pt |
| 266 |
\end{PresentationCode} |
| 267 |
\subsection{The number of squares} |
| 268 |
|
| 269 |
The number of grid squares (for individual grids and environments) can be given in several ways: |
| 270 |
|
| 271 |
\begin{itemize} |
| 272 |
\item \Cle{NumSquares=<nbcols>x<nblines>} to specify manually; |
| 273 |
\item \Cle{NumSquares=Auto} to fill the rest of the page (horiz. and vert.); |
| 274 |
\item \Cle{NumSquares=Cx<nblines} to fill horizontally and specify the number of lines; |
| 275 |
\item \Cle{NumSquares=<nbcols>xL} to fill vertically and specify the number of columns. |
| 276 |
\end{itemize} |
| 277 |
|
| 278 |
Note that the calculations carried out to determine the remaining \textit{space} do not take into account any elastic springs that \LaTeX\ can add to \textit{optimize} the space. |
| 279 |
|
| 280 |
\smallskip |
| 281 |
|
| 282 |
To \textit{force} the addition of additional line(s), it is possible to use: |
| 283 |
|
| 284 |
\begin{itemize} |
| 285 |
\item \Cle{NumSquares=Auto*} to force the addition of one more line; |
| 286 |
\item \Cle{NumSquares=Auto**} to force the addition of two more lines; |
| 287 |
\item \Cle{NumSquares=Auto***} to force the addition of three more lines; |
| 288 |
\item etc. |
| 289 |
\end{itemize} |
| 290 |
|
| 291 |
\pagebreak |
| 292 |
|
| 293 |
\section{Commands, keys and options} |
| 294 |
|
| 295 |
\subsection{The command} |
| 296 |
|
| 297 |
\begin{PresentationCode}{listing only} |
| 298 |
%command, with keys to prepare the grid |
| 299 |
|
| 300 |
\DispGrid[keys]<color> |
| 301 |
\end{PresentationCode} |
| 302 |
|
| 303 |
The first argument, \textit{optional}, between \texttt{[...]} give the \Cle{keys}: |
| 304 |
|
| 305 |
\begin{itemize} |
| 306 |
\item \Cle{NumSquares} to specify the size of the grid, under \texttt{(nbCol)x(nbRow)}; \hfill~default: \Cle{17x5} |
| 307 |
\item \Cle{Unit} to specify the scale of the grid; \hfill~default: \Cle{1} |
| 308 |
\item \Cle{Margin} to specify the global \textcolor{orange}{margin} at the beginning of the lines; \hfill~default: \Cle{0} |
| 309 |
\item the boolean \Cle{DispBar} to display or not the bar; \hfill~défaut: \Cle{true} |
| 310 |
\item \Cle{Enlarge} to specify the squares-overtakings, globally with \texttt{\textcolor{red}{L}\textcolor{blue}{R}} or side by side with \texttt{\textcolor{red}{L}/\textcolor{blue}{R}};\hfill~default: \Cle{0} |
| 311 |
\item the boolean \Cle{Border} to display the basis border of the grid;\hfill~default: \Cle{false} |
| 312 |
\item the key\Cle{Grille}, from \Cle{5x5/Seyes/Ruled}, to specify the grid's type.\hfill~défaut: \Cle{5x5} |
| 313 |
\end{itemize} |
| 314 |
|
| 315 |
The second argument, \textit{optional}, between \texttt{<...>} is the color(s) of the grid: |
| 316 |
|
| 317 |
\begin{itemize} |
| 318 |
\item by \Cle{Color} (\Cle{lightgray!66} by default) for $5\times5$; |
| 319 |
\item by \Cle{ColorA/ColorB} (\Cle{lightgray!66/lightgray!33} by default) for Seyes or Ruled. |
| 320 |
\end{itemize} |
| 321 |
|
| 322 |
\medskip |
| 323 |
|
| 324 |
\begin{PresentationCode}{listing only} |
| 325 |
%18x4 big squares, w/o overtaking, Seyes colors, w/o margin/bar |
| 326 |
\DispGrid[NumSquares=18x4,Grid=Seyes,DispBar=false]<\ColSeyes> |
| 327 |
|
| 328 |
%36x8 small squares, overtakings 3/3, PapierGris color |
| 329 |
\DispGrid[NumSquares=36x8,Enlarge=3/3]<PapierGris> |
| 330 |
|
| 331 |
%12x3 lines "Ruled", w/o overtakins, Ruled colors, centered, with 2-margin |
| 332 |
\begin{center} |
| 333 |
\DispGrid[NumSquares=12x3,Grid=Ruled,Margin=2]<\ColRuled> |
| 334 |
\end{center} |
| 335 |
\end{PresentationCode} |
| 336 |
|
| 337 |
\medskip |
| 338 |
|
| 339 |
\DispGrid[NumSquares=18x4,Grid=Seyes,DispBar=false]<\ColSeyes> |
| 340 |
|
| 341 |
\medskip |
| 342 |
|
| 343 |
\DispGrid[NumSquares=36x8,Enlarge=3/3]<PapierGris> |
| 344 |
|
| 345 |
\smallskip |
| 346 |
|
| 347 |
\begin{center} |
| 348 |
\DispGrid[NumSquares=12x3,Grid=Ruled,Margin=2]<\ColRuled> |
| 349 |
\end{center} |
| 350 |
|
| 351 |
\begin{PresentationCode}{listing only} |
| 352 |
%milli papers |
| 353 |
|
| 354 |
\DispGrid[Grid=Milli,NumSquares=9x2]<\ColMilli> |
| 355 |
\DispGrid[Grid=Milli,NumSquares=9x2]<\ColMilliGray> |
| 356 |
\DispGrid[Grid=Milli,NumSquares=9x2]<\ColMilliBlue> |
| 357 |
\DispGrid[Grid=Milli,NumSquares=9x2]<\ColMilliWarm> |
| 358 |
\DispGrid[Grid=Milli,NumSquares=9x2]<\ColMilliGreen> |
| 359 |
\DispGrid[Grid=Milli,NumSquares=9x2]<\ColMilliContrast> |
| 360 |
\end{PresentationCode} |
| 361 |
|
| 362 |
\DispGrid[Grid=Milli,NumSquares=9x2]<\ColMilli> |
| 363 |
\DispGrid[Grid=Milli,NumSquares=9x2]<\ColMilliGray> |
| 364 |
\DispGrid[Grid=Milli,NumSquares=9x2]<\ColMilliBlue> |
| 365 |
\DispGrid[Grid=Milli,NumSquares=9x2]<\ColMilliWarm> |
| 366 |
\DispGrid[Grid=Milli,NumSquares=9x2]<\ColMilliGreen> |
| 367 |
\DispGrid[Grid=Milli,NumSquares=9x2]<\ColMilliContrast> |
| 368 |
|
| 369 |
\pagebreak |
| 370 |
|
| 371 |
\subsection{The environment} |
| 372 |
|
| 373 |
\begin{PresentationCode}{listing only} |
| 374 |
%environment, with keys to prepare the grid |
| 375 |
|
| 376 |
\begin{EnvGrid}[keys]<color> |
| 377 |
... |
| 378 |
\end{EnvGrid} |
| 379 |
\end{PresentationCode} |
| 380 |
|
| 381 |
The first argument, \textit{optional}, between \texttt{[...]} give the \Cle{keys}: |
| 382 |
|
| 383 |
\begin{itemize} |
| 384 |
\item \Cle{NumSquares} to specify the size of the grid, under \texttt{(nbCol)x(nbRow)}; \hfill~default: \Cle{17x5} |
| 385 |
\item \Cle{Unit} to specify the scale of the grid; \hfill~default: \Cle{1} |
| 386 |
\item \Cle{Margin} to specify the global \textcolor{orange}{margin} at the beginning of the lines; \hfill~default: \Cle{0} |
| 387 |
\item the boolean \Cle{DispBar} to display or not the bar; \hfill~défaut: \Cle{true} |
| 388 |
\item \Cle{Enlarge} to specify the squares-overtakings, globally with \texttt{\textcolor{red}{L}\textcolor{blue}{R}} or side by side with \texttt{\textcolor{red}{L}/\textcolor{blue}{R}};\hfill~default: \Cle{0} |
| 389 |
\item the boolean \Cle{Border} to display the basis border of the grid;\hfill~default: \Cle{false} |
| 390 |
\item the key\Cle{Grille}, from \Cle{5x5/Seyes/Ruled}, to specify the grid's type.\hfill~défaut: \Cle{5x5} |
| 391 |
\end{itemize} |
| 392 |
|
| 393 |
The second argument, \textit{optional}, between \texttt{<...>} is the color(s) of the grid: |
| 394 |
|
| 395 |
\begin{itemize} |
| 396 |
\item by \Cle{Color} (\Cle{lightgray!66} by default) for $5\times5$; |
| 397 |
\item by \Cle{ColorA/ColorB} (\Cle{lightgray!66/lightgray!33} by default) for Seyes or Ruled. |
| 398 |
\end{itemize} |
| 399 |
|
| 400 |
\medskip |
| 401 |
|
| 402 |
\begin{PresentationCode}{listing only} |
| 403 |
%18x4 big squares, w/o overtaking, Seyes colors, 3-margin |
| 404 |
\begin{EnvGrid}[NumSquares=18x4,Grid=Seyes,Margin=3]<\ColSeyes> |
| 405 |
\end{EnvGrid} |
| 406 |
|
| 407 |
%36x8 small squares, overtakings 3/3, PapierGris color |
| 408 |
\begin{EnvGrid}[NumSquares=36x8,Enlarge=3/3]<PapierGris> |
| 409 |
\end{EnvGrid} |
| 410 |
|
| 411 |
%12x3 lines "Ruled", w/o overtakins, Ruled colors, centered, with 2-margin |
| 412 |
\begin{center} |
| 413 |
\begin{EnvGrid}[NumSquares=12x3,Grid=Ruled,Margin=2]<\ColRuled> |
| 414 |
\end{EnvGrid} |
| 415 |
\end{center} |
| 416 |
\end{PresentationCode} |
| 417 |
|
| 418 |
\medskip |
| 419 |
|
| 420 |
\begin{EnvGrid}[NumSquares=18x4,Grid=Seyes,Margin=3]<\ColSeyes> |
| 421 |
\end{EnvGrid} |
| 422 |
|
| 423 |
\smallskip |
| 424 |
|
| 425 |
\begin{EnvGrid}[NumSquares=36x8,Enlarge=3/3]<PapierGris> |
| 426 |
\end{EnvGrid} |
| 427 |
|
| 428 |
\smallskip |
| 429 |
|
| 430 |
\begin{center} |
| 431 |
\begin{EnvGrid}[NumSquares=12x3,Grid=Ruled,Margin=2]<\ColRuled> |
| 432 |
\end{EnvGrid} |
| 433 |
\end{center} |
| 434 |
|
| 435 |
\pagebreak |
| 436 |
|
| 437 |
\subsection{Write on the lines} |
| 438 |
|
| 439 |
The idea is to write on the created grid (environment !). In order to write \textit{right} on the lines, we can: |
| 440 |
|
| 441 |
\begin{itemize} |
| 442 |
\item give the lines one by one; |
| 443 |
\item avoid using multilines paragraps, items; |
| 444 |
\item pass a line. |
| 445 |
\end{itemize} |
| 446 |
|
| 447 |
\begin{PresentationCode}{listing only} |
| 448 |
... |
| 449 |
%to write the lines, one by one |
| 450 |
\WriteLine[keys]<alignment>{text} |
| 451 |
%to pass the ligne |
| 452 |
\PassLine |
| 453 |
... |
| 454 |
\end{PresentationCode} |
| 455 |
|
| 456 |
The fisrt argument, \textit{optional}, between \texttt{[...]} give the \Cle{keys}: |
| 457 |
|
| 458 |
\begin{itemize} |
| 459 |
\item \Cle{OffsetH}, in squares, to shift the text from the \textcolor{orange}{margin}; \hfill~default: \Cle{0} |
| 460 |
\item \Cle{OffsetV} to shift vertically the line; \hfill~default: \Cle{0pt} |
| 461 |
\item \Cle{Scale} to specify the scale of the given text.\hfill~default: \Cle{1} |
| 462 |
\end{itemize} |
| 463 |
|
| 464 |
the second argument, \textit{optional}, between \texttt{<...>} is the horizontal alignment (\Cle{left/center/right}) of the text in the basis \textcolor{green!50!black}{\textit{border}}, \Cle{left} by default. |
| 465 |
|
| 466 |
\medskip |
| 467 |
|
| 468 |
Le third argument, \textit{mandatory} and between \texttt{\{...\}} is the text, eventually with options. |
| 469 |
|
| 470 |
\begin{PresentationCode}{listing only} |
| 471 |
\begin{EnvGrid}[NumSquares=36x8] |
| 472 |
\WriteLine[Scale=1.5]{my text on ligne 1\ldots} |
| 473 |
\WriteLine[Scale=1.5]<center>{\ttfamily my tetetype text centered on line 2\ldots} |
| 474 |
\WriteLine[Scale=1.5]<right>{right-align text on line 3\ldots} |
| 475 |
\WriteLine[Scale=1.5,OffsetH=0.1]{\textcolor{red}{red text, 1mm-shifted\ldots}} |
| 476 |
\PassLine |
| 477 |
\WriteLine[Scale=0.5]{\sffamily sans serif text, reduced by 50\,\%, on line 6\ldots} |
| 478 |
\WriteLine[Scale=1.5,OffsetH=3]{\cursive 3 squares-shifted text\ldots} |
| 479 |
\end{EnvGrid} |
| 480 |
\end{PresentationCode} |
| 481 |
|
| 482 |
\begin{EnvGrid}[NumSquares=36x8] |
| 483 |
\WriteLine[Scale=1.5]{my text on ligne 1\ldots} |
| 484 |
\WriteLine[Scale=1.5]<center>{\ttfamily my tetetype text centered on line 2\ldots} |
| 485 |
\WriteLine[Scale=1.5]<right>{right-align text on line 3\ldots} |
| 486 |
\WriteLine[Scale=1.5,OffsetH=0.1]{\textcolor{red}{red text, 1mm-shifted\ldots}} |
| 487 |
\PassLine |
| 488 |
\WriteLine[Scale=0.5]{\sffamily sans serif text, reduced by 50\,\%, on line 6\ldots} |
| 489 |
\WriteLine[Scale=1.5,OffsetH=3]{\cursive 3 squares-shifted text\ldots} |
| 490 |
\end{EnvGrid} |
| 491 |
|
| 492 |
\begin{PresentationCode}{listing only} |
| 493 |
\begin{EnvGrid}[NumSquares=16x4,Margin=2,Grid=Ruled]<\ColRuled> |
| 494 |
\WriteLine[Scale=1.5]{\textcolor{red}{red text on line 1\ldots}} |
| 495 |
\WriteLine[Scale=1.15,OffsetH=1]{$(1+x)^2=1+2x+x^2$ on line 2, with 1-square offset\ldots} |
| 496 |
\WriteLine[OffsetH=-1]{\textcolor{blue}{blue text, back to left, on line 3\ldots}} |
| 497 |
\end{EnvGrid} |
| 498 |
|
| 499 |
\end{PresentationCode} |
| 500 |
\begin{EnvGrid}[NumSquares=16x4,Margin=2,Grid=Ruled]<\ColRuled> |
| 501 |
\WriteLine[Scale=1.5]{\textcolor{red}{red text on line 1\ldots}} |
| 502 |
\WriteLine[Scale=1.15,OffsetH=1]{$(1+x)^2=1+2x+x^2$ on line 2, with 1-square offset\ldots} |
| 503 |
\WriteLine[OffsetH=-1]{\textcolor{blue}{blue text, back to left, on line 3\ldots}} |
| 504 |
\end{EnvGrid} |
| 505 |
|
| 506 |
\newpage |
| 507 |
|
| 508 |
\part*{Additional informations} |
| 509 |
|
| 510 |
\section{Introduction} |
| 511 |
|
| 512 |
There's few other possibilities with the package\textsf{WorkOnGrid}, but for the moment only with \textit{french} keys, so there's no specific documentation for these commands. |
| 513 |
|
| 514 |
\smallskip |
| 515 |
|
| 516 |
To sum up, they create full paper grid (by preference for \texttt{\textbf{a4paper}}), with the ability to write paragraph. |
| 517 |
|
| 518 |
\section{Example} |
| 519 |
|
| 520 |
\begin{PresentationCode}{listing only} |
| 521 |
\begin{PleinePageRuled}[NumLignes] |
| 522 |
\LignePapierRuled[Echelle=1.25,Ligne=1]{C. PIERQUET \hfill LaTeX} |
| 523 |
\LignePapierRuled[Echelle=1.25,Ligne=2,Couleur=red]<center>{\underline{\cursive\bfseries Evaluation 3}} |
| 524 |
\CadreNoteRuled{3} |
| 525 |
\LignePapierRuled[Echelle=1.25,Ligne=8,Couleur=green!50!black]{\sffamily\underline{Exercise 1:}} |
| 526 |
\ParagraphePapierRuled[Ligne=9]{\cursive\lipsum[1]} |
| 527 |
\ParagraphePapierRuled[Ligne=22] |
| 528 |
{% |
| 529 |
We try with math, $1+\frac12=\frac32$, inline, with several lines.\\ |
| 530 |
And another math example, $\int_0^1 2x dx = 1$.\\ |
| 531 |
A new line now ! |
| 532 |
} |
| 533 |
\end{PleinePageRuled} |
| 534 |
\end{PresentationCode} |
| 535 |
|
| 536 |
\pagebreak |
| 537 |
|
| 538 |
\thispagestyle{empty} |
| 539 |
|
| 540 |
\begin{PleinePageRuled} |
| 541 |
\LignePapierRuled[Echelle=1.25,Ligne=1]{C. PIERQUET \hfill LaTeX} |
| 542 |
\LignePapierRuled[Echelle=1.25,Ligne=2,Couleur=red]<center>{\underline{\cursive\bfseries Evaluation 3}} |
| 543 |
\CadreNoteRuled{3} |
| 544 |
\LignePapierRuled[Echelle=1.25,Ligne=8,Couleur=green!50!black]{\sffamily\underline{Exercise 1:}} |
| 545 |
\ParagraphePapierRuled[Ligne=9]{\cursive\lipsum[1]} |
| 546 |
\ParagraphePapierRuled[Ligne=22] |
| 547 |
{% |
| 548 |
We try with math, $1+\frac12=\frac32$, inline, with several lines.\\ |
| 549 |
And another math example, $\int_0^1 2x dx = 1$.\\ |
| 550 |
A new line now ! |
| 551 |
} |
| 552 |
\end{PleinePageRuled} |
| 553 |
|
| 554 |
\pagebreak |
| 555 |
|
| 556 |
\part*{History} |
| 557 |
|
| 558 |
\verb|v0.1.9|:~~~~Grid \textsf{Milli} |
| 559 |
|
| 560 |
\verb|v0.1.8|:~~~~Styles for rules thickness |
| 561 |
|
| 562 |
\verb|v0.1.7|:~~~~New feature for french paper \textsf{PleinePageCinqCinq} |
| 563 |
|
| 564 |
\verb|v0.1.6|:~~~~Possibility to automatically determine L\&C based on the remaining space |
| 565 |
|
| 566 |
\verb|v0.1.4|:~~~~New \texttt{[keys]} + enhancements for paragraphs, for french version (for the moment\dots) |
| 567 |
|
| 568 |
\verb|v0.1.4|:~~~~\texttt{xcolor} isn't loaded with \textsf{[table,svgnames]}) |
| 569 |
|
| 570 |
\verb|v0.1.3|:~~~~Command to display a grid (w/o writing on it) |
| 571 |
|
| 572 |
\verb|v0.1.2|:~~~~Shortcuts for default colors + small bugfixes |
| 573 |
|
| 574 |
\verb|v0.1.1|:~~~~Best color choice |
| 575 |
|
| 576 |
\verb|v0.1.0|:~~~~Initial version |
| 577 |
|
| 578 |
\end{document} |