├── .gitignore ├── LICENSE ├── README.md ├── enumitem.sty ├── main.pdf ├── main.tex ├── res.cls └── wrapfig.sty /.gitignore: -------------------------------------------------------------------------------- 1 | *.log 2 | -------------------------------------------------------------------------------- /LICENSE: -------------------------------------------------------------------------------- 1 | The MIT License (MIT) 2 | 3 | Copyright (c) 2016 Ashish Kedia 4 | 5 | Permission is hereby granted, free of charge, to any person obtaining a copy 6 | of this software and associated documentation files (the "Software"), to deal 7 | in the Software without restriction, including without limitation the rights 8 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 9 | copies of the Software, and to permit persons to whom the Software is 10 | furnished to do so, subject to the following conditions: 11 | 12 | The above copyright notice and this permission notice shall be included in all 13 | copies or substantial portions of the Software. 14 | 15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 17 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 18 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 19 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 20 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 21 | SOFTWARE. 22 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # resume 2 | This is my resume. 3 | 4 | Compile it using pdftex. 5 | -------------------------------------------------------------------------------- /enumitem.sty: -------------------------------------------------------------------------------- 1 | % +--------------------------------------------------+ 2 | % | Typeset enumitem.tex to get the documentation. | 3 | % +--------------------------------------------------+ 4 | % 5 | % Copyright (c) 2003-2011 by Javier Bezos. 6 | % All Rights Reserved. 7 | % 8 | % This file is part of the enumitem distribution release 3.5.2 9 | % ----------------------------------------------------------- 10 | % 11 | % It may be distributed and/or modified under the 12 | % conditions of the LaTeX Project Public License, either version 1.3 13 | % of this license or (at your option) any later version. 14 | % The latest version of this license is in 15 | % http://www.latex-project.org/lppl.txt 16 | % and version 1.3 or later is part of all distributions of LaTeX 17 | % version 2003/12/01 or later. 18 | % 19 | % This work has the LPPL maintenance status "maintained". 20 | % 21 | % The Current Maintainer of this work is Javier Bezos. 22 | % 23 | % Notes 24 | % ~~~~~ 25 | % 26 | % The tag enit@ is used through the style 27 | % 28 | % To do: 29 | % ~~~~~~ 30 | % - ref*, for adding stuff in the same fashion as label* 31 | % - option ams, to force upshape, but I have to investigate 32 | % how to do it. 33 | % - labelled descriptions (ie, label, title, body) 34 | % - A true nextline (far from trivial and perhaps solved with 35 | % labelled descriptions). 36 | % - Improved \AddEnumerateCounter 37 | % - Compatibility with interfaces and zref-enumitem 38 | % - "Pausing" somehow inline boxed text. 39 | % - \@enumctr <-> \@listctr? 40 | % - Define keys with values 41 | % - Revise @nobreak 42 | % 43 | % Release 44 | % ~~~~~~~ 45 | 46 | \NeedsTeXFormat{LaTeX2e} 47 | \ProvidesPackage{enumitem}[2011/09/28 v3.5.2 Customized lists] 48 | 49 | % +=============================+ 50 | % | EMULATING KEYVAL | 51 | % +=============================+ 52 | % 53 | % "Thanks" to xkeyval, which use the same macros names as 54 | % keyval :-(, the latter has to be replicated in full here 55 | % to ensure it works as intended. The original work if by 56 | % David Carlisle, under license LPPL. Once the code is here, 57 | % it could be optimized by adpting it to the specific needs 58 | % of titlesec (to do). 59 | 60 | \def\enitkv@setkeys#1#2{% 61 | \def\enitkv@prefix{enitkv@#1@}% 62 | \let\@tempc\relax 63 | \enitkv@do#2,\relax,} 64 | 65 | \def\enitkv@do#1,{% 66 | \ifx\relax#1\empty\else 67 | \enitkv@split#1==\relax 68 | \expandafter\enitkv@do\fi} 69 | 70 | \def\enitkv@split#1=#2=#3\relax{% 71 | \enitkv@@sp@def\@tempa{#1}% 72 | \ifx\@tempa\@empty\else 73 | \expandafter\let\expandafter\@tempc 74 | \csname\enitkv@prefix\@tempa\endcsname 75 | \ifx\@tempc\relax 76 | \enitkv@errx{\@tempa\space undefined}% 77 | \else 78 | \ifx\@empty#3\@empty 79 | \enitkv@default 80 | \else 81 | \enitkv@@sp@def\@tempb{#2}% 82 | \expandafter\@tempc\expandafter{\@tempb}\relax 83 | \fi 84 | \fi 85 | \fi} 86 | 87 | \def\enitkv@default{% 88 | \expandafter\let\expandafter\@tempb 89 | \csname\enitkv@prefix\@tempa @default\endcsname 90 | \ifx\@tempb\relax 91 | \enitkv@err{No value specified for \@tempa}% 92 | \else 93 | \@tempb\relax 94 | \fi} 95 | 96 | \def\enitkv@errx#1{\enit@error{#1}\@ehc} 97 | 98 | \let\enitkv@err\enitkv@errx 99 | 100 | \def\@tempa#1{% 101 | \def\enitkv@@sp@def##1##2{% 102 | \futurelet\enitkv@tempa\enitkv@@sp@d##2\@nil\@nil#1\@nil\relax##1}% 103 | \def\enitkv@@sp@d{% 104 | \ifx\enitkv@tempa\@sptoken 105 | \expandafter\enitkv@@sp@b 106 | \else 107 | \expandafter\enitkv@@sp@b\expandafter#1% 108 | \fi}% 109 | \def\enitkv@@sp@b#1##1 \@nil{\enitkv@@sp@c##1}} 110 | 111 | \@tempa{ } 112 | 113 | \def\enitkv@@sp@c#1\@nil#2\relax#3{\enitkv@toks@{#1}\edef#3{\the\enitkv@toks@}} 114 | 115 | \@ifundefined{KV@toks@} 116 | {\newtoks\enitkv@toks@} 117 | {\let\enitkv@toks@\KV@toks@} 118 | 119 | \def\enitkv@key#1#2{% 120 | \@ifnextchar[{\enitkv@def{#1}{#2}}{\@namedef{enitkv@#1@#2}####1}} 121 | 122 | \def\enitkv@def#1#2[#3]{% 123 | \@namedef{enitkv@#1@#2@default\expandafter}\expandafter 124 | {\csname enitkv@#1@#2\endcsname{#3}}% 125 | \@namedef{enitkv@#1@#2}##1} 126 | 127 | % +=============================+ 128 | % | DEFINITIONS | 129 | % +=============================+ 130 | % 131 | % (1) The package uses a token register very often. To be on the 132 | % safe side, instead of \toks@, etc., a new one is declared. 133 | % (2) \enit@inbox is the box storing the items in boxed inline 134 | % lists. 135 | % (3) \enit@outerparindent is used to save the outer parindent 136 | % so that it can be used in the key parindent 137 | % (4) \enit@type has three values: 0 = enum, 1 = item, 2 = desc. 138 | % (5) \enit@calc stores which dimen is to be computed: 139 | % 0=labelindent, 1=labelwidth, 2=labelsep, 3=leftmargin, 140 | % 4=itemindent 141 | % (6) \enit@resuming has four values: 0 = none, 1 = series, 142 | % 2 = resume* series (computed in group enumitem-resume), 143 | % 3 = resume* list (ie, with no value). 144 | 145 | \chardef \enit@iv=4 146 | \newlength\labelindent 147 | \newdimen \enit@outerparindent 148 | \newtoks \enit@toks 149 | \newbox \enit@inbox 150 | 151 | \newif\ifenit@boxmode 152 | \newif\ifenit@sepfrommargin 153 | \newif\ifenit@lblfrommargin 154 | \newif\ifenit@calcwidest 155 | \newif\ifenit@nextline 156 | \newif\ifenit@boxdesc 157 | 158 | % An alias (calc-savvy): 159 | 160 | \let\c@enit@cnt\@tempcnta 161 | 162 | \def\enit@meaning{\expandafter\strip@prefix\meaning} 163 | \def\enit@noexcs#1{\expandafter\noexpand\csname#1\endcsname} 164 | 165 | % Miscelaneous errors 166 | % =================== 167 | 168 | \def\enit@error{\PackageError{enumitem}} 169 | 170 | \def\enit@checkerror#1#2{% 171 | \enit@error{Unknown value `#2' for key `#1'}% 172 | {See the manual for valid values}} 173 | 174 | \def\enit@itemerror{% 175 | \enit@error{Misplaced \string\item}% 176 | {Either there is some text before the first\MessageBreak 177 | item or the last item has no text}} 178 | 179 | \def\enit@noserieserror#1{% 180 | \enit@error{Series `#1' not started}% 181 | {You are trying to continue a series\MessageBreak 182 | which has not been started with series}} 183 | 184 | \def\enit@checkseries#1{% 185 | \ifcase\enit@resuming 186 | \enit@error{Misplaced key `#1'}% 187 | {`series' and `resume*' must be used\MessageBreak 188 | in the optional argument of lists}% 189 | \fi} 190 | 191 | \def\enit@checkseries@m{% 192 | \ifcase\enit@resuming\else 193 | \enit@error{Uncompatible series settings}% 194 | {`series' and `resume*' must not be used\MessageBreak 195 | at the same time}% 196 | \fi} 197 | 198 | \let\enit@toodeep\@toodeep 199 | 200 | \def\@toodeep{% 201 | \ifnum\@listdepth>\enit@listdepth\relax 202 | \enit@toodeep 203 | \else 204 | \count@\@listdepth 205 | \global\advance\@listdepth\@ne 206 | \@ifundefined{@list\romannumeral\the\@listdepth}% 207 | {\expandafter\let 208 | \csname @list\romannumeral\the\@listdepth\expandafter\endcsname 209 | \csname @list\romannumeral\the\count@\endcsname}{}% 210 | \fi} 211 | 212 | 213 | % +=============================+ 214 | % | KEYS | 215 | % +=============================+ 216 | % 217 | % Including code executed by keys. 218 | % 219 | % There are 2 keyval groups: enumitem, and enumitem-delayed. 220 | % The latter is used to make sure a prioritary key is the 221 | % latest one; eg, ref, so that the ref format set by label 222 | % is overriden. So, when this key is found in enumitem, 223 | % nothing is done, except the key/value is moved to 224 | % enumitem-delayed. 225 | % 226 | % A further group (enumitem-resume) catches resume* and 227 | % series in optional arguments in lists. 228 | % 229 | % Vertical spacing 230 | % ================ 231 | 232 | \enitkv@key{enumitem}{topsep}{% 233 | \setlength\topsep{#1}} 234 | 235 | \enitkv@key{enumitem}{itemsep}{% 236 | \setlength\itemsep{#1}} 237 | 238 | \enitkv@key{enumitem}{parsep}{% 239 | \setlength\parsep{#1}} 240 | 241 | \enitkv@key{enumitem}{partopsep}{% 242 | \setlength\partopsep{#1}} 243 | 244 | % Horizontal spacing 245 | % ================== 246 | % 247 | % There are 3 cases: *, ! and a value. The latter also 248 | % cancels widest with the sequence key=* ... key=value 249 | % \string is used, just in case some package changes the 250 | % catcodes. 251 | 252 | \def\enit@calcset#1#2#3{% 253 | \if\string*\string#3% 254 | \enit@calcwidesttrue 255 | \let\enit@calc#2% 256 | \else\if\string!\string#3% 257 | \enit@calcwidestfalse 258 | \let\enit@calc#2% 259 | \else 260 | \ifnum\enit@calc=#2% 261 | \enit@calcwidestfalse 262 | \let\enit@calc\z@ 263 | \fi 264 | \setlength#1{#3}% 265 | \fi\fi} 266 | 267 | \def\enitkv@enumitem@widest#1{% 268 | \expandafter\let\csname enit@cw@\@enumctr\endcsname\relax 269 | \@namedef{enit@widest@\@enumctr}##1{#1}} 270 | 271 | \def\enitkv@enumitem@widest@default{% 272 | \expandafter\let\csname enit@cw@\@enumctr\endcsname\relax 273 | \expandafter\let\csname enit@widest@\@enumctr\endcsname\relax} 274 | 275 | \enitkv@key{enumitem}{widest*}{% 276 | \setcounter{enit@cnt}{#1}% 277 | \expandafter\edef\csname enit@cw@\@enumctr\endcsname 278 | {\the\c@enit@cnt}% 279 | \expandafter\edef\csname enit@widest@\@enumctr\endcsname##1% 280 | {##1{\the\c@enit@cnt}}} 281 | 282 | \enitkv@key{enumitem}{labelindent*}{% 283 | \enit@lblfrommargintrue 284 | \ifnum\enit@calc=\z@ 285 | \enit@calcwidestfalse 286 | \fi 287 | \setlength\labelindent{#1}% 288 | \advance\labelindent\leftmargin} 289 | 290 | \enitkv@key{enumitem}{labelindent}{% 291 | \enit@lblfrommarginfalse 292 | \enit@calcset\labelindent\z@{#1}} 293 | 294 | \enitkv@key{enumitem}{labelwidth}{% 295 | \enit@calcset\labelwidth\@ne{#1}} 296 | 297 | \enitkv@key{enumitem}{leftmargin}{% 298 | \edef\enit@c{\the\leftmargin}% 299 | \enit@calcset\leftmargin\thr@@{#1}% 300 | \ifenit@lblfrommargin 301 | \advance\labelindent-\enit@c\relax 302 | \advance\labelindent\leftmargin 303 | \fi} 304 | 305 | \enitkv@key{enumitem}{itemindent}{% 306 | \edef\enit@c{\the\itemindent}% 307 | \enit@calcset\itemindent\enit@iv{#1}% 308 | \ifenit@sepfrommargin 309 | \advance\labelsep-\enit@c\relax 310 | \advance\labelsep\itemindent 311 | \fi} 312 | 313 | \enitkv@key{enumitem}{listparindent}{% 314 | \setlength\listparindent{#1}} 315 | 316 | \enitkv@key{enumitem}{rightmargin}{% 317 | \setlength\rightmargin{#1}} 318 | 319 | % labelsep, from itemindent; labelsep*, from leftmargin 320 | 321 | \enitkv@key{enumitem}{labelsep*}{% 322 | \enit@sepfrommargintrue 323 | \ifnum\enit@calc=\tw@ 324 | \enit@calcwidestfalse 325 | \let\enit@calc\z@ 326 | \fi 327 | \setlength\labelsep{#1}% 328 | \advance\labelsep\itemindent} 329 | 330 | \enitkv@key{enumitem}{labelsep}{% 331 | \enit@sepfrommarginfalse 332 | \enit@calcset\labelsep\tw@{#1}} 333 | 334 | % Series, resume and start 335 | % ======================== 336 | 337 | \enitkv@key{enumitem-resume}{series}{% 338 | \enit@checkseries@m 339 | \let\enit@resuming\@ne 340 | \@ifundefined{enitkv@enumitem@#1}{}% 341 | {\enit@error{Invalid series name `#1'}% 342 | {Do not name a series with an existing key}}% 343 | \def\enit@series{#1}} 344 | 345 | \enitkv@key{enumitem}{series}{% 346 | \enit@checkseries{series}} 347 | 348 | \def\enitkv@enumitem@resume#1{% 349 | \edef\enit@series{#1}% 350 | \@nameuse{enit@resume@series@#1}\relax} 351 | 352 | \def\enitkv@enumitem@resume@default{% 353 | \@nameuse{enit@resume@\@currenvir}\relax} 354 | 355 | \@namedef{enitkv@enumitem-resume@resume*}#1{% 356 | \enit@checkseries@m 357 | \let\enit@resuming\tw@ 358 | \edef\enit@series{#1}% 359 | \@ifundefined{enit@resumekeys@series@#1}% 360 | {\enit@noserieserror{#1}}% 361 | {\expandafter\let\expandafter\enit@resumekeys 362 | \csname enit@resumekeys@series@#1\endcsname}} 363 | 364 | \@namedef{enitkv@enumitem-resume@resume*@default}{% 365 | \let\enit@resuming\thr@@ 366 | \expandafter\let\expandafter\enit@resumekeys 367 | \csname enit@resumekeys@\@currenvir\endcsname 368 | \@nameuse{enit@resume@\@currenvir}\relax} 369 | 370 | \enitkv@key{enumitem}{resume*}[]{% 371 | \enit@checkseries{resume*}} 372 | 373 | \newcommand\restartlist[1]{% 374 | \@ifundefined{end#1}% 375 | {\enit@error{Undefined list `#1'}% 376 | {No list has been defined with that name.}}% 377 | {\expandafter\let 378 | \csname enit@resume@#1\endcsname\@empty}} 379 | 380 | \enitkv@key{enumitem}{start}[\@ne]{% 381 | \setcounter{\@listctr}{#1}% 382 | \advance\@nameuse{c@\@listctr}\m@ne} 383 | 384 | % Penalties 385 | % ========= 386 | 387 | \enitkv@key{enumitem}{beginpenalty}{% 388 | \@beginparpenalty#1\relax} 389 | 390 | \enitkv@key{enumitem}{midpenalty}{% 391 | \@itempenalty#1\relax} 392 | 393 | \enitkv@key{enumitem}{endpenalty}{% 394 | \@endparpenalty#1\relax} 395 | 396 | % Font/Format 397 | % =========== 398 | 399 | \enitkv@key{enumitem}{format}{% 400 | \def\enit@format{#1}} 401 | 402 | \enitkv@key{enumitem}{font}{% 403 | \def\enit@format{#1}} 404 | 405 | % Description styles 406 | % ================== 407 | 408 | \enitkv@key{enumitem}{style}[normal]{% 409 | \@ifundefined{enit@style@#1}% 410 | {\enit@checkerror{style}{#1}}% 411 | {\enit@nextlinefalse 412 | \enit@boxdescfalse 413 | \@nameuse{enit@style@#1}% 414 | \edef\enit@descstyle{\enit@noexcs{enit@#1style}}}} 415 | 416 | \def\enit@style@standard{% 417 | \enit@boxdesctrue 418 | \enit@calcset\itemindent\enit@iv!} 419 | 420 | \let\enit@style@normal\enit@style@standard 421 | 422 | \def\enit@style@unboxed{% 423 | \enit@calcset\itemindent\enit@iv!} 424 | 425 | \def\enit@style@sameline{% 426 | \enit@calcset\labelwidth\@ne!} 427 | 428 | \def\enit@style@multiline{% 429 | \enit@align@parleft 430 | \enit@calcset\labelwidth\@ne!} 431 | 432 | \def\enit@style@nextline{% 433 | \enit@nextlinetrue 434 | \enit@calcset\labelwidth\@ne!} 435 | 436 | % Labels and refs 437 | % =============== 438 | 439 | % Aligment 440 | % -------- 441 | 442 | \enitkv@key{enumitem}{align}{% 443 | \@ifundefined{enit@align@#1}% 444 | {\enit@checkerror{align}{#1}}% 445 | {\csname enit@align@#1\endcsname}} 446 | 447 | % \nobreak for unboxed label with color. See below. 448 | 449 | \newcommand\SetLabelAlign[2]{% 450 | \enit@toks{#2}% 451 | \expandafter\edef\csname enit@align@#1\endcsname 452 | {\def\noexpand\enit@align####1{\nobreak\the\enit@toks}}} 453 | 454 | \def\enit@align@right{% 455 | \def\enit@align##1{\nobreak\hss\llap{##1}}} 456 | 457 | \def\enit@align@left{% 458 | \def\enit@align##1{\nobreak##1\hfil}} 459 | 460 | \def\enit@align@parleft{% 461 | \def\enit@align##1{% 462 | \nobreak 463 | \strut\smash{\parbox[t]\labelwidth{\raggedright##1}}}} 464 | 465 | % \enit@ref has three possible definitions: 466 | % (1) \relax, if there is neither label nor ref (ie, use 467 | % LaTeX settings). 468 | % (2) set ref to @itemlabel, if there is label but not ref 469 | % (3) set ref to ref, if there is ref (with or without label) 470 | 471 | \enitkv@key{enumitem}{label}{% 472 | \expandafter\def\@itemlabel{#1}% 473 | \def\enit@ref{\expandafter\enit@reflabel\@itemlabel\z@}} 474 | 475 | \enitkv@key{enumitem}{label*}{% 476 | \ifnum\enit@depth=\@ne 477 | \expandafter\def\@itemlabel{#1}% 478 | \else % no level 0 479 | \advance\enit@depth\m@ne 480 | \enit@toks{#1}% 481 | \expandafter\edef\@itemlabel{% 482 | \enit@noexcs{label\enit@prevlabel}% 483 | \the\enit@toks}% 484 | \advance\enit@depth\@ne 485 | \fi 486 | \def\enit@ref{\expandafter\enit@reflabel\@itemlabel\z@}} 487 | 488 | % ref is set by label, except if there is an explicit ref 489 | % in the same hierarchy level. Explicit refs above the 490 | % current hierarchy level are overriden by label (besides ref), 491 | % too. Since an explicit ref has preference, it's delayed. 492 | 493 | \enitkv@key{enumitem}{ref}{% 494 | \g@addto@macro\enit@delayedkeys{,ref=#1}} 495 | 496 | \enitkv@key{enumitem-delayed}{ref}{% 497 | \def\enit@ref{\enit@reflabel{#1}\@ne}} 498 | 499 | % #2=0 don't "normalize" (ie, already normalized) 500 | % =1 "normalize" (in key ref) 501 | % Used thru \enit@ref 502 | 503 | \def\enit@reflabel#1#2{% 504 | \ifnum\enit@depth=\@ne\else % no level 0 505 | \advance\enit@depth\@ne 506 | \@namedef{p@\@enumctr}{}% Don't accumulate labels 507 | \advance\enit@depth\m@ne 508 | \fi 509 | \ifcase#2% 510 | \@namedef{the\@enumctr}{{#1}}% 511 | \else 512 | \enit@normlabel{\csname the\@enumctr\endcsname}{#1}% 513 | \fi} 514 | 515 | % \xxx* in counters (refstar) and widest (calcdef) 516 | % ------------------------------------------------ 517 | % \enit@labellist contains a list of 518 | % \enit@elt{widest}\count\@count\enit@sc@@count 519 | % \enit@elt is either \enit@getwidth or \enit@refstar, defined 520 | % below 521 | % The current implementation is sub-optimal -- labels are stored in 522 | % labellist, counters defined again when processing labels, and 523 | % modifying it is almost impossible. 524 | 525 | \let\enit@labellist\@empty 526 | 527 | \newcommand\AddEnumerateCounter{% 528 | \@ifstar\enit@addcounter@s\enit@addcounter} 529 | 530 | \def\enit@addcounter#1#2#3{% 531 | \enit@toks\expandafter{% 532 | \enit@labellist 533 | \enit@elt{#3}}% 534 | \edef\enit@labellist{% 535 | \the\enit@toks 536 | \enit@noexcs{\expandafter\@gobble\string#1}% 537 | \enit@noexcs{\expandafter\@gobble\string#2}% 538 | \enit@noexcs{enit@sc@\expandafter\@gobble\string#2}}} 539 | 540 | \def\enit@addcounter@s#1#2#3{% 541 | \enit@addcounter{#1}{#2}% 542 | {\@nameuse{enit@sc@\expandafter\@gobble\string#2}{#3}}} 543 | 544 | % The 5 basic counters: 545 | 546 | \AddEnumerateCounter\arabic\@arabic{0} 547 | \AddEnumerateCounter\alph\@alph{m} 548 | \AddEnumerateCounter\Alph\@Alph{M} 549 | \AddEnumerateCounter\roman\@roman{viii} 550 | \AddEnumerateCounter\Roman\@Roman{VIII} 551 | 552 | % Inline lists 553 | % ============ 554 | % 555 | % Labels 556 | % ------ 557 | 558 | \enitkv@key{enumitem}{itemjoin}{% 559 | \def\enit@itemjoin{#1}} 560 | 561 | \enitkv@key{enumitem}{itemjoin*}{% 562 | \def\enit@itemjoin@s{#1}} 563 | 564 | \enitkv@key{enumitem}{afterlabel}{% 565 | \def\enit@afterlabel{#1}} 566 | 567 | % Mode 568 | % ---- 569 | 570 | \enitkv@key{enumitem}{mode}{% 571 | \@ifundefined{enit@mode#1}% 572 | {\enit@checkerror{mode}{#1}}% 573 | {\csname enit@mode#1\endcsname}} 574 | 575 | \let\enit@modeboxed\enit@boxmodetrue 576 | \let\enit@modeunboxed\enit@boxmodefalse 577 | 578 | % Short Labels 579 | % ============ 580 | 581 | \let\enit@marklist\@empty 582 | 583 | % shorthand, expansion: 584 | 585 | \newcommand\SetEnumerateShortLabel[2]{% 586 | \let\enit@a\@empty 587 | \def\enit@elt##1##2{% 588 | \def\enit@b{#1}\def\enit@c{##1}% 589 | \ifx\enit@b\enit@c\else 590 | \expandafter\def\expandafter\enit@a\expandafter{% 591 | \enit@a 592 | \enit@elt{##1}{##2}}% 593 | \fi}% 594 | \enit@marklist 595 | \expandafter\def\expandafter\enit@a\expandafter{% 596 | \enit@a 597 | \enit@elt{#1}{#2}}% 598 | \let\enit@marklist\enit@a} 599 | 600 | \SetEnumerateShortLabel{a}{\alph*} 601 | \SetEnumerateShortLabel{A}{\Alph*} 602 | \SetEnumerateShortLabel{i}{\roman*} 603 | \SetEnumerateShortLabel{I}{\Roman*} 604 | \SetEnumerateShortLabel{1}{\arabic*} 605 | 606 | % This is called \enit@first one,two,three,\@nil\@@nil. If there 607 | % are just one element #2 is \@nil, otherwise we have to remove 608 | % the trailing ,\@nil with enit@first@x 609 | % Called with the keys in \enit@c 610 | % Returns enit@toks 611 | 612 | \def\enit@first#1,#2\@@nil{% 613 | \in@{=}{#1}% Quick test, if contains =, it's key=value 614 | \ifin@\else 615 | \enitkv@@sp@def\enit@a{#1}% 616 | \@ifundefined{enitkv@enumitem@\enit@meaning\enit@a}% 617 | {\ifnum\enit@type=\z@ 618 | \def\enit@elt{\enit@replace\enit@a}% 619 | \enit@marklist % Returns \enit@toks 620 | \else 621 | \enit@toks{#1}% 622 | \fi 623 | \ifx\@nil#2% 624 | \ifx,#1,\else 625 | \edef\enit@c{label=\the\enit@toks}% 626 | \fi 627 | \else 628 | \@temptokena\expandafter{\enit@first@x#2}% 629 | \edef\enit@c{label=\the\enit@toks,\the\@temptokena}% 630 | \fi}% 631 | {}% 632 | \fi 633 | \enit@toks\expandafter{\enit@c}} 634 | 635 | \def\enit@first@x#1,\@nil{#1} 636 | 637 | \def\enit@replace#1#2#3{% 638 | \enit@toks{}% 639 | \def\enit@b##1#2##2\@@nil{% 640 | \ifx\@nil##2% 641 | \addto@hook\enit@toks{##1}% 642 | \else 643 | \edef\enit@a{\the\enit@toks}% 644 | \ifx\enit@a\@empty\else 645 | \enit@error{Extra short label ignored}% 646 | {There are more than one short label}% 647 | \fi 648 | \addto@hook\enit@toks{##1#3}% 649 | \enit@b##2\@@nil 650 | \fi}% 651 | \expandafter\enit@b#1#2\@nil\@@nil 652 | \edef#1{\the\enit@toks}} 653 | 654 | % Pre and post code 655 | % ================= 656 | 657 | \enitkv@key{enumitem}{before}{% 658 | \def\enit@before{#1}} 659 | 660 | \enitkv@key{enumitem}{after}{% 661 | \def\enit@after{#1}} 662 | 663 | \enitkv@key{enumitem}{before*}{% 664 | \expandafter\def\expandafter\enit@before\expandafter 665 | {\enit@before#1}} 666 | 667 | \enitkv@key{enumitem}{after*}{% 668 | \expandafter\def\expandafter\enit@after\expandafter 669 | {\enit@after#1}} 670 | 671 | % Miscelaneous keys 672 | % ================ 673 | 674 | \enitkv@key{enumitem}{nolistsep}[true]{% 675 | \partopsep=\z@skip 676 | \topsep=\z@ plus .1pt 677 | \itemsep=\z@skip 678 | \parsep=\z@skip} 679 | 680 | \enitkv@key{enumitem}{nosep}[true]{% 681 | \partopsep=\z@skip 682 | \topsep=\z@skip 683 | \itemsep=\z@skip 684 | \parsep=\z@skip} 685 | 686 | 687 | \enitkv@key{enumitem}{noitemsep}[true]{% 688 | \itemsep=\z@skip 689 | \parsep=\z@skip} 690 | 691 | \enitkv@key{enumitem}{wide}[\parindent]{% 692 | \enit@align@left 693 | \leftmargin\z@ 694 | \labelwidth\z@ 695 | \setlength\labelindent{#1}% 696 | \listparindent\labelindent 697 | \enit@calcset\itemindent\enit@iv!} 698 | 699 | % The following is deprecated in favour of wide: 700 | 701 | \enitkv@key{enumitem}{fullwidth}[true]{% 702 | \leftmargin\z@ 703 | \labelwidth\z@ 704 | \def\enit@align##1{\hskip\labelsep##1}} 705 | 706 | % "Abstract" layer 707 | % ================ 708 | % 709 | % Named values 710 | % ------------ 711 | 712 | \newcommand\SetEnumitemValue[2]{% Implicit #3 713 | \@ifundefined{enit@enitkv@#1}% 714 | {\@ifundefined{enitkv@enumitem@#1}% 715 | {\enit@error{Wrong key `#1' in \string\SetEnumitemValue}% 716 | {Perhaps you have misspelled it}}{}% 717 | \expandafter\let\csname enit@enitkv@#1\expandafter\endcsname 718 | \csname enitkv@enumitem@#1\endcsname}{}% 719 | \@namedef{enitkv@enumitem@#1}##1{% 720 | \def\enit@a{##1}% 721 | \@ifundefined{enit@enitkv@#1@\enit@meaning\enit@a}% 722 | {\@nameuse{enit@enitkv@#1}{##1}}% 723 | {\@nameuse{enit@enitkv@#1\expandafter\expandafter\expandafter}% 724 | \expandafter\expandafter\expandafter 725 | {\csname enit@enitkv@#1@##1\endcsname}}{}}% 726 | \@namedef{enit@enitkv@#1@#2}} 727 | 728 | % Defining keys 729 | % ------------- 730 | 731 | \newcommand\SetEnumitemKey[2]{% 732 | \@ifundefined{enitkv@enumitem@#1}% 733 | {\enitkv@key{enumitem}{#1}[]{\enitkv@setkeys{enumitem}{#2}}}% 734 | {\enit@error{Duplicated key `#1' in \string\SetEnumitemKey}% 735 | {There already exists a key with that name}}} 736 | 737 | % +=============================+ 738 | % | PROCESSING KEYS | 739 | % +=============================+ 740 | % 741 | % Set keys 742 | % ======== 743 | 744 | \def\enit@setkeys#1{% 745 | \@ifundefined{enit@@#1}{}% 746 | {\expandafter\expandafter\expandafter 747 | \enit@setkeys@i\csname enit@@#1\endcsname\@@}} 748 | 749 | % The following is used directly in resumeset: 750 | 751 | \def\enit@setkeys@i#1\@@{% 752 | \let\enit@delayedkeys\@empty 753 | \enit@shl{#1}% is or returns \enit@toks 754 | \expandafter\enit@setkeys@ii\the\enit@toks\@@} 755 | 756 | \def\enit@setkeys@ii#1\@@{% 757 | \enitkv@setkeys{enumitem}{#1}% 758 | \enit@toks\expandafter{\enit@delayedkeys}% 759 | \edef\enit@a{% 760 | \noexpand\enitkv@setkeys{enumitem-delayed}{\the\enit@toks}}% 761 | \enit@a} 762 | 763 | % Handling * and ! values 764 | % ======================= 765 | % 766 | % \@gobbletwo removes \c from \c@counter. 767 | 768 | \def\enit@getwidth#1#2#3#4{% 769 | \let#4#3% 770 | \def#3##1{% 771 | \@ifundefined{enit@widest\expandafter\@gobbletwo\string##1}% if no widest=key 772 | {#1}% 773 | {\csname enit@widest\expandafter\@gobbletwo\string##1\endcsname{#4}}}} 774 | 775 | \def\enit@valueerror#1{\z@ % if after an assignment, but doesn't catch \ifnum 776 | \enit@error{No default \string\value\space for `#1'}% 777 | {You can provide one with widest*}}% 778 | 779 | \let\enit@values\@empty 780 | 781 | \def\enit@calcwidth{% 782 | \ifenit@calcwidest 783 | \ifnum\enit@type=\z@ % ie, enum 784 | \@ifundefined{enit@cw@\@enumctr}% 785 | {\@namedef{enit@cv@\@enumctr}{\enit@valueerror\@enumctr}}% 786 | {\edef\enit@values{% 787 | \enit@values 788 | \@nameuse{c@\@enumctr}\@nameuse{enit@cw@\@enumctr}\relax}% 789 | \expandafter 790 | \edef\csname enit@cv@\@enumctr\endcsname 791 | {\@nameuse{c@\@enumctr}}}% 792 | \fi 793 | \begingroup 794 | \enit@values 795 | \def\value##1{\csname enit@cv@##1\endcsname}% 796 | \let\enit@elt\enit@getwidth 797 | \enit@labellist 798 | \settowidth\labelwidth{\@itemlabel}% 799 | \xdef\enit@a{\labelwidth\the\labelwidth\relax}% 800 | \endgroup 801 | \enit@a 802 | \fi 803 | \advance\dimen@-\labelwidth} 804 | 805 | \def\enit@calcleft{% 806 | \dimen@\leftmargin 807 | \advance\dimen@\itemindent 808 | \advance\dimen@-\labelsep 809 | \advance\dimen@-\labelindent 810 | \ifcase\enit@calc % = 0 = labelindent 811 | \enit@calcwidth 812 | \advance\labelindent\dimen@ 813 | \or % = 1 = labelwidth, so no \enit@calcwidth 814 | \labelwidth\dimen@ 815 | \or % = 2 = labelsep 816 | \enit@calcwidth 817 | \advance\labelsep\dimen@ 818 | \or % = 3 = leftmargin 819 | \enit@calcwidth 820 | \advance\leftmargin-\dimen@ 821 | \or % = 4 =itemindent 822 | \enit@calcwidth 823 | \advance\itemindent-\dimen@ 824 | \fi} 825 | 826 | % "Normalizing" labels 827 | % ==================== 828 | % 829 | % Replaces \counter* by \counter{level} (those in \enit@labellist). 830 | % 831 | % #1 is either \csname...\endcsmame or the container \@itemlabel -- 832 | % hence \expandafter 833 | 834 | \def\enit@refstar@i#1#2{% 835 | \if*#2\@empty 836 | \noexpand#1{\@enumctr}% 837 | \else 838 | \noexpand#1{#2}% 839 | \fi}% 840 | 841 | \def\enit@refstar#1#2#3#4{% 842 | \def#2{\enit@refstar@i#2}% 843 | \def#3{\enit@refstar@i#3}} 844 | 845 | \def\enit@normlabel#1#2{% 846 | \begingroup 847 | \def\value{\enit@refstar@i\value}% 848 | \let\enit@elt\enit@refstar 849 | \enit@labellist 850 | \protected@xdef\enit@a{{#2}}% Added braces as \ref is in the 851 | \endgroup 852 | \expandafter\let#1\enit@a} % global scope. 853 | 854 | % Preliminary settings and default values 855 | % ======================================= 856 | 857 | \def\enit@prelist#1#2#3{% 858 | \let\enit@type#1% 859 | \def\enit@depth{#2}% 860 | \edef\enit@prevlabel{#3\romannumeral#2}% 861 | \advance#2\@ne} 862 | 863 | \def\enit@preset#1#2#3{% 864 | \enit@sepfrommarginfalse 865 | \enit@calcwidestfalse 866 | \let\enit@resuming\z@ 867 | \let\enit@series\relax 868 | \enit@boxmodetrue 869 | \def\enit@itemjoin{ }% 870 | \let\enit@itemjoin@s\relax 871 | \let\enit@afterlabel\nobreakspace 872 | \let\enit@before\@empty 873 | \let\enit@after\@empty 874 | \let\enit@format\@firstofone % and NOT empty 875 | \let\enit@ref\relax 876 | \labelindent\z@skip 877 | \ifnum\@listdepth=\@ne 878 | \enit@outerparindent\parindent 879 | \else 880 | \parindent\enit@outerparindent 881 | \fi 882 | \enit@setkeys{list}% 883 | \enit@setkeys{list\romannumeral\@listdepth}% 884 | \enit@setkeys{#1}% 885 | \enit@setkeys{#1\romannumeral#2}% 886 | \enit@setresume{#3}} 887 | 888 | % keyval "error" in enumitem-resume: all undefined keys (ie, all 889 | % except resume*) are ignored, but is treated like 890 | % resume*= 891 | 892 | \def\enitkv@err@a#1{% 893 | \@ifundefined{enit@resumekeys@series@\@tempa}{}% 894 | {\@nameuse{enitkv@enumitem-resume@resume*\expandafter}% 895 | \expandafter{\@tempa}}} 896 | 897 | % keyval "error" in the optional argument: all undefined keys are 898 | % passed to the keyval error, but is ignored (already 899 | % processed in enumitem-resume 900 | 901 | \def\enitkv@err@b#1{% 902 | \@ifundefined{enit@resumekeys@series@\@tempa}% 903 | {\enit@savekverr{#1}}% 904 | {}} 905 | 906 | % Process keys in optional argument: 907 | 908 | \def\enit@setresume#1{% 909 | \enit@shl{#1}% Returns enit@toks 910 | \edef\enit@savekeys{\the\enit@toks}% 911 | \let\enit@savekverr\enitkv@errx 912 | \let\enitkv@errx\enitkv@err@a 913 | \edef\enit@b{% 914 | \noexpand\enitkv@setkeys{enumitem-resume}{\the\enit@toks}}% 915 | \enit@b 916 | \let\enitkv@errx\enitkv@err@b 917 | \ifcase\enit@resuming\or\or % = 2 918 | \expandafter 919 | \enit@setkeys@i\enit@resumekeys,resume=\enit@series\@@ 920 | \or % = 3 921 | \expandafter 922 | \enit@setkeys@i\enit@resumekeys,resume\@@ 923 | \fi 924 | \expandafter\enit@setkeys@i\enit@savekeys\@@ 925 | \let\enitkv@errx\enit@savekverr} 926 | 927 | % +=============================+ 928 | % | LIST TYPES | 929 | % +=============================+ 930 | % 931 | % Displayed lists 932 | % =============== 933 | % #1 #2 implicit 934 | 935 | \def\enit@dylist{% 936 | \enit@align@right 937 | \list} 938 | 939 | \def\enit@endlist{% 940 | \enit@after 941 | \endlist 942 | \ifx\enit@series\relax\else % discards resume*, too 943 | \ifnum\enit@resuming=\@ne % ie, series= 944 | \enit@setresumekeys{series@\enit@series}\global\global 945 | \else % ie, resume=, resume*= (save count, but not keys) 946 | \enit@setresumekeys{series@\enit@series}\@gobblefour\global 947 | \fi 948 | \enit@afterlist 949 | \fi 950 | \ifnum\enit@resuming=\thr@@ % ie, resume* list (save count only) 951 | \enit@setresumekeys\@currenvir\@gobblefour\global 952 | \else 953 | \enit@setresumekeys\@currenvir\@empty\@empty 954 | \fi 955 | \aftergroup\enit@afterlist} 956 | 957 | % #1 = either \@currenvir or series@ 958 | % #2(keys) #3(counter) are \global, \@gobblefour or \@empty 959 | 960 | \def\enit@setresumekeys#1#2#3{% 961 | \enit@toks\expandafter{\enit@savekeys}% 962 | \xdef\enit@afterlist{% 963 | #2\def\enit@noexcs{enit@resumekeys@#1}{\the\enit@toks}% 964 | \ifnum\enit@type=\z@ % ie, enum 965 | #3\def\enit@noexcs{enit@resume@#1}{% 966 | \csname c@\@listctr\endcsname 967 | \the\csname c@\@listctr\endcsname}% 968 | \fi}} 969 | 970 | % Inline lists 971 | % ============ 972 | 973 | % Definition of \@trivlist inside inline lists. So, when 974 | % \@trivlist is found in any displayed list (including quote, 975 | % center, verbatim...) the default \@item is restored. 976 | 977 | \def\enit@intrivlist{% 978 | \enit@changed@itemfalse 979 | \let\@item\enit@outer@item 980 | \let\par\@@par 981 | \let\@trivlist\enit@outer@triv 982 | \@trivlist} 983 | 984 | % Keep track of \@item and \item changes 985 | 986 | \newif\ifenit@changed@item 987 | \enit@changed@itemfalse 988 | 989 | \newif\ifenit@changeditem 990 | \enit@changeditemfalse 991 | 992 | % List 993 | % ---- 994 | 995 | % Arguments, as before: 996 | % \enitdp@, , , 997 | % About @newlist, see @initem. 998 | 999 | \def\enit@inlist#1#2{% 1000 | \ifnum\@listdepth>\enit@listdepth\relax 1001 | \@toodeep 1002 | \else 1003 | \global\advance\@listdepth\@ne 1004 | \fi 1005 | \let\enit@align\@firstofone 1006 | \def\@itemlabel{#1}% 1007 | \@nmbrlistfalse 1008 | \ifenit@changed@item\else 1009 | \enit@changed@itemtrue 1010 | \let\enit@outer@triv\@trivlist 1011 | \let\@trivlist\enit@intrivlist 1012 | \@setpar\@empty 1013 | \let\enit@outer@item\@item 1014 | \fi 1015 | #2\relax 1016 | \global\@newlisttrue 1017 | \ifenit@boxmode 1018 | \ifenit@changeditem\else 1019 | \enit@changeditemtrue 1020 | \let\enit@outeritem\item 1021 | \fi 1022 | \let\@item\enit@boxitem 1023 | \else 1024 | \let\@item\enit@noboxitem 1025 | \ifx\enit@itemjoin@s\relax\else 1026 | \PackageWarning{enumitem}% 1027 | {itemjoin* discarded in mode unboxed\MessageBreak}% 1028 | \fi 1029 | \fi 1030 | \let\enit@calcleft\relax 1031 | \let\enit@afteritem\relax 1032 | \ifenit@boxmode 1033 | \global\setbox\enit@inbox\hbox\bgroup\color@begingroup 1034 | \let\item\enit@endinbox 1035 | \fi 1036 | \ignorespaces} 1037 | 1038 | \def\enit@endinlist{% 1039 | \ifenit@boxmode 1040 | \unskip 1041 | \xdef\enit@afteritem{% 1042 | \ifhmode\spacefactor\the\spacefactor\relax\fi}% 1043 | \color@endgroup 1044 | \egroup 1045 | \ifdim\wd\enit@inbox=\z@ 1046 | \enit@itemerror 1047 | \else 1048 | \ifenit@noinitem\else 1049 | \ifhmode\unskip\fi 1050 | \@ifundefined{enit@itemjoin@s}% 1051 | {\enit@itemjoin}% 1052 | {\enit@itemjoin@s}% 1053 | \fi 1054 | \unhbox\@labels 1055 | \enit@afterlabel 1056 | \unhbox\enit@inbox 1057 | \enit@afteritem 1058 | \fi 1059 | \else 1060 | \unskip 1061 | \if@newlist 1062 | \enit@itemerror 1063 | \fi 1064 | \fi 1065 | \enit@after 1066 | \global\advance\@listdepth\m@ne 1067 | \global\@inlabelfalse 1068 | \if@newlist 1069 | \global\@newlistfalse 1070 | \@noitemerr 1071 | \fi 1072 | \ifx\enit@series\relax\else % discards resume* list, too 1073 | \ifnum\enit@resuming=\@ne % ie, series 1074 | \enit@setresumekeys{series@\enit@series}\global\global 1075 | \else % ie, resume, resume* (save count, but not keys) 1076 | \enit@setresumekeys{series@\enit@series}\@gobblefour\global 1077 | \fi 1078 | \enit@afterlist 1079 | \fi 1080 | \ifnum\enit@resuming=\thr@@ % ie, resume* list (save count only) 1081 | \enit@setresumekeys\@currenvir\@gobblefour\global 1082 | \else 1083 | \enit@setresumekeys\@currenvir\@empty\@empty 1084 | \fi 1085 | \aftergroup\enit@afterlist} 1086 | 1087 | % \@item: unboxed 1088 | % --------------- 1089 | 1090 | \def\enit@noboxitem[#1]{% 1091 | \if@newlist 1092 | \leavevmode % ships pending labels out 1093 | \global\@newlistfalse 1094 | \else 1095 | \ifhmode 1096 | \unskip 1097 | \enit@itemjoin 1098 | \else 1099 | \noindent 1100 | \fi 1101 | \fi 1102 | \if@noitemarg 1103 | \@noitemargfalse 1104 | \if@nmbrlist 1105 | \refstepcounter{\@listctr}% after \unskip (hyperref) 1106 | \fi 1107 | \fi 1108 | \mbox{\makelabel{#1}}% 1109 | \enit@afterlabel 1110 | \ignorespaces} 1111 | 1112 | % \@item: boxed 1113 | % ------------ 1114 | % 1115 | % We don't want \item to be executed locally, because it sets a flag 1116 | % (and hyperref adds another flag, too). So, we redefine it inside 1117 | % the box to \enit@endinbox which ends the box and then use the actual 1118 | % (outer) \item. labels are stored in another box, to detect empty 1119 | % boxes, ie, misplaced \item's. Note the 2nd \item ends collecting 1120 | % the 1st item and ships it out, while the 3rd \item ends collecting 1121 | % the 2nd item, puts the itemjoin and then ships the 2nd item out. 1122 | % The flag enit@noinitem keeps track of that. 1123 | 1124 | \newif\ifenit@noinitem 1125 | 1126 | \def\enit@endinbox{% 1127 | \unskip 1128 | \xdef\enit@afteritem{% 1129 | \ifhmode\spacefactor\the\spacefactor\relax\fi}% 1130 | \color@endgroup 1131 | \egroup 1132 | \enit@outeritem} 1133 | 1134 | \def\enit@boxitem[#1]{% 1135 | \if@newlist 1136 | \global\@newlistfalse 1137 | \ifdim\wd\enit@inbox>\z@ 1138 | \enit@itemerror 1139 | \fi 1140 | \enit@noinitemtrue 1141 | \leavevmode % ships pending labels out 1142 | \else 1143 | \ifdim\wd\enit@inbox=\z@ 1144 | \enit@itemerror 1145 | \else 1146 | \ifenit@noinitem 1147 | \enit@noinitemfalse 1148 | \else 1149 | \ifhmode\unskip\fi 1150 | \enit@itemjoin 1151 | \fi 1152 | \unhbox\@labels 1153 | \enit@afterlabel 1154 | \unhbox\enit@inbox 1155 | \enit@afteritem 1156 | \fi 1157 | \fi 1158 | \if@noitemarg 1159 | \@noitemargfalse 1160 | \if@nmbrlist 1161 | \refstepcounter{\@listctr}% 1162 | \fi 1163 | \fi 1164 | \sbox\@labels{\makelabel{#1}}% 1165 | \let\enit@afteritem\relax 1166 | \setbox\enit@inbox\hbox\bgroup\color@begingroup 1167 | \let\item\enit@endinbox 1168 | \hskip1sp % in case the first thing is \label 1169 | \ignorespaces} 1170 | 1171 | % Pause item 1172 | % ---------- 1173 | % 1174 | % To do. 1175 | % 1176 | % The three types 1177 | % =============== 1178 | % 1179 | % enumerate and enumerate* 1180 | % ------------------------ 1181 | % 1182 | % The following has 4 arguments, which in enumerate are: 1183 | % \@enumdepth, enum, \thr@@, . 1184 | % In user defined environments they are: 1185 | % \enitdp@, , , 1186 | 1187 | \def\enit@enumerate{% 1188 | \let\enit@list\enit@dylist 1189 | \enit@enumerate@i} 1190 | 1191 | \@namedef{enit@enumerate*}{% 1192 | \let\enit@list\enit@inlist 1193 | \enit@enumerate@i} 1194 | 1195 | \def\enit@enumerate@i#1#2#3#4{% 1196 | \ifnum#1>#3\relax 1197 | \enit@toodeep 1198 | \else 1199 | \enit@prelist\z@{#1}{#2}% 1200 | \edef\@enumctr{#2\romannumeral#1}% 1201 | \expandafter 1202 | \enit@list 1203 | \csname label\@enumctr\endcsname 1204 | {\usecounter\@enumctr 1205 | \let\enit@calc\z@ 1206 | \def\makelabel##1{\enit@align{\enit@format{##1}}}% 1207 | \enit@preset{#2}{#1}{#4}% 1208 | \enit@normlabel\@itemlabel\@itemlabel 1209 | \enit@ref 1210 | \enit@calcleft 1211 | \enit@before}% 1212 | \fi} 1213 | 1214 | \let\enit@endenumerate\enit@endlist 1215 | \@namedef{enit@endenumerate*}{\enit@endinlist} 1216 | 1217 | % itemize and itemize* 1218 | % -------------------- 1219 | % 1220 | % The following has 4 arguments, which in itemize are: 1221 | % \@itemdepth, item, \thr@@, . 1222 | % In user defined environments they are: 1223 | % \enitdp@, , , 1224 | 1225 | \def\enit@itemize{% 1226 | \let\enit@list\enit@dylist 1227 | \enit@itemize@i} 1228 | 1229 | \@namedef{enit@itemize*}{% 1230 | \let\enit@list\enit@inlist 1231 | \enit@itemize@i} 1232 | 1233 | \def\enit@itemize@i#1#2#3#4{% 1234 | \ifnum#1>#3\relax 1235 | \enit@toodeep 1236 | \else 1237 | \enit@prelist\@ne{#1}{#2}% 1238 | \edef\@itemitem{label#2\romannumeral#1}% 1239 | \expandafter 1240 | \enit@list 1241 | \csname\@itemitem\endcsname 1242 | {\let\enit@calc\z@ 1243 | \def\makelabel##1{\enit@align{\enit@format{##1}}}% 1244 | \enit@preset{#2}{#1}{#4}% 1245 | \enit@calcleft 1246 | \enit@before}% 1247 | \fi} 1248 | 1249 | \let\enit@enditemize\enit@endlist 1250 | \@namedef{enit@enditemize*}{\enit@endinlist} 1251 | 1252 | % description and description* 1253 | % ---------------------------- 1254 | % 1255 | % Make sure \descriptionlabel exists: 1256 | 1257 | \providecommand*\descriptionlabel[1]{% 1258 | \hspace\labelsep 1259 | \normalfont\bfseries#1} 1260 | 1261 | \@namedef{enit@description*}{% 1262 | \let\enit@list\enit@inlist 1263 | \enit@description@i} 1264 | 1265 | \def\enit@description{% 1266 | \let\enit@list\enit@dylist 1267 | \enit@description@i} 1268 | 1269 | \def\enit@description@i#1#2#3#4{% 1270 | \ifnum#1>#3\relax 1271 | \enit@toodeep 1272 | \else 1273 | \enit@list{}% 1274 | {\let\enit@type\tw@ 1275 | \advance#1\@ne 1276 | \labelwidth\z@ 1277 | \enit@align@left 1278 | \let\makelabel\descriptionlabel 1279 | \enit@style@standard 1280 | \enit@preset{#2}{#1}{#4}% 1281 | \enit@calcleft 1282 | \let\enit@svlabel\makelabel 1283 | \def\makelabel##1{% 1284 | \labelsep\z@ 1285 | \ifenit@boxdesc 1286 | \enit@svlabel{\enit@align{\enit@format{##1}}}% 1287 | \else 1288 | \nobreak 1289 | \enit@svlabel{\enit@format{##1}}% 1290 | \aftergroup\enit@postlabel 1291 | \fi}% 1292 | \enit@before}% 1293 | \fi} 1294 | 1295 | \let\enit@enddescription\enit@endlist 1296 | \@namedef{enit@enddescription*}{\enit@endinlist} 1297 | 1298 | % trivlist 1299 | % ======== 1300 | 1301 | \def\enit@trivlist{% 1302 | \let\enit@type\tw@ 1303 | \parsep\parskip 1304 | \csname @list\romannumeral\the\@listdepth\endcsname 1305 | \@nmbrlistfalse 1306 | \enit@setkeys{trivlist}% 1307 | \enit@setkeys{trivlist\romannumeral\@listdepth}% 1308 | \@trivlist 1309 | \labelwidth\z@ 1310 | \leftmargin\z@ 1311 | \itemindent\z@ 1312 | \let\@itemlabel\@empty 1313 | \def\makelabel##1{##1}} 1314 | 1315 | % Description styles 1316 | % ================== 1317 | % 1318 | % the next definition is somewhat tricky because labels are boxed. 1319 | % That's fine when the label is just placed at the begining of a line 1320 | % of text, but when the box is placed without horizontal material, 1321 | % leading is killed. So, we need change somehow \box to \unhbox, but 1322 | % I don't want to modify \@item. The code below presumes \@item has 1323 | % not been changed and arguments gobble the part setting \@labels, 1324 | % which is replaced by a new one. 1325 | % 1326 | % The default value in description is itemindent=!, but some styles 1327 | % (those whose item text begin at a fixed place, ie, nextline, 1328 | % multiline and sameline) change it to labelwidth=!. 1329 | % 1330 | % We must be careful with the group and the whatsit added by color to 1331 | % boxes. Alignment is applied here and some adjustments in skips are 1332 | % necessary to get proper line breaks (including a \nobreak at the 1333 | % beginning of \enit@align, ie, after the first whatsit, see above). 1334 | % To "pass" the inner group added by color to the box, \enit@postlabel 1335 | % ckecks if the following is }. ie, \egroup -- if not, the box has 1336 | % not reached yet its end. 1337 | 1338 | \def\enit@postlabel{% 1339 | \@ifnextchar\egroup 1340 | {\aftergroup\enit@postlabel}% 1341 | {\enit@postlabel@i}} 1342 | 1343 | \def\enit@postlabel@i#1#2#3#4#5{% 1344 | \def\enit@lblpenalty{\penalty\z@\hskip\skip@}% 1345 | \ifenit@nextline 1346 | \ifdim\wd\@tempboxa>\labelwidth 1347 | \def\enit@lblpenalty{\newline\@nobreaktrue}% 1348 | \fi 1349 | \fi 1350 | \everypar{% 1351 | \@minipagefalse 1352 | \global\@newlistfalse 1353 | \if@inlabel 1354 | \global\@inlabelfalse 1355 | {\setbox\z@\lastbox 1356 | \ifvoid\z@ 1357 | \kern-\itemindent 1358 | \fi}% 1359 | \unhbox\@labels 1360 | \skip@\lastskip % Save last \labelsep 1361 | \unskip % Remove it 1362 | \enit@lblpenalty % Restore it, after penalty 1363 | \fi 1364 | \if@nobreak 1365 | \@nobreakfalse 1366 | \clubpenalty\@M 1367 | \else 1368 | \clubpenalty\@clubpenalty 1369 | \everypar{}% 1370 | \fi}% 1371 | \def\enit@a{#1#2#3#4}% 1372 | \def\enit@b{\global\setbox\@labels\hbox}% 1373 | \ifx\enit@a\enit@b\else 1374 | \enit@error{Non standard \string\item}% 1375 | {A class or a package has redefined \string\item\MessageBreak 1376 | and I do not know how to continue}% 1377 | \fi 1378 | \global\setbox\@labels\hbox{% 1379 | \unhbox\@labels 1380 | \hskip\itemindent 1381 | \hskip-\labelwidth 1382 | \hskip-\labelsep 1383 | \ifdim\wd\@tempboxa>\labelwidth 1384 | \enit@align{\unhbox\@tempboxa}\unskip % Removes (typically) \hfil 1385 | \else 1386 | \leavevmode\hbox to\labelwidth{\enit@align{\unhbox\@tempboxa}}% 1387 | \fi 1388 | \hskip\labelsep}} 1389 | 1390 | % +=============================+ 1391 | % | (RE)DEFINING LISTS | 1392 | % +=============================+ 1393 | % 1394 | % Set keys/values 1395 | % =============== 1396 | % Remember \romannumeral0 expands to nothing. 1397 | % #1 = list name, #2 = level, #3 = flag if star, #4 = keys/values 1398 | 1399 | \def\enit@saveset#1#2#3#4{% 1400 | \setcounter{enit@cnt}{#2}% 1401 | \ifcase#3% 1402 | \expandafter 1403 | \def\csname enit@@#1\romannumeral\c@enit@cnt\endcsname{#4}% 1404 | \or 1405 | \expandafter\let\expandafter\enit@b 1406 | \csname enit@@#1\romannumeral\c@enit@cnt\endcsname 1407 | \ifx\enit@b\relax 1408 | \let\enit@b\@empty 1409 | \fi 1410 | \expandafter\def 1411 | \csname enit@@#1\romannumeral\c@enit@cnt\expandafter\endcsname 1412 | \expandafter{\enit@b,#4}% 1413 | \fi} 1414 | 1415 | % To do: more robust tests (catch wrong names, but not easy) 1416 | 1417 | % Internally, LaTeX uses a short name for enumerate (enum) 1418 | % and itemize (item). To be consistent with this convention, 1419 | % a couple of macros provide a "translation". I'm not very 1420 | % happy with the current implementation. 1421 | 1422 | \def\enit@shortenumerate{enum} 1423 | \def\enit@shortitemize{item} 1424 | 1425 | \newcommand\setlist{% 1426 | \@ifstar{\enit@setlist\@ne}{\enit@setlist\z@}} 1427 | 1428 | \def\enit@setlist#1{% 1429 | \@ifnextchar[{\enit@setlist@x#1}{\enit@setlist@i#1\@empty}} 1430 | 1431 | % Let's accept \setlist[]*{}, too, because an error in <=3.5.1 1432 | 1433 | \def\enit@setlist@x#1[#2]{% 1434 | \@ifstar{\enit@setlist@i\@ne{#2}}{\enit@setlist@i#1{#2}}} 1435 | 1436 | % #1 list names/levels, #2 keys/values 1437 | 1438 | % #1 star flag, #2 list names/levels, #3 keys/values 1439 | 1440 | \def\enit@setlist@i#1#2#3{% 1441 | \let\enit@eltnames\relax 1442 | \let\enit@b\@empty 1443 | \let\enit@eltlevels\relax 1444 | \let\enit@c\@empty 1445 | \protected@edef\enit@a{#2}% 1446 | \@for\enit@a:=\enit@a\do{% the 2nd enit@a is first expanded 1447 | \@ifundefined{enitdp@\enit@meaning\enit@a}% 1448 | {\edef\enit@c{\enit@c\enit@eltlevels{\enit@a}}}% 1449 | {\@ifundefined{enit@short\enit@meaning\enit@a}% 1450 | \@empty 1451 | {\edef\enit@a{\@nameuse{enit@short\enit@a}}}% 1452 | \edef\enit@b{\enit@b\enit@eltnames{\enit@a}}}}% 1453 | \ifx\enit@b\@empty 1454 | \def\enit@b{\enit@eltnames{list}}% 1455 | \fi 1456 | \ifx\enit@c\@empty 1457 | \def\enit@c{\enit@eltlevels{0}}% 1458 | \fi 1459 | \def\enit@eltnames##1{% 1460 | \def\enit@a{##1}% 1461 | \enit@c}% 1462 | \def\enit@eltlevels##1{% 1463 | \enit@saveset\enit@a{##1}#1{#3}}% 1464 | \enit@b}% 1465 | 1466 | % Deprecated: 1467 | 1468 | \newcommand\setdisplayed[1][0]{\setlist[trivlist,#1]} 1469 | \let\enitdp@trivlist\@empty % dummy, let know it exists 1470 | \newcommand\setenumerate[1][0]{\setlist[enumerate,#1]} 1471 | \newcommand\setitemize[1][0]{\setlist[itemize,#1]} 1472 | \newcommand\setdescription[1][0]{\setlist[description,#1]} 1473 | 1474 | % New lists 1475 | % ========= 1476 | 1477 | % When defining a list, \label... and counters must be defined 1478 | % for each level, too: 1479 | 1480 | \def\enit@xset@itemize{% 1481 | \@namedef{label\enit@c\romannumeral\count@}{% 1482 | \enit@error{Undefined label}% 1483 | {You have defined a list, but labels have 1484 | not been setup.\MessageBreak 1485 | You can set the label field with \string\setlist.}}} 1486 | \@namedef{enit@xset@itemize*}{\enit@xset@itemize} 1487 | 1488 | \def\enit@xset@enumerate{% 1489 | \enit@xset@itemize 1490 | \@ifundefined{c@\enit@c\romannumeral\count@}% 1491 | {\@definecounter{\enit@c\romannumeral\count@}}{}} 1492 | \@namedef{enit@xset@enumerate*}{\enit@xset@enumerate} 1493 | 1494 | \let\enit@xset@description\@empty 1495 | \@namedef{enit@xset@description*}{\enit@xset@description} 1496 | 1497 | \newcommand\newlist{\enit@newlist\newenvironment} 1498 | \newcommand\renewlist{\enit@newlist\renewenvironment} 1499 | 1500 | % , , , 1501 | 1502 | \def\enit@newlist#1#2#3#4{% 1503 | \@ifundefined{enit@xset@#3}% 1504 | {\enit@error{Unknown list type `#3')}% 1505 | {Valid types are: 1506 | enumerate, itemize, description,\messageBreak 1507 | enumerate*, itemize*, description*}}% 1508 | {}% 1509 | \setcounter{enit@cnt}{#4}% 1510 | \count@\@ne 1511 | \@ifundefined{enit@short#2}% 1512 | {\def\enit@c{#2}}% 1513 | {\edef\enit@c{\csname enit@short#2\endcsname}}% 1514 | \loop 1515 | \@nameuse{enit@xset@#3}% Uses \enit@c 1516 | \ifnum\count@<\c@enit@cnt 1517 | \advance\count@\@ne 1518 | \repeat 1519 | \@ifundefined{enitdp@#2}% 1520 | {\expandafter\newcount\csname enitdp@#2\endcsname}{}% 1521 | \csname enitdp@#2\endcsname\z@ 1522 | \advance\c@enit@cnt\m@ne 1523 | \edef\enit@a{% 1524 | \noexpand#1{#2}[1][]% 1525 | {\enit@noexcs{enit@#3}% 1526 | \enit@noexcs{enitdp@#2}% 1527 | {\enit@c}% 1528 | {\the\c@enit@cnt}% 1529 | {####1}}% 1530 | {\enit@noexcs{enit@end#3}}}% 1531 | \enit@a} 1532 | 1533 | % Changing the default nesting limit 1534 | % ---------------------------------- 1535 | 1536 | \newcommand\setlistdepth{\def\enit@listdepth} 1537 | \setlistdepth{5} 1538 | 1539 | % +=============================+ 1540 | % | PACKAGE OPTIONS | 1541 | % +=============================+ 1542 | 1543 | \newif\ifenit@loadonly 1544 | 1545 | \DeclareOption{ignoredisplayed}{\let\enit@trivlist\trivlist} 1546 | \DeclareOption{loadonly}{\enit@loadonlytrue} 1547 | \DeclareOption{shortlabels} 1548 | {\def\enit@shl#1{% 1549 | \ifnum\enit@type=\tw@ 1550 | \enit@toks{#1}% 1551 | \else 1552 | \def\enit@c{#1}% 1553 | \enit@first#1,\@nil\@@nil % Returns enit@toks 1554 | \fi}} 1555 | \DeclareOption{inline} 1556 | {\newenvironment{enumerate*}[1][]% 1557 | {\@nameuse{enit@enumerate*}\enitdp@enumerate{enum}\thr@@{#1}} 1558 | {\@nameuse{enit@endenumerate*}} 1559 | \newenvironment{itemize*}[1][]% 1560 | {\@nameuse{enit@itemize*}\enitdp@itemize{item}\thr@@{#1}} 1561 | {\@nameuse{enit@enditemize*}} 1562 | \newenvironment{description*}[1][]% 1563 | {\@nameuse{enit@description*}\enitdp@description{description}\@M{#1}} 1564 | {\@nameuse{enit@enddescription*}}} 1565 | 1566 | \let\enit@shl\enit@toks 1567 | 1568 | \ProcessOptions 1569 | 1570 | \let\trivlist\enit@trivlist 1571 | 1572 | % If there is no loadonly, redefine the basic lists: 1573 | 1574 | \ifenit@loadonly\else 1575 | 1576 | \let\enitdp@enumerate\@enumdepth 1577 | \renewenvironment{enumerate}[1][] 1578 | {\enit@enumerate\enitdp@enumerate{enum}\thr@@{#1}} 1579 | {\enit@endenumerate} 1580 | 1581 | \let\enitdp@itemize\@itemdepth 1582 | \renewenvironment{itemize}[1][] 1583 | {\enit@itemize\enitdp@itemize{item}\thr@@{#1}} 1584 | {\enit@enditemize} 1585 | 1586 | \newcount\enitdp@description 1587 | \renewenvironment{description}[1][] 1588 | {\enit@description\enitdp@description{description}\@M{#1}} 1589 | {\enit@enddescription} 1590 | 1591 | \fi 1592 | 1593 | \endinput 1594 | -------------------------------------------------------------------------------- /main.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ashish1294/resume/edafc0005d97cf5f24fc1b66ca1ec8ccba0a33ca/main.pdf -------------------------------------------------------------------------------- /main.tex: -------------------------------------------------------------------------------- 1 | %---------------------------------------------------------------------------------------- 2 | % PACKAGES AND OTHER DOCUMENT CONFIGURATIONS 3 | %---------------------------------------------------------------------------------------- 4 | \documentclass[margin, centered]{res} 5 | \topmargin=-0.5in 6 | \oddsidemargin -.5in 7 | \evensidemargin -.5in 8 | \textwidth=6.5in 9 | \itemsep=0in 10 | \parsep=0in 11 | \newsectionwidth{1in} 12 | \usepackage[pdftex]{graphicx} 13 | \usepackage{enumitem} 14 | \usepackage{wrapfig} 15 | \usepackage{helvet} 16 | \usepackage[colorlinks = true, 17 | linkcolor = blue, 18 | urlcolor = blue, 19 | citecolor = blue, 20 | anchorcolor = blue]{hyperref} 21 | \setlength{\textwidth}{6.5in} % Text width of the document 22 | \setlength{\textheight}{720pt} 23 | 24 | \begin{document} 25 | 26 | %---------------------------------------------------------------------------------------- 27 | % NAME AND ADDRESS SECTION 28 | %----------------------------------------------------------------------------------------\ 29 | \begin{center} 30 | \hspace{-\hoffset} 31 | \huge\bf{\href{https://www.ashishkedia.me}{Ashish Kedia}} 32 | \end{center} 33 | \vspace{-7mm} 34 | \moveleft\hoffset\vbox{\hrule width 19cm height 0.5pt} 35 | \vspace{-9mm} 36 | \begin{center} 37 | \hspace{-\hoffset} 38 | \href{mailto:ashish1294@gmail.com}{ashish1294@gmail.com} ~\textbullet~ \(+91\) 9986978059 ~\textbullet~ \#C501, Mega Tower 1, NITK, Mangalore, India 39 | \end{center} 40 | \vspace{-7mm} 41 | \begin{resume} 42 | 43 | %---------------------------------------------------------------------------------------- 44 | % EDUCATION SECTION 45 | %---------------------------------------------------------------------------------------- 46 | \section{Education} 47 | \textbf{B.Tech in Information Technology, Senior Year} \hfill 2012 - 2016 \\ 48 | \href{http://nitk.ac.in/}{National Institute of Technology Karnataka, Surathkal, India} 49 | \begin{itemize} 50 | \item CGPA of \textbf{9.47}/10 (Dec 2015) 51 | \end{itemize} 52 | \textbf{High School} - \href{http://www.birlahighschool.com/}{Birla High School, Kolkata} (CBSE) - 92.4\% \hfill 2010 - 2012 \\ 53 | \textbf{Secondary School} - Nopany High, Kolkata (WBBSE) - 85\% \hfill 2000 - 2010 54 | 55 | %---------------------------------------------------------------------------------------- 56 | % EXPERIENCE SECTION 57 | %---------------------------------------------------------------------------------------- 58 | \section{Experience} 59 | \textbf{Software Engineering Intern, \href{http://www.google.com}{Google, San Francisco}} \hfill May, 2015 - July, 2015\\ 60 | Worked with the Cloud Datastore Team to create a sample application that demonstrates the best practices to use datastore. The django application uses NDB API and will help programmers acquainted with relational databases to model and build a scalable application with datastore. The application is accompanied by a blog post that discusses several design patterns that the application developers might encounter. \\ 61 | \\ 62 | \textbf{Software Engineering Intern, \href{http://www.simplewealth.in/}{SimpleWealth, Bangalore}} \hfill Dec, 2014 \\ 63 | Designed and Implemented cloud data synchronization mechanism between Android clients and Rails-based server. Optimization for slow and erratic network included data compression and batching of network, I/O operations. Implemented an efficient sync scheduling algorithm to save power and ensure fault tolerance. New method was found to be 36\% faster and consumed 23\% less bandwidth. \\ 64 | \\ 65 | \textbf{Summer Research Intern in Fundamental Research Group, \href{http://www.cse.iitb.ac.in/}{IIT Bombay}} \\ 66 | \emph{Mentored by \href{http://en.wikipedia.org/wiki/Deepak_B._Phatak}{Prof. Deepak B Phatak, Dept. of CSE, IIT Bombay}} \hfill May, 2014 - July, 2014 \\ 67 | Developed algorithms for User-Modeling, Content-Modeling and Adaptive Engine on EdX. Implemented semi-automatic concept mapping, recommendation algorithms like collaborative filtering, Pearson coefficient, deviation method and artificial ant colony method. A Persiva-like system evaluation model was also implemented. 78\% users found it helpful and average course completion time was reduced by 30\%\\ 68 | \\ 69 | \textbf{Summer Trainee, \href{http://www.globsynskills.com/gfs/}{Globsyn Finishing School}} \hfill May, 2013 - July, 2013 \\ 70 | 160 hrs of training in Web Development(PHP, HTML5, CSS3, MySQL, JQuery, Bootstrap) and Android Application Development. 71 | 72 | %---------------------------------------------------------------------------------------- 73 | % TECHNICAL SKILLS SECTION 74 | %---------------------------------------------------------------------------------------- 75 | \section{Technical \hspace{2mm} Skills} 76 | \textbf{Strongest Areas} - Databases, Algorithms, Parallel Programming \\ 77 | \textbf{Languages} - C, Python, Java, C++, PHP, Shell Script, JS\\ 78 | \textbf{Tools/Frameworks} - Django, JQuery, STL, \LaTeX, MySQL, SQLite, OpenMP, OpenGL, MPI, BLAS, Git 79 | 80 | %--------------------------------------------------------------------------------------- 81 | % PUBLICATION SECTION 82 | %--------------------------------------------------------------------------------------- 83 | 84 | \section{Publications} 85 | \begin{itemize}[leftmargin=*] 86 | \item Devanshu J, \textbf{Ashish K}, Rakshit S, Sameer S, ``Recommendation Techniques for Adaptive E-learning'', Advances in Computer Science and Information Technology, vol. 2, No. 1, 2015. \href{https://drive.google.com/file/d/0B6A-3_6rwie9bS1OaFdzbW9BZXM/view?usp=sharing}{view here} 87 | \item \textbf{Ashish Kedia} and Anusha Prakash, "Data Synchronization on Android Clients", International Conference on Communication Software and Networks, June 6-7$^{th}$, 2015, Chengdu, China. \href{http://ieeexplore.ieee.org/xpl/articleDetails.jsp?reload=true&arnumber=7296156}{view here} 88 | \end{itemize} 89 | 90 | %---------------------------------------------------------------------------------------- 91 | % RELEVANT COURSE SECTION 92 | %---------------------------------------------------------------------------------------- 93 | \section{Relevant \hspace{2mm} Courses} 94 | Data Structures and Algorithms, Operating System, Computer Graphics, Unix Programming, Advance Computer Networks, Databases, Automata Theory, Parallel Computing, Distributed Computing, Information Security, Human Computer Interaction, Software Engineering 95 | 96 | %---------------------------------------------------------------------------------------- 97 | % Selected Projects Section 98 | %---------------------------------------------------------------------------------------- 99 | \section{Selected Projects} 100 | All projects available on git : \url{https://www.github.com/ashish1294} 101 | %\setlist[itemize]{ 102 | \begin{itemize}[leftmargin=*] 103 | \item \textbf{\href{https://github.com/Bug-Assassins/DFC_query_builder}{DFC Query Builder}} : A mini-scale Database Engine using C. Features include buffer management, Query Optimization, Indexing using B+ Trees, Temporary Tables, Batching, Custom block size and GUI (web based) Query generator in PHP which communicates with DB server in C++ using sockets. 104 | \item \textbf{\href{https://github.com/Bug-Assassins/Relational-Graph-Database}{Storage Engine for RDBMS}} - Developed a new graph-based storage model for Relational Databases that can perform join queries in linear time. The time for aggregate queries also varies linearly with size of result set. Sample implementation in C++ where data was stored in-memory. 105 | \item \textbf{\href{https://github.com/Bug-Assassins/web_service_retrieval}{Web Service Retrieval}} : Wrote scripts to crawl, extract and index over 1000+ service description (OWLS) files. Used interface information to build a search engine that compares 7 categories of keywords. Used NLP techniques on text description find semantics and search services via context matching. 106 | \item \textbf{\href{https://github.com/ashish1294/ChessOOP}{Chess Game}} : A GUI based Chess game in JAVA for two players that implements all major OOP Concepts. Techniques like backtracking and Greedy Approach was used to determine possible moves. Files were used for storing statistics. 107 | \item \textbf{\href{https://github.com/Bug-Assassins/Galaxian}{Galaxian}} : An OpenGL based classic 2D shooting game in C++. Features include collision detection algorithms, double buffering to provide high FPS flicker-free 2D animations, mouse controls, hot keys and space simulation. Statistics and settings stored using files. 108 | \item \textbf{\href{https://github.com/Bug-Assassins/TAJ-Defender}{TAJ Defender}} : A sand-boxing mechanism for C and C++ codes using SEACOMP to prevent system calls. Features include custom malloc() using mmap, Resource-time \& time-limit for code execution 109 | \item \textbf{\href{https://github.com/Bug-Assassins/Konnect}{Konnect}} : A mini-scale TCP/IP stack for file transfer from one system to another system over a network using C. Features includes headers of all 4 Layers, CRC error check, TCP Handshaking and flow control. 110 | \item \textbf{\href{https://github.com/ashish1294/flint2}{FLINT}} : Open-Source Contribution to FLINT (Fast Library for Integer Arithmetic) involving algorithms for Matrices over finite field - Patterson Stockmeyer Algorithm, Matrix Squaring, Level 3 BLAS in Matrix Multiplication and benchmarking results of all optimizations. 111 | \item \textbf{\href{https://github.com/ashish1294/DigitalPassbook}{Digital Passbook}} : An Android App to keep track of all transactions across multiple bank accounts. 112 | \item \textbf{\href{https://github.com/ashish1294/OnlineBankingPHP}{Online Banking}} : Uses PHP and MySQL - Transaction Management, Loans, Cheque, Fund Transfers. 113 | \item \textbf{\href{https://github.com/ashish1294/SGC-App}{SGC APP}} : An android application for Star Gazing Club, NITK - Included a digital magazine reader. 114 | \item \textbf{\href{https://github.com/ashish1294/code-now-CodeChef}{CodeChef Code Now}} : A chrome extension to instantly open up user's favorite IDE directly from the problem page on CodeChef, SPOJ or CodeForces. Uses chrome Native Messaging. 115 | \item \textbf{\href{}{Drive Assist}} : An app that uses Kinect v2 for Windows to detect if driver is drowsy using facial features. 116 | \end{itemize} 117 | 118 | %---------------------------------------------------------------------------------------- 119 | % ACHIEVEMENT SECTION 120 | %---------------------------------------------------------------------------------------- 121 | 122 | \section{Achievements and Awards} 123 | \begin{itemize}[leftmargin=*] 124 | \item Selected for prestigious \href{http://www.kvpy.org.in/main/}{\emph{Kishore Vaigyanik Protsahan Yojana}} Scholarship in 2012 125 | \item Selected for \href{https://www.mitacs.ca/en/programs/globalink/globalink-research-internship}{Mitacs Globlink Research Intern} Scholarship in Canada 126 | \item Selected for \href{https://www.daad.de/deutschland/stipendium/datenbank/en/21148-scholarship-database/?status=1&origin=4&subjectGrps=&daad=1&q=wise&page=1&detail=50015295}{DAAD WISE Scholarship} for Research Internship in Germany 127 | \item Runners Up in Microsoft's 24-hr National Hackathon - \href{https://www.acadaccelerator.com/}{Code.Fun.Do}, Best Design Award 128 | \item Most tech savvy idea - Quik View (Data Visualization App) in \href{http://www.venturesity.com/challenge/id/73}{Quikr Hackathon}, 2015 129 | \item Selected of \href{http://icpc.amrita.ac.in/2014/}{ACM ICPC Amritapuri Onsite} Nationals in 2013, 2014 130 | \item 4th in India in \href{http://www.ieee.org/membership_services/membership/students/competitions/xtreme/index.html}{IEEE Xtreme 7.0} - 24hr Coding Contest 131 | \item National Finalist in Mathematics and Cyber Olympiads 132 | \item Active participation on online competitive coding websites - \href{http://www.codechef.com/users/ashish1294}{CodeChef}, \href{http://www.spoj.com/users/ashish1294/}{Spoj}, \href{http://community.topcoder.com/tc?module=MemberProfile&cr=23303026}{TopCoder}, \href{http://codeforces.com/profile/ashish1294}{CodeForces}, etc. Member Handle - ashish1294 133 | \item Convenor (Head) of Web Enthusiast's Club, NITK 134 | \item Joint Convernor of Computer Science Events, Engineer 2015 - Tech Fest of NITK, Surathkal 135 | \end{itemize} 136 | 137 | %---------------------------------------------------------------------------------------- 138 | % HOBBIES SECTION 139 | %---------------------------------------------------------------------------------------- 140 | 141 | \section{Hobbies} 142 | Competitive Coding, Watching Documentaries, Star Gazing, Editing Wiki Pages, Solving Puzzle 143 | 144 | \section{More} 145 | Please visit \href{https://www.ashishkedia.me}{https://www.ashishkedia.me} 146 | 147 | \end{resume} 148 | \end{document} -------------------------------------------------------------------------------- /res.cls: -------------------------------------------------------------------------------- 1 | % RESUME DOCUMENT STYLE -- Released 23 Nov 1989 2 | % for LaTeX version 2.09 3 | % Copyright (C) 1988,1989 by Michael DeCorte 4 | 5 | \typeout{Document Style `res' <26 Sep 89>.} 6 | 7 | %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% 8 | % res.sty 9 | % 10 | % \documentstyle{res} 11 | % 12 | % Copyright (c) 1988 by Michael DeCorte 13 | % Permission to copy all or part of this work is granted, provided 14 | % that the copies are not made or distributed for resale, and that 15 | % the copyright notice and this notice are retained. 16 | % 17 | % THIS WORK IS PROVIDED ON AN "AS IS" BASIS. THE AUTHOR PROVIDES NO 18 | % WARRANTY WHATSOEVER, EITHER EXPRESS OR IMPLIED, REGARDING THE WORK, 19 | % INCLUDING WARRANTIES WITH RESPECT TO ITS MERCHANTABILITY OR FITNESS 20 | % FOR ANY PARTICULAR PURPOSE. 21 | % 22 | % If you make any improvements, I'd like to hear about them. 23 | % 24 | % Michael DeCorte 25 | % P.O. Box 652 26 | % Potsdam NY 13676 27 | % mrd@sun.soe.clarkson.edu 28 | % mrd@clutx.bitnet 29 | % 30 | % Changes for LaTeX2e -- Venkat Krishnamurthy (Aug 7, 2001) 31 | % 32 | %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% 33 | % You can have multiple style options the legal options ones are: 34 | % 35 | % centered the name and address are centered at the top of the 36 | % page (default) 37 | % 38 | % line the name is the left with a horizontal line then 39 | % the address to the right 40 | % 41 | % overlapped the section titles overlap the body text (default) 42 | % 43 | % margin the section titles are to the left of the body text 44 | % 45 | % 11pt use 11 point fonts instead of 10 point fonts 46 | % 47 | % 12pt use 12 point fonts instead of 10 point fonts 48 | % 49 | %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% 50 | % Commands 51 | %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% 52 | % \Resume prints the word resume but typeset nicely 53 | % 54 | % \newsectionwidth{dimen} 55 | % defines the amount of space the labels extend 56 | % into the left margin. 57 | % DO NOT TRY to change any of the dimensions 58 | % yourself. You will probably confuse the style file. 59 | % 60 | % \name{text} defines your name 61 | % 62 | % \address{text} 63 | % defines your address 64 | % this can be called twice if you have two addresses 65 | % use \\'s to indicate where either line breaks or 66 | % comas should go 67 | % 68 | % \opening this prints your name and address at that spot 69 | % this is not normally needed, as \begin{resume} 70 | % does this but is provided just in case you need 71 | % to do something odd 72 | % 73 | % \begin{resume} ... \end{resume} 74 | % all of the resume should go inside of this 75 | % environment 76 | % 77 | % \section{text} 78 | % This prints 'text' in the left hand margin. 79 | % Its exact placement depends on what the style 80 | % options has been set to. (overlapped or margin) 81 | % You should use \\ to start a new line. If the 82 | % style option is margin, the \\ is converted 83 | % to a space. 84 | % To use this in any of the list environments, put 85 | % the \section after the \item[] but before the 86 | % text. 87 | % Eg. 88 | % \begin{itemize} 89 | % \item\section{text} 90 | % text 91 | % \end{itemize} 92 | % 93 | % \begin{ncolumn}{n} ... \end{ncolumn} 94 | % creates a tabular environment with n equally 95 | % spaced columns. Separate columns by & and 96 | % end them with \\ 97 | % 98 | % \begin{position} ... \end{position} 99 | % this is used to print a job description. There should 100 | % be only one job description in it. Information 101 | % related to the job (such as title, dates...) will 102 | % be printed. 103 | % 104 | % \begin{format} ... \end{format} 105 | % used to change the default format for the position 106 | % environment. Within it the recognized commands are: 107 | % \title{option} 108 | % \employer{option} 109 | % \location{option} 110 | % \dates{option} 111 | % \body 112 | % \\ 113 | % where option is one of l,r,c standing for left, right, center. 114 | % The format will eventually be used to make several 115 | % tabular environments and you are defining the number of columns 116 | % and the placement of text within the columns of the tabulars. 117 | % Each row is terminated by a \\. Any number of options can 118 | % be on a line, they will each be set in their own columns. 119 | % Any of the options except \body may be left out. 120 | % 121 | % Eg. 122 | % \begin{format} 123 | % \title{l}\employer{r}\\ 124 | % \dates{r}\\ 125 | % \body\\ 126 | % \location{l}\\ 127 | % \end{format} 128 | % 129 | % In this example the title and employer information 130 | % are set in 2 columns left justified and right justified 131 | % respectively. Then the date is set right justified. 132 | % Then the body is set. Then the location is set left 133 | % justified. 134 | % 135 | % \employer{text} 136 | % \title{text} 137 | % \dates{text} 138 | % \location{text} 139 | % declare text for the next invocation of the position 140 | % environment 141 | % 142 | %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% 143 | % Glue 144 | %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% 145 | % 146 | % sectionskip the amount of horizontal before a section 147 | % 148 | %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% 149 | % Dimensions 150 | %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% 151 | % 152 | % sectionwidth the amount that the section titles go in the 153 | % left margin 154 | % 155 | % resumewidth the width of the total resume from the left 156 | % margin to the right. Don't use textwidth 157 | % 158 | %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% 159 | % Definitions 160 | %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% 161 | % 162 | % sectionfont the font used to print section titles 163 | % use \renewcommand to change it 164 | % 165 | % namefont the font used to print your name 166 | % use \renewcommand to change it 167 | % 168 | %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% 169 | % THINGS TO DO 170 | % 171 | % add lm,rm options to format style to allow things to be placed 172 | % in the left or right margin respectivly 173 | % 174 | % add capability so that \body doesn't have to be proceeded (followed) 175 | % by a \\ allowing part of the description (eg. location) to be the 176 | % first (last) thing of the body 177 | % 178 | % clean up the list building procedures 179 | % 180 | % write docs to tell people how to use this 181 | 182 | \NeedsTeXFormat{LaTeX2e}[1995/12/01] 183 | \ProvidesClass{res}[2000/05/19 v1.4b Resume class] 184 | 185 | %\DeclareOption{11pt}{\renewcommand\@ptsize{1}} 186 | %\DeclareOption{12pt}{\renewcommand\@ptsize{2}} 187 | 188 | \PassOptionsToClass{11pt,12pt}{article} 189 | \LoadClassWithOptions{article} 190 | 191 | \newif\if@line 192 | \newif\if@margin 193 | 194 | \DeclareOption{line}{\@linetrue} 195 | \DeclareOption{centered}{\@linefalse} 196 | 197 | \DeclareOption{margin}{\@margintrue} 198 | \DeclareOption{overlapped}{\@marginfalse} 199 | 200 | \ExecuteOptions{overlapped,centered} 201 | \ProcessOptions\relax 202 | 203 | \nofiles % resume's don't need .aux files 204 | 205 | 206 | \newtoks\tabular@text % holds the current list being processed 207 | \newtoks\tabular@head % holds the head tabular list 208 | \newtoks\tabular@tail % holds the tail tabular list 209 | \newtoks\@ta % used by \@append 210 | \newtoks\undefined@token\undefined@token={} 211 | 212 | %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% 213 | % prints a centered name with the address centered 214 | % or the two address on opposite sides of the page 215 | % 216 | \def\@printcentername{\begingroup 217 | % print the name centered 218 | \leavevmode\hbox to \textwidth{\hfil\@tablebox{\namefont\@name}\hfil}\par 219 | \@ifundefined{@addressone}{% 220 | % do nothing 221 | }{% 222 | \@ifundefined{@addresstwo}{ 223 | % only one address 224 | \leavevmode\hbox to \textwidth{\hfil\@tablebox{\@addressone}\hfil}\par 225 | }{ 226 | % two addresses 227 | \leavevmode\hbox to \textwidth{\@tablebox{\@addressone}\hfil 228 | \@tablebox{\@addresstwo}}\par 229 | }% 230 | }% 231 | \endgroup} 232 | 233 | %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% 234 | % this is used to print the name and address at the top of 235 | % the page with a hline in between 236 | % 237 | \def\namefont{\large\bf} 238 | \def\@linename{\begingroup 239 | \def\\{, } 240 | {\namefont\@name} 241 | \vskip 2pt 242 | \fullline 243 | \vskip 2pt 244 | % where do you live? 245 | \@ifundefined{@addressone}{% 246 | % do nothing 247 | }{% 248 | \leavevmode\hbox to \textwidth 249 | {\hfill\vbox{\hbox{\@addressone} 250 | \hbox{\@addresstwo} 251 | }% 252 | }\par 253 | } 254 | \endgroup} 255 | 256 | %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% 257 | % HEADINGS: 258 | % There are two types of headings: 259 | % 1) one with the name centered and the address centered or 260 | % in the left and right side if there are two address 261 | % 2) one where the name is in the upper left corner 262 | % the a line accross the paper 263 | % then the address all on one line in the right corner 264 | % the second address will be directly below the first if defined 265 | % 266 | \let\print@name\relax 267 | \def\ds@centered{\ifx\print@name\relax\let\print@name\@printcentername\fi} 268 | \def\ds@line{\ifx\print@name\relax\let\print@name\@linename\fi} 269 | 270 | 271 | %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% 272 | % Use this to set the sectionwidth. 273 | % It adjust the width of the text as well as the hoffset 274 | % You probably shouldn't touch any of the size paramaters 275 | % unless you really understand all of this but it is not 276 | % hard. Either way, it can only be executed once 277 | % 278 | \def\sectionfont{\scshape} 279 | \newdimen\sectionwidth 280 | \newskip\sectionskip 281 | \newdimen\resumewidth 282 | 283 | \resumewidth=6.5in 284 | \sectionskip=3.5ex plus 1ex minus -.2ex % values stolen from LaTeX 285 | 286 | \def\newsectionwidth#1{% 287 | \sectionwidth=#1 288 | \textwidth=\resumewidth 289 | \advance\textwidth-\sectionwidth 290 | \hsize=\textwidth 291 | \hoffset=\sectionwidth 292 | } 293 | 294 | 295 | %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% 296 | % This is for sectiontitles that are entirely in the left margin. 297 | % multiline sectiontitles are permited and will be broken by 298 | % \TeX{} to fit into a box \verb|\sectionwidth| wide. It is advised 299 | % that \verb|\\| be used to break the lines by hand as \TeX{} will 300 | % probably not do what you want. 301 | % 302 | % When using this with {\tt tabbing} and {\tt list} (or anything 303 | % that is made out of {\tt list}) put the \section's inside of 304 | % the \verb|\begin{}| and the \verb|\item|Eg. 305 | % \begin{verbatim} 306 | % \begin{trivlist} 307 | % \item[] 308 | % \section{foo} 309 | % text 310 | % \end{trivlist} 311 | % \end{verbatim} 312 | % 313 | \def\boxed@sectiontitle#1{% 314 | % this macro may be called in a tabular. Special code must be written 315 | % to accomodate this. In LaTeX, a tabular is made out of hboxes. 316 | % TeX never goes into horizontal mode because of this; it only 317 | % gets into vertical mode and restricted horizontal mode. Certain 318 | % indenting problems must be handled because of this. They 319 | % are delt with at the end of this routine. 320 | % It is also necessary to close the hbox that was created before 321 | % the \section and create a new one when this macro has ended. 322 | % This macro therefore simulates a \kill, so that any text before 323 | % the \section not be printed. The proper use is therefore 324 | % ... 325 | % text\\ 326 | % \section{foo} 327 | % more text\\ 328 | % ... 329 | \ifx\\\@tabcr % is this in a tabular? (this *should* work but is a cludge) 330 | \@stopfield % the is the first part of a \kill 331 | \else 332 | \@@par % This will end the previous paragraph if needed and 333 | % go into vertical mode. If this was already in 334 | % vertical mode then the \par does nothing. 335 | 336 | \fi 337 | \begingroup 338 | \everypar={}% 339 | \def\par{\@@par}% 340 | \let\\=\@normalcr 341 | \addpenalty{\@secpenalty} % this would be a good place for a page break 342 | % \@secpenalty is what LaTeX uses before its 343 | % section's. It happens to be -300 344 | \addvspace{\sectionskip} % put in a bit of glue 345 | % The following hbox will be contributed to the page list without going 346 | % into horizontal mode. Therefore, any \parindent's, \parshape's, \leftskip 347 | % will be ignored but \hoffset's are not. The result is that the box will 348 | % only by \hoffset. This is what I want 349 | \hbox to 0pt{% 350 | \hss % this is an llap. In other words, this glue 351 | % will shrink by the width of the stuff in the vbox 352 | % (\sectionwidth) into the left margin and then 353 | % insert the contents of the vbox. 354 | \vtop to 0pt{% make a 0pt height paragraph, with the baseline at the 355 | % lined up with the baseline of the first box in the list 356 | \leftskip=0pt 357 | \hsize=\sectionwidth 358 | \textwidth=\sectionwidth 359 | \raggedright % you don't want this filled out to the right margin 360 | \sectionfont 361 | #1\vss % Go into horizontal mode; do the paragraph; 362 | % go into vertical mode; add some negative glue 363 | % to give a box of 0pt height and depth 364 | }% 365 | }% 366 | \addpenalty{-\@secpenalty} % this would be a bad place for a page break 367 | \vskip-\baselineskip % when the next box is processed, baselineskip glue 368 | % glue will be added (the box has no depth because of 369 | % the \vss; therefore, we don't have to worry about 370 | % \lineskiplimit). This -\baselineskip glue 371 | % is to undo this. \nointerlineskip doesn't 372 | % work because the baseline of this line would be lined 373 | % up with the top of the top of the next box. We 374 | % want the baselines lined up. 375 | % 376 | % It may have been possible to do this by forcing the 377 | % baseline of this box to be the top of the box but 378 | % then the interline skip between this box and the 379 | % previous box would be off as the baselines of the 380 | % this box (the one that being made above) and the 381 | % previous line would be separated by \baselineskip 382 | % (probably, it may be separted by the depth of the 383 | % previous box + \lineskip) but as the baseline of 384 | % this box has been moved to the top, the box's would 385 | % separted by to much glue. The exact amount being 386 | % the height of this box. 387 | \endgroup 388 | \ifx\\\@tabcr % is this in a tabular? (this *should* work but is a cludge) 389 | % this is the second part of the \kill; it starts the next tabbing line 390 | % Because this routine will never get into paragraph mode when used in 391 | % tabbing the \parskip that is discussed below will never be inserted. 392 | % Therefore it should not be negated as done below. 393 | \@startline 394 | \ignorespaces 395 | \else 396 | \vskip-\parskip % The next thing to be contributed will be a paragraph. 397 | % Right before being contributed though a \vskip\parskip 398 | % will be inserted. This is to negate it. 399 | % 400 | % I do consider this to be a bit of a cludge but 401 | % I can not find a way to write \unskipfutureskip 402 | % or a way to make TeX think that nothing has 403 | % been contributed to the page list. 404 | \fi 405 | } 406 | 407 | 408 | %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% 409 | % This is for sectiontitles that are entirely above the section text 410 | % 411 | \def\unboxed@sectiontitle#1{% 412 | \ifx\\\@tabcr % see boxed@sectiontitle for explation 413 | \@stopfield 414 | \else 415 | \@@par 416 | \fi 417 | \begingroup 418 | \everypar={}% 419 | \def\par{\@@par}% 420 | \def\\{ } 421 | \addpenalty{\@secpenalty} 422 | \addvspace{\sectionskip} 423 | \hbox to 0pt{\hss\hbox to \sectionwidth{\sectionfont#1\hss}} 424 | \addpenalty{-\@secpenalty} % this would be a bad place for a page break 425 | \endgroup 426 | \ifx\\\@tabcr % see boxed@sectiontitle for explation 427 | \@startline 428 | \else 429 | \vskip-\parskip 430 | \fi 431 | \ignorespaces 432 | } 433 | 434 | %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% 435 | % There are two types of section headings: 436 | % 1) the section heading is all on one line and directly 437 | % below it, is the body of the text 438 | % 2) the section heading is entirely in the left margin 439 | % (possibly taking multiple lines) with the body of 440 | % the text next to it 441 | % 442 | \let\@@section\relax 443 | \def\ds@overlapped{\ifx\@@section\relax\newsectionwidth{0.5in}\let 444 | \@@section\unboxed@sectiontitle\fi} 445 | \def\ds@margin{\ifx\@@section\relax\newsectionwidth{1.3in}\let 446 | \@@section\boxed@sectiontitle\fi} 447 | 448 | %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% 449 | % DEFAULTS: (some of them) 450 | % 451 | % centered name 452 | % overlapped section titles 453 | % 454 | % format is: 455 | % title employer 456 | % location dates 457 | % body 458 | % with everything in the left of its column 459 | 460 | %\input article.sty 461 | 462 | \if@line\ds@line\else\ds@centered\fi 463 | \if@margin\ds@margin\else\ds@overlapped\fi 464 | 465 | 466 | %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% 467 | % typeset resume all nice and pretty 468 | % 469 | \def\Resume{{R\'{e}sum\'{e}}} 470 | 471 | %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% 472 | % makes a line of width \textwidth starting at -\hoffset 473 | % 474 | \def\fullline{ % hrules only listen to \hoffset 475 | \nointerlineskip % so I have this code 476 | \moveleft\hoffset\vbox{\hrule width\textwidth} 477 | \nointerlineskip 478 | } 479 | 480 | %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% 481 | % create a multiline box. 482 | % 483 | \def\@tablebox#1{\begin{tabular}[t]{@{}l@{\extracolsep{\fill}}}#1\end{tabular}} 484 | 485 | %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% 486 | % use this to define your name 487 | % 488 | \def\name#1{\def\@name{#1}} 489 | 490 | \def\@name{} 491 | 492 | %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% 493 | % use this to define your address, this may be called more than once. 494 | % 495 | \let\@addressone\relax 496 | \let\@addresstwo\relax 497 | 498 | \def\address#1{ 499 | \@ifundefined{@addressone}{\def\@addressone{#1}}{\def\@addresstwo{#1}}} 500 | 501 | %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% 502 | % if you want to print your name and address is a slightly 503 | % different format than sugessted, then this can be used 504 | % to place it exactly where you want 505 | % 506 | \def\opening{\def\@opening{} 507 | \begingroup 508 | \leftskip=-\hoffset % I use leftskip to move things to the left as 509 | \advance\textwidth\hoffset % changing hoffset doesn't work. But this 510 | \hsize=\textwidth % doesn't really work as hboxes are rules 511 | % are unaffeted 512 | \let\par=\@@par 513 | \parindent=0pt 514 | \parskip=0pt 515 | \print@name 516 | \endgroup 517 | } 518 | 519 | %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% 520 | % all of the resume goes in the resume environment 521 | % 522 | \newenvironment{resume}{\begingroup 523 | \@ifundefined{@opening}{\opening}{} 524 | }{\endgroup} 525 | 526 | %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% 527 | % gives you a tabular environment with n equally spaced columns 528 | % \begin{ncolumn}{#} ... \end{ncolumn} 529 | % 530 | % The p option of LaTeX is broken in all but the newest verion 531 | % of latex.tex, this is how to fix it 532 | % 533 | \def\@endpbox{\par\egroup\hfil} 534 | \let\@@endpbox=\@endpbox 535 | 536 | \newdimen\@columnwidth % the width of each column equal to 537 | \def\ncolumn#1{% 538 | % \@columnwidth = \textwidth / #1 539 | \@columnwidth=\textwidth \divide\@columnwidth by #1 540 | \begin{tabular*}{\textwidth}[t]% 541 | {*{#1}{@{}p{\@columnwidth}@{\extracolsep{\fill}}}} 542 | } 543 | 544 | \def\endncolumn{\end{tabular*}} 545 | 546 | 547 | %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% 548 | % \employer{text} defines employer to be text 549 | % \location{text} defines location to be text 550 | % \dates{text} defines dates to be text 551 | % \title{text} defines title to be text 552 | % \body 553 | % 554 | 555 | \def\employer#1{\def\@employer{\print@employer{#1}}} 556 | \def\location#1{\def\@location{\print@location{#1}}} 557 | \def\dates#1{\def\@dates{\print@dates{#1}}} 558 | \def\title#1{\def\@title{\print@title{#1}}} 559 | 560 | \let\l@justify\raggedright 561 | \let\r@justify\raggedleft 562 | \let\c@justify\centering 563 | 564 | 565 | %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% 566 | % \@format{name}{justify} 567 | % will define \print@#1 to print it's one argument 568 | % justified according to #2 which can be 569 | % l = left 570 | % r = right 571 | % c = center 572 | % 573 | % eg. 574 | % \@format{employer}{c} 575 | % is the same as \def\print@employer#1{{\centering #1\par}} 576 | % 577 | \def\@format#1#2{% 578 | \expandafter\gdef\csname print@#1\endcsname##1{% 579 | {\csname#2@justify\endcsname##1\par}} 580 | } 581 | 582 | %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% 583 | % this is used to define how the position environment should 584 | % formated. 585 | % 586 | % \begin{format} positioning text \end{format} 587 | % where positioning text may be 588 | % \employer{pos} 589 | % \location{pos} 590 | % \dates{pos} 591 | % \title{pos} 592 | % \body (for the body of the position environment) 593 | % where pos is 594 | % l for left 595 | % r for right 596 | % c for center 597 | % use \\ to break the line 598 | % you don't have to use all of the options. 599 | % on any one line, you should indicate what you want on that line 600 | % and where it should go within its column. 601 | % eg. 602 | % the following prints the employer in the left with the location 603 | % centered within that its column. It then prints the date on the 604 | % right. Then it prints the body of the position environment. Then 605 | % it prints the title centered within its column; as there is only 606 | % one column here it is really just centered. 607 | % 608 | % \begin{format} 609 | % \employer{l}\location{c}\\ 610 | % \dates{r}\\ 611 | % \body\\ 612 | % \title{c}\\ 613 | % \end{format} 614 | 615 | \newcounter{numberofcolumns} 616 | \newenvironment{format}{% 617 | \def\end@line@head{\append@tabular@head{tabular@text}\tabular@text={}% 618 | \c@numberofcolumns 0} 619 | \def\end@line@tail{\append@tabular@tail{tabular@text}\tabular@text={}% 620 | \c@numberofcolumns 0} 621 | \tabular@text={} 622 | \tabular@head={} 623 | \tabular@tail={} 624 | \c@numberofcolumns 0 625 | \let\\=\end@line@head 626 | \def\employer##1{\advance\c@numberofcolumns 1 627 | \@format{employer}{##1} 628 | \append@tabular@text{employer}} 629 | \def\location##1{\advance\c@numberofcolumns 1 630 | \@format{location}{##1} 631 | \append@tabular@text{location}} 632 | \def\dates##1{\advance\c@numberofcolumns 1 633 | \@format{dates}{##1} 634 | \append@tabular@text{dates}} 635 | \def\title##1{\advance\c@numberofcolumns 1 636 | \@format{title}{##1} 637 | \append@tabular@text{title}} 638 | \def\body{\iftoks\tabular@head\undefined@token\then 639 | \else 640 | \@append{\noexpand\\}\to\tabular@head 641 | \skotfi 642 | \let\\=\end@line@tail}}{} 643 | 644 | %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% 645 | %taken from page 378 of TeXbook but freely hacked 646 | % 647 | % appends the expansion of #1 to the token list #2 648 | 649 | \def\@append#1\to#2{% 650 | \@ta=\expandafter{#1}% 651 | \xdef\@append@temp{\the#2\the\@ta} 652 | \global#2=\expandafter{\@append@temp}% 653 | } 654 | 655 | 656 | %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% 657 | % CHAA006%vaxb.rhbnc.ac.uk@NSS.Cs.Ucl.AC.UK 658 | % texhax.88.078 659 | % is used to see if two token lists are equal 660 | % there must be a better way 661 | % 662 | 663 | \let \then = \empty 664 | \def \iftoks #1#2\then #3\else #4\skotfi{ 665 | \edef \1{\the #1} 666 | \edef \2{\the #2} 667 | \ifx \1\2\then #3\else #4\fi} 668 | 669 | 670 | %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% 671 | % \append@tabular@text{command} 672 | % 673 | % appends command to the end of \tabular@text. 674 | % NOTE: command MUST be a command but without the \ 675 | % Eg. \append@tabular@text{relax} 676 | % 677 | % used to define \tabular@text for the tabular environment 678 | % used by append@tabular@head and append@tabular@tail 679 | % 680 | 681 | \def\append@tabular@text#1{% 682 | \iftoks\tabular@text\undefined@token\then 683 | \global\tabular@text=\expandafter{\csname @#1\endcsname} 684 | \else 685 | \@append{&}\to\tabular@text 686 | \@append{\csname @#1\endcsname}\to\tabular@text 687 | \skotfi 688 | } 689 | 690 | %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% 691 | % append@tabular@head 692 | % 693 | % appends command to the end of \tabular@text@head 694 | % NOTE: command MUST be a command but without the \ 695 | % Eg. \append@tabular@head{relax} 696 | % 697 | % used to define \tabular@head for the tabular environment 698 | % used by the position environment 699 | % 700 | \def\append@tabular@head#1{% 701 | \ifnum\the\c@numberofcolumns=0\relax 702 | \else 703 | \iftoks\tabular@head\undefined@token\then 704 | \relax 705 | \else 706 | \@append{\noexpand\\}\to\tabular@head 707 | \@append{\noexpand\penalty-\@secpenalty}\to\tabular@head 708 | \skotfi 709 | \@append{\noexpand\begin{ncolumn}}\to\tabular@head 710 | \@append{\expandafter{\the\c@numberofcolumns}}\to\tabular@head 711 | \@append{\the\csname#1\endcsname}\to\tabular@head 712 | \@append{\noexpand\end{ncolumn}}\to\tabular@head 713 | \fi 714 | } 715 | 716 | %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% 717 | % append@tabular@tail 718 | % 719 | % appends command to the end of \tabular@text@htail 720 | % NOTE: command MUST be a command but without the \ 721 | % Eg. \append@tabular@tail{relax} 722 | % 723 | % used to define \tabular@tail for the tabular environment 724 | % used by the position environment 725 | % 726 | \def\append@tabular@tail#1{% 727 | \ifnum\the\c@numberofcolumns=0\relax 728 | \else 729 | \iftoks\tabular@tail\undefined@token\then 730 | \else 731 | \@append{\noexpand\\}\to\tabular@tail 732 | \@append{\noexpand\penalty-\@secpenalty}\to\tabular@tail 733 | \skotfi 734 | \@append{\noexpand\begin{ncolumn}}\to\tabular@tail 735 | \@append{\expandafter{\the\c@numberofcolumns}}\to\tabular@tail 736 | \@append{\the\csname#1\endcsname}\to\tabular@tail 737 | \@append{\noexpand\end{ncolumn}}\to\tabular@tail 738 | \fi 739 | } 740 | 741 | %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% 742 | % put the actual job descriptions here 743 | % \begin{postion} ... \end{position} 744 | % in the ... describe the position. 745 | % don't put the \dates \location etc in here. define them before hand 746 | \newenvironment{position}% 747 | {% 748 | \begingroup 749 | \par 750 | \the\tabular@head 751 | % \addpenalty{-\@secpenalty}% bad place for a page break 752 | \penalty -\@secpenalty % bad place for a page break 753 | \penalty 10000 754 | \ignorespaces 755 | }{% 756 | \the\tabular@tail 757 | % \addpenalty{\@secpenalty}% good place for a page break 758 | \penalty \@secpenalty % good place for a page break 759 | \endgroup 760 | } 761 | 762 | %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% 763 | % DEFAULTS: (the rest of them) 764 | % 765 | % centered name 766 | % overlapped section titles 767 | % 768 | % format is: 769 | % title employer 770 | % location dates 771 | % body 772 | % with everything in the left of its column 773 | 774 | \@secpenalty = -500 775 | \topmargin 0pt 776 | \headheight 0pt 777 | \headsep 0pt 778 | \textheight 9in 779 | \parindent 0pt 780 | \topmargin 0in 781 | \oddsidemargin 0pt 782 | \evensidemargin 0pt 783 | \marginparwidth 0pt 784 | \parindent 0pt 785 | \parskip \baselineskip 786 | \setcounter{secnumdepth}{0} 787 | \def\@listI{\leftmargin\leftmargini 788 | \topsep 0pt 789 | \parskip 0pt 790 | \partopsep 2pt plus 2pt 791 | \parsep 2pt plus 2pt 792 | \itemsep \parsep} 793 | 794 | \pagestyle{empty} % don't want page numbers 795 | 796 | \begin{format} 797 | \title{l}\employer{r}\\ 798 | \location{l}\dates{r}\\ 799 | \body\\ 800 | \end{format} 801 | 802 | \let\section\@@section 803 | 804 | -------------------------------------------------------------------------------- /wrapfig.sty: -------------------------------------------------------------------------------- 1 | % W R A P F I G . S T Y ver 3.3 (Oct 12, 1999) 2 | % 3 | % Copyright (C) 1991,1992,1995,1999 by Donald Arseneau 4 | % This software is released under the terms of the LaTeX Project 5 | % public license. 6 | % 7 | % Environments "wrapfigure" and "wraptable" place a figure or table 8 | % at the side of the page and wrap text around it. 9 | % 10 | % \begin{wrapfigure}[12]{r}[34pt]{5cm}
\end{wrapfigure} 11 | % -- - ---- --- 12 | % [number of narrow lines] {placement} [overhang] {width of figure} 13 | % 14 | % Placement is one of r, l, i, o, R, L, I, O, for right, left, 15 | % inside, outside, (here / FLOAT). 16 | % The figure sticks into the margin by `overhang', if given, or by the 17 | % length \wrapoverhang, which is normally zero. 18 | % The number of wrapped text lines is normally calculated from the height 19 | % of the figure, but may be specified manually ("12" above). 20 | % 21 | % More detailed instructions are given below, following the definitions. 22 | % Please direct any problem reports to asnd@Triumf.ca 23 | 24 | %%%%% ----- Begin definitions ----- %%%%% 25 | 26 | \@ifundefined{c@WF@wrappedlines}{}{\endinput} 27 | 28 | \newdimen\wrapoverhang \wrapoverhang\z@ 29 | \newdimen\WF@size 30 | \newcount\c@WF@wrappedlines % used globally 31 | \newbox\WF@box 32 | \newtoks\WF@everypar 33 | \newif\ifWF@float 34 | \let\@@parshape\parshape 35 | \let\WF@@everypar\everypar 36 | 37 | \def\wrapfigure{\def\@captype{figure}\@ifnextchar[\WF@wr{\WF@wr[]}} 38 | \def\wraptable{\def\@captype{table}\@ifnextchar[\WF@wr{\WF@wr[]}} 39 | 40 | \def\WF@wr[#1]#2{% first two args: #1=num lines, #2=placement 41 | \xdef\WF@wfname{wrap\@captype\space}% 42 | \ifvoid\WF@box\else \WFclear \WF@collision \fi 43 | \xdef\WF@place{\string`\@car#2r\@nil}% 44 | \ifnum\lccode\WF@place=\WF@place \global\WF@floatfalse 45 | \else \global\WF@floattrue \fi 46 | \ifx\parshape\WF@fudgeparshape \ifWF@float\else\WF@collision\fi \else 47 | \ifx\par\@@par \ifnum\@@parshape>\z@\WF@conflict\fi \else \WF@conflict\fi 48 | \fi \gdef\WF@wli{#1}% 49 | \@ifnextchar[\WF@rapt{\WF@rapt[\wrapoverhang]}} 50 | 51 | \def\WF@rapt[#1]#2{% final two args: #1 = overhang, #2 = width, 52 | \gdef\WF@ovh{#1}% hold overhang for later, when \width is known 53 | \global\setbox\WF@box\vtop\bgroup \setlength\hsize{#2}% 54 | \ifdim\hsize>\z@ \@parboxrestore \else 55 | \setbox\z@\hbox\bgroup \let\wf@@caption\caption \let\caption\wf@caption 56 | \ignorespaces \fi} 57 | 58 | \def\wf@caption{\relax 59 | \ifdim\hsize>\z@ \let\caption\wf@@caption \else 60 | \unskip \egroup \hsize\wd\z@ \@parboxrestore \box\z@ \fi \caption} 61 | 62 | \def\endwrapfigure{% 63 | \ifdim\hsize>\z@ \par\hrule\@width\hsize\@height\z@ % force width 64 | \else \unskip \egroup \box\z@ \fi % or end hbox 65 | \egroup % end the \vtop; width is known so now is "later" 66 | \def\width{\wd\WF@box}\setlength\wrapoverhang{\WF@ovh}% 67 | \xdef\WF@ovh{\the\wrapoverhang}% save until wrapping 68 | \ifdim\ht\WF@box>\topskip \ht\WF@box\z@ \fi % too much height, set flag. 69 | \ifdim\ht\WF@box<.5\p@ % too tall (starts with \vbox) or too short 70 | \global\setbox\WF@box\vtop{\vskip-1.4ex\unvbox\WF@box}\fi 71 | \global\WF@size\dp\WF@box % box is guaranteed to have little height. 72 | \global\advance\WF@size1.5\baselineskip \global\advance\WF@size\tw@\intextsep 73 | \aftergroup\WF@startfloating % even when not really floating! 74 | \ifWF@float\else \ifhmode 75 | {\unskip \parfillskip\z@skip \par \vskip-\parskip}\aftergroup\noindent 76 | \fi\fi \global\@ignoretrue} 77 | \let\endwraptable\endwrapfigure 78 | 79 | % Subvert \everypar to float fig and do wrapping. Also for non-float. 80 | \def\WF@startfloating{% 81 | \WF@everypar\expandafter{\the\everypar}\let\everypar\WF@everypar 82 | \WF@@everypar{\ifvoid\WF@box\else\WF@floathand\fi \the\everypar 83 | \WF@wraphand 84 | }} 85 | 86 | \def\WF@floathand{% 87 | \ifx\parshape\WF@fudgeparshape \WF@fltmes\else 88 | \ifx\par\@@par\ifnum\@@parshape=\z@\ifdim\hangindent=\z@ 89 | \setbox\z@\lastbox \begingroup 90 | \@@par \WF@@everypar{}\WF@putfigmaybe 91 | \endgroup % start wrapping 92 | \ifvoid\z@\else\box\z@\fi % replace indentation 93 | \else\WF@fltmes\fi\else\WF@fltmes\fi\else\WF@fltmes\fi\fi} 94 | 95 | % Put fig here if it fits or if it can't float 96 | \def\WF@putfigmaybe{% 97 | \ifinner 98 | \vskip-\parskip \global\WF@floatfalse 99 | \let\pagetotal\maxdimen % kludge flag for "not top of page" 100 | \else % outer page 101 | \@tempdima\pagedepth % save page depth 102 | {\advance\parskip\@tempdima\vskip-\parskip}% back up to baseline 103 | \penalty\interlinepenalty % update pg. parameters 104 | \@tempdimb\pagegoal \advance\@tempdimb-\pagetotal % room left on page 105 | \ifdim\@tempdimb<\z@ % \WF@info{Page overfull already;}% 106 | \global\WF@floatfalse 107 | \ifdim-\@tempdimb>\pageshrink \else \pagebreak \fi 108 | \else 109 | \ifdim\WF@size>\@tempdimb 110 | % \WF@info{Size \the\WF@size\space does not fit in \the\@tempdimb}% 111 | \ifWF@float \dimen@.5\baselineskip \else \dimen@ 2\baselineskip\fi 112 | \ifdim\pagestretch>\dimen@ \dimen@\pagestretch \fi 113 | \ifdim\pagefilstretch>\z@ \dimen@\@tempdimb \fi 114 | \ifdim\pagefillstretch>\z@ \dimen@\@tempdimb \fi 115 | \advance\dimen@.5\baselineskip 116 | \ifdim\dimen@>\@tempdimb % \WF@info{Page nearly full; can stretch}% 117 | \global\WF@floatfalse \pagebreak 118 | \fi 119 | \else % \WF@info{Fits in \the\@tempdimb;}% 120 | \global\WF@floatfalse 121 | \fi\fi 122 | \vskip\@tempdima\relax % (return erased page depth) 123 | \fi 124 | \noindent 125 | \ifWF@float 126 | \WF@fltmes 127 | \else % putting here; 128 | \WF@info{Put \WF@wfname here:}% 129 | {\ifodd\if@twoside\c@page\else\@ne\fi % assign l/r to i/o placement 130 | \lccode`i`l\lccode`o`r\else \lccode`i`r\lccode`o`l\fi 131 | \xdef\WF@place{\the\lccode\lccode\WF@place}}% twice to get only l or r 132 | \hbox to\z@{% llap or rlap depending on {l} or {r}; calc effective width 133 | \@tempdima\wd\WF@box \@tempdimb\WF@ovh 134 | \advance\@tempdima-\@tempdimb \advance\@tempdima\columnsep 135 | \@tempdimb\hsize \advance\@tempdimb-\@tempdima 136 | \ifnum `l=\WF@place % fig on left 137 | \hss % figure overlaps space to the left 138 | \def\@tempa{\kern\columnsep}% position to left of the gap 139 | \else % fig on right 140 | \@tempdima\z@ % no left indentation 141 | \kern\@tempdimb \kern\columnsep 142 | \def\@tempa{\hss}% figure overlaps space to the right 143 | \fi 144 | \ifdim\@tempdimb<\hsize 145 | \xdef\WF@wrapil{\the\@tempdima \the\@tempdimb}% indentation and length 146 | \else 147 | \xdef\WF@wrapil{\z@ \the\hsize}% 148 | \fi 149 | \ifdim\pagetotal=\z@ % \WF@info{Put \WF@wfname at top of p.\thepage}% 150 | \global\advance\WF@size-\intextsep 151 | \else % \WF@info{Putting \WF@wfname in middle of page}% 152 | \setbox\WF@box\hbox{\lower\intextsep\box\WF@box}% 153 | \fi \dp\WF@box\z@ \box\WF@box \@tempa 154 | }% end \hbox to 0pt 155 | \aftergroup\WF@startwrapping % after the \endgroup which immediately follows 156 | \fi} 157 | 158 | \def\WF@startwrapping{% 159 | \ifx\WF@wli\@empty 160 | {\advance\WF@size1.1\baselineskip 161 | \divide\WF@size\baselineskip \global\c@WF@wrappedlines\WF@size}% 162 | \else 163 | \setcounter{WF@wrappedlines}{\WF@wli}\global\advance\c@WF@wrappedlines\@ne 164 | \fi 165 | \ifnum\c@WF@wrappedlines>\@ne 166 | \let\parshape\WF@fudgeparshape \let\WF@pspars\@empty \let\WF@@par\par 167 | \def\@setpar##1{\def\WF@@par{##1}}\def\par{\@par}\let\@par\WF@mypar 168 | \xdef\WF@restoretol{\tolerance\the\tolerance}\tolerance9999 169 | \fi} 170 | 171 | \def\WF@wraphand{% 172 | \ifnum\c@WF@wrappedlines<\tw@ \WF@finale 173 | \else \begingroup % Create \parshape command: 174 | \@tempcnta\@ne \let\WF@wrapil\relax \gdef\WF@ps{}% 175 | \@whilenum \@tempcnta<\c@WF@wrappedlines\do{% repeated indentation, length 176 | \xdef\WF@ps{\WF@ps\WF@wrapil}\advance\@tempcnta\@ne 177 | }\endgroup 178 | \ifx\WF@pspars\@empty 179 | \@@parshape\c@WF@wrappedlines \WF@ps \WF@noil 180 | \else % use external `parshape' values to modify my parshape 181 | \WF@modps 182 | \fi\fi} 183 | 184 | \def\WF@mypar{\relax 185 | \WF@@par % what the rest of LaTeX expects \par to be (usually \@@par) 186 | \ifnum\@@parshape=\z@ \let\WF@pspars\@empty \fi % reset `parshape' 187 | \global\advance\c@WF@wrappedlines-\prevgraf \prevgraf\z@ 188 | \ifnum\c@WF@wrappedlines<\tw@ \WF@finale \fi} 189 | 190 | \def\WF@modps{\begingroup 191 | \afterassignment\@tempdimb \@tempdima\WF@pspars % a=ind, b=wid 192 | \afterassignment\dimen@\advance\@tempdima\WF@wrapil 193 | \advance\@tempdimb\dimen@ \advance\@tempdimb-\hsize 194 | \def\WF@wrapil{\the\@tempdima \the\@tempdimb}% 195 | \edef\@tempb{\@@parshape\c@WF@wrappedlines \WF@ps \WF@pspars}% 196 | \expandafter\endgroup\@tempb} 197 | 198 | \let\@@setpar\@setpar 199 | \def\WF@noil{\z@ \hsize} 200 | \let\WF@pspars\@empty 201 | 202 | \def\WF@fudgeparshape{\relax \ifnum\c@WF@wrappedlines<\tw@ \WF@finale 203 | \else \afterassignment\WF@fudgeparshapee \fam \fi} 204 | \def\WF@fudgeparshapee{\ifnum\fam=\@ne \expandafter \WF@parshapeee \else 205 | \WF@conflict \@@parshape\fam \fi} 206 | \def\WF@parshapeee#1#2{\begingroup 207 | \delimitershortfall#1\nulldelimiterspace#2\edef\@tempa{% 208 | \def\noexpand\WF@pspars{\the\delimitershortfall \the\nulldelimiterspace}}% 209 | \expandafter\endgroup\@tempa \WF@wraphand} 210 | 211 | \def\WF@finale{\ifx\parshape\WF@fudgeparshape 212 | \WF@restoretol \let\@setpar\@@setpar \let\par\WF@@par 213 | \WF@info{Finish wrapping text}% 214 | \ifx\par\@@par \def\@par{\let\par\@@par\par}\else \let\@par\WF@@par \fi 215 | \let\parshape\@@parshape 216 | \parshape\ifx\WF@pspars\@empty \z@ \else \@ne \WF@pspars\fi \fi 217 | \ifvoid\WF@box \ifx\everypar\WF@everypar 218 | \let\everypar\WF@@everypar \everypar\expandafter{\the\WF@everypar}% 219 | \fi\fi} 220 | 221 | \newcommand{\WFclear}{\par 222 | \ifvoid\WF@box\else \vskip\bigskipamount \box\WF@box 223 | \let\everypar\WF@@everypar \everypar\expandafter{\the\WF@everypar}% 224 | \fi \global\c@WF@wrappedlines\z@ \WF@finale} 225 | 226 | \begingroup 227 | \toks0={\let\everypar\WF@@everypar \everypar\expandafter{\the\WF@everypar}% 228 | \let\parshape\@@parshape \let\@setpar\@@setpar } 229 | \toks1=\expandafter{\@arrayparboxrestore} 230 | \toks2=\expandafter{\clearpage} 231 | \edef\@tempa{\def\noexpand\@arrayparboxrestore{\the\toks0 \the\toks1}% 232 | \def\noexpand\clearpage{\noexpand\protect\noexpand\WFclear \the\toks2}} 233 | \expandafter 234 | \endgroup\@tempa 235 | 236 | \@ifundefined{@capwidth}{\let\@capwidth\hsize}{}% Pamper RevTeX's Stupidity 237 | 238 | \def\WF@conflict{\WF@warning 239 | {\WF@wfname used inside a conflicting environment}} 240 | \def\WF@collision{\WF@warning{Collision between wrapping environments}} 241 | \def\WF@fltmes{\ifWF@float \WF@info{\WF@wfname floats}% 242 | \else \WF@warning{Stationary \WF@wfname forced to float}\fi} 243 | 244 | \let\WF@warning\@warning 245 | \let\WF@info\@gobble 246 | 247 | \@ifundefined{DeclareOption}{\endinput}{} 248 | 249 | \def\WF@warning{\PackageWarning{wrapfig}} 250 | \ProvidesPackage{wrapfig}[1999/10/12 \space v 3.3] 251 | \DeclareOption{verbose}{\def\WF@info{\PackageInfo{wrapfig}}} 252 | \ProcessOptions 253 | \AtEndDocument{\WFclear} 254 | 255 | \endinput 256 | 257 | %%%%% ----- End definitions ----- %%%%% 258 | 259 | %%%%% ----- Begin Instructions ----- %%%%% 260 | 261 | 262 | W R A P F I G . S T Y \ \ ver 3.3 \ \ (Oct 12, 1999) 263 | 264 | Copyright (C) 1991,1992,1995,1999 by Donald Arseneau (asnd@Triumf.ca) 265 | 266 | Wrapfig.sty provides the environments "wrapfigure" and "wraptable" for 267 | typesetting a narrow float at the edge of the text, and making the text 268 | wrap around it. The "wrapfigure" and "wraptable" environments interact 269 | properly with the "\caption" command to produce proper numbering, but 270 | they are not regular floats like "figure" and "table", so (beware!) they 271 | may be printed out of sequence with the regular floats. There are four 272 | parameters for "\begin{wrapfigure}", two optional and two required, plus 273 | the text of the figure, with a caption perhaps: 274 | 275 | \begin{wrapfigure}[12]{r}[34pt]{5cm}
\end{wrapfigure} 276 | == = ==== === 277 | [number of narrow lines] {placement} [overhang] {width} 278 | 279 | Some idiosyncrasies: 280 | 281 | - You must not specify a wrapfigure in any type of list environment or 282 | or immediately before or immediately after one. It is OK to follow 283 | a list if there is a blank line ("\par") in between. 284 | 285 | - If you put a wrapfigure in a parbox or a minipage, or any other type 286 | of grouping, the text wrapping should end before the group does. 287 | 288 | - It does work in two-column format, but are your figures that small? 289 | 290 | - It may be out of sequence with regular floats. 291 | 292 | - The hlines that may be printed above and below floats are ignored; 293 | you must insert them manually if desired. 294 | 295 | - "\linewidth" is not adjusted within the wrapped text (because it can 296 | only be set for whole paragraphs at a time). It is set within the 297 | figure. 298 | 299 | \section{Placement and Floating} 300 | 301 | Parameter "#2" (required) is the figure placement code, but the valid 302 | codes are different from regular figures. They come in pairs: an 303 | uppercase version which allows the figure to float, and a lowercase 304 | version that puts the figure ``exactly here''. 305 | 306 | r R - the right side of the text 307 | l L - the left side of the text 308 | i I - the inside edge--near the binding (if "[twoside]" document) 309 | o O - the outside edge--far from the binding 310 | 311 | You should specify one code only, not a list. The figure or table must 312 | be on one side or the other; it cannot be in the middle with text on 313 | both sides. The "i" and "o" options refer to the inside and outside of 314 | the whole page, not individual columns. 315 | 316 | The ability to float is somewhat restricted, and you will get best results 317 | by giving exact manual placement, but floating is more convenient while 318 | revising the document. Any changes to the formatting can ruin your manual 319 | positioning so you should adjust the placement just before printing a 320 | final copy. Here are some tips for good placement: 321 | 322 | - The environment should be placed so as to not run over a page break. 323 | 324 | - The environment must not be placed in special places like lists. 325 | 326 | - For esthetic reasons, only plain text should wrap around the figure. 327 | Section titles and big equations look bad; lists are bad if the figure 328 | is on the left. (All these function properly, they just don't look 329 | very good.) Small equations look fine. 330 | 331 | - It is convenient to begin the environment between paragraphs, but if 332 | you want placement in the middle of a paragraph, you must put the 333 | environment between two words where there is a natural line break. 334 | 335 | When floating, \LaTeX\ tries to apply these rules. More specifically, 336 | a floated wrapping environment will only begin... 337 | 338 | - at the beginning of a paragraph, 339 | 340 | - when there is enough room on the page, or it is possible to go on 341 | the next page, 342 | 343 | - if the `paragraph' is not in a section title or a list, 344 | 345 | - if the paragraph is not wrapping around another figure, 346 | 347 | - in the main text (not in a minipage etc.) 348 | 349 | It is possible that a non-floating wrapfigure will be forced to float 350 | when an earlier one is still being processed. A warning will be written 351 | in that case. You can have more information about the floating process 352 | written to the log file by specifying "\usepackage[verbose]{wrapfig}". 353 | 354 | If there is a lot of flexibility on a page, a floating wrapfigure may 355 | be placed badly; you must turn to manual placement. A rare problem is 356 | that floats and footnotes specified within the wrapping text can also 357 | cause poor placement and bad formatting. 358 | 359 | 360 | \section {Sizing and optional overhang} 361 | 362 | Parameter "#4" (the second required parameter) is the width of the figure 363 | or table. Given the way that \LaTeX\ puts just about everything into boxes 364 | with the current line-width, the width parameter will take precedence over 365 | whatever natural width the figure has. In particular, the caption is always 366 | typeset with the specified width. If the figure is wider than the space 367 | allotted, you will get an ``overfull box'' warning. 368 | 369 | However, if you specify a width of *zero* ("0pt"), the actual width of 370 | the figure will determine the wrapping width. A following "\caption" 371 | should have the same width as the figure, but it might fail badly; it 372 | is safer to specify a width when you use a caption. 373 | 374 | \LaTeX\ will wrap surrounding text around the figure, leaving a gap of 375 | "\intextsep" at the top and bottom, and "\columsep" at the side, by 376 | producing a series of shortened text lines beside the figure. The 377 | indentation (shortening) of the text is the figure width plus "\columnsep" 378 | minus overhang (if any; see below). 379 | 380 | \LaTeX\ calculates the number of short lines needed based on the height 381 | of the figure and the length "\intextsep". You can override this guess 382 | by giving the first optional argument (parameter "#1") specifying the 383 | number of shortened lines (counting each displayed equation as 3 lines). 384 | This is particularly useful when the surrounding text contains extra 385 | vertical spacing that is not accounted for automatically. 386 | 387 | The second optional parameter ("#3") tells how much the figure should 388 | hang out into the margin. The default overhang is given by the length 389 | "\wrapoverhang", which is "0pt" normally but can be changed using 390 | "\setlength". For example, to have all wrapfigures use the space 391 | reserved for marginal notes, 392 | 393 | \setlength{\wrapoverhang}{\marginparwidth} 394 | \addtolength{\wrapoverhang}{\marginparsep} 395 | 396 | When you do specify the overhang explicitly for a particular figure, you 397 | can use a special unit called "\width" meaning the width of the figure. 398 | For example, "[0.5\width]" makes the center of the figure sit on the 399 | edge of the text, and "[\width]" puts the figure entirely in the margin 400 | (and the adjacent text is indented by just "\columnsep"). This "\width" 401 | is the actual width of the wrapfigure, which may be greater than the 402 | declared width. 403 | 404 | 405 | \section{Some Random Implementation Notes} 406 | 407 | Unfortunately, \LaTeX's system of setting "\everypar" and "\par" is 408 | unable to coexist peacefully with a wrapping environment, so I was 409 | forced to subvert the "\@setpar" mechanism and "\everypar". ("\everypar" 410 | is already subverted once by NFSS.) 411 | 412 | When checking the room left on the page, remember that if there is less 413 | than "\baselineskip" the new paragraph will begin on the next page, even 414 | if there is no page stretch. If non-floating, I force a bad page break 415 | rather than have the figure hang into the bottom margin. 416 | 417 | Here are notes on various variables and some macros; what info they 418 | store and how they are used. 419 | 420 | \WF@wli - number-of-wrapped-lines parameter, saved for start of wrapping. 421 | Set globally by "\WF@wr" (set empty if no optional parameter given). 422 | The floating mechanism ignores this and uses the real size. 423 | 424 | \WF@ovh - margin overhang set globally by "\WF@rapt", saved until placing 425 | figure (but not reset). Actually, the setting is very tricky so that 426 | the expected values are used when a figure floats. First, the expression 427 | is saved without evaluation by "\WF@rapt" ("\begin{wrapfigure}") because 428 | "\width" is still unknown. Soon after that, "\endwrapfigure" executes 429 | "\WF@ovh" to evaluate the overhang and save the result (so that changes 430 | to "\wrapoverhang" while this figure is floating won't affect this 431 | figure). Finally, it is used by "\WF@putfigmaybe" when printing the fig. 432 | 433 | \WF@place - a macro that is used as a number, giving the placement code. 434 | It might start out as "`I" and later be converted to "114" (r). 435 | 436 | \WF@box - tested for void at "\begin{wrapfigure}", to avoid collisions, 437 | by "\everypar" to do floating, and by "\WF@finale" before resetting 438 | "\everypar". Voided globally when used by "\WF@putfigmaybe" (or by 439 | "\WF@wr" if an old figure must be dumped prematurely). 440 | 441 | \par - test if it is "\@@par" by "\begin{wrapfigure}" and "\WF@floathand" 442 | to float past special environments. It is set to "\@par" ("\WF@mypar") 443 | by "\WF@startwrapping", and restored by an end-group (bad!) or by 444 | "\WF@finale" (good). It is protected from change by redefining 445 | "\@setpar". 446 | 447 | \parshape - let to "\WF@fudgeparshape" by "\WF@startwrapping", so lists 448 | will continue wrapping; "\@@parshape" preserves the real "\parshape" 449 | command, and it is restored by "\WF@finale" or "\@parboxrestore". 450 | "\WF@floathand" and "\WF@wr" test if old wrapping is still in progress 451 | with "\ifx\parshape\WF@fudgeparshape". The value of "\@@parshape" is 452 | also tested to float past lists and other wrapping environments. 453 | 454 | \hangindent - tested to float past section titles etc. 455 | 456 | \c@WF@wrappedlines - the number of shortened lines + 1; set globally by 457 | "\WF@startwrapping" and decremented by "\par" ("\WF@mypar"). It is > 1 458 | only when wrapping is incomplete. "\WF@wraphand", "\WF@fudgeparshape", 459 | and "\WF@mypar" test the number for calling "\WF@finale". It may get 460 | stuck at some high value if "\par" is restored by an end-group, (and 461 | wrapping is terminated prematurely) so it is unwise to use this as a 462 | test for wrapping-complete. 463 | 464 | \pagetotal - one of many parameters used to compute floating. When 465 | putting a wrapfigure in a parbox, I assign "\let\pagetotal\maxdimen" 466 | (locally!) to signal not-top-of-page and no floating. 467 | 468 | \WF@pspars - the "\parshape" parameters as LaTeX sets them for lists 469 | ("\WF@fudgeparshape"); when wrapping I test it and use it to modify my 470 | own real params for the paragraph. They are also used when "\parshape" 471 | is restored after wrapping. 472 | 473 | \WF@finale - is performed by "\par" when wrapping should end. However, 474 | that might happen inside a group (a list especially), so the subverted 475 | versions of "\par", "\parshape" etc. will be reinstated when the group 476 | ends. Thus, they must themselves test "\c@WF@wrappedlines" < 2 to see 477 | when wrapping is over, and if so, they should just do "\WF@finale" again. 478 | 479 | These are the tests to see if a floating wrapfigure will fit at a particular 480 | spot. These tests are performed at the beginning of every paragraph after 481 | the figure, except in lists etc. ("\pagegoal" - "\pagetotal" is the room 482 | left on the page.) 483 | 484 | > 485 | room_left := \pagegoal - \pagetotal 486 | if room_left < 0 then page overfull already: put figure (on next page) 487 | else 488 | if figure_size > room_left then does not fit 489 | if max(min_stretch, \pagestretch) + extra > room_left 490 | then page can stretch until full: put figure (at top of next page) 491 | fi 492 | else figure fits: put figure 493 | fi fi 494 | < 495 | 496 | Even if a wrapfigure is not floating, it will go through the same logic 497 | to generate a "\pagebreak", and maybe an underfull page, when the current 498 | page can stretch until full. The "min_stretch" depends on whether it is 499 | floating or not: ".5\baselineskip" (floating) "2\baselineskip" (not). The 500 | "extra" is ".5\baselineskip" in either case. These values can be adjusted. 501 | 502 | There are some other `magic numbers' for floating that aren't really so 503 | special, but you must change them together if you change them at all. 504 | To make floating wrapfigures float less and fit on pages more frequently, 505 | but not change the number of wrapped lines, decrease the "1.5" in 506 | "\global\advance\WF@size1.5\baselineskip" and increase the "1.1" in 507 | "\advance\WF@size1.1\baselineskip" by the same amount (and vice versa). 508 | To make more (or fewer) wrapped lines for the same size figure, without 509 | changing the floating, change "1.1" in "\advance\WF@size1.1\baselineskip" 510 | unilaterally. 511 | 512 | %%%%% ----- End Instructions ----- %%%%% 513 | 514 | Test file integrity: ASCII 32-57, 58-126: !"#$%&'()*+,-./0123456789 515 | :;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\]^_`abcdefghijklmnopqrstuvwxyz{|}~ --------------------------------------------------------------------------------