diff --git a/Classes/PhDThesisPSnPDF.cls b/Classes/PhDThesisPSnPDF.cls index 5d68ac5..981df4b 100644 --- a/Classes/PhDThesisPSnPDF.cls +++ b/Classes/PhDThesisPSnPDF.cls @@ -25,8 +25,6 @@ \newif\if@print\@printfalse \DeclareOption{print}{\@printtrue} -\newif\ifPHD@draft\PHD@draftfalse - % ****************************** Define index ********************************** \newif\ifPHD@index\PHD@indexfalse \DeclareOption{index}{\PHD@indextrue} @@ -130,7 +128,7 @@ PhD thesis guidelines recommend using A4 or A5paper} \DeclareOption{twoside}{\PassOptionsToClass{\CurrentOption}{book}}% % Draft Mode -\DeclareOption{draft}{\PassOptionsToClass{\CurrentOption}{book}\PHD@drafttrue}% +\DeclareOption{draft}{\PassOptionsToClass{\CurrentOption}{book}}% % Generates Warning for unknown options \DeclareOption*{ @@ -174,7 +172,6 @@ supported!} \if@print % For Print version \hypersetup{ - final=true, plainpages=false, pdfstartview=FitV, pdftoolbar=true, @@ -210,7 +207,6 @@ supported!} \else % For PDF Online version \hypersetup{ - final=true plainpages=false, pdfstartview=FitV, pdftoolbar=true, @@ -242,13 +238,6 @@ supported!} \fi -\ifPHD@draft -\usepackage[switch,pagewise,mathlines]{lineno} -\renewcommand{\frontmatter}{\nolinenumbers} -\renewcommand{\mainmatter}{\linenumbers} -\renewcommand{\backmatter}{\linenumbers} - -\fi % ****************************************************************************** % ******************************** Packages ************************************ @@ -378,7 +367,7 @@ font in the preamble.tex file by specifying `customfont' in the class options} % PDFLaTeX does it automatically. \ifsetDVI -\RequirePackage{breakurl} % to split the url over multiple lines +\RequirePackage{sty/breakurl} % to split the url over multiple lines \fi % ****************************************************************************** diff --git a/sty/breakurl.sty b/sty/breakurl.sty new file mode 100644 index 0000000..ea9181b --- /dev/null +++ b/sty/breakurl.sty @@ -0,0 +1,314 @@ +%% +%% This is file `breakurl.sty', +%% generated with the docstrip utility. +%% +%% The original source files were: +%% +%% breakurl.dtx (with options: `package') +%% +%% This is a generated file. +%% +%% Copyright (C) 2005 by Vilar Camara Neto. +%% +%% This file may be distributed and/or modified under the +%% conditions of the LaTeX Project Public License, either +%% version 1.2 of this license or (at your option) any later +%% version. The latest version of this license is in: +%% +%% http://www.latex-project.org/lppl.txt +%% +%% and version 1.2 or later is part of all distributions of +%% LaTeX version 1999/12/01 or later. +%% +%% Currently this work has the LPPL maintenance status "maintained". +%% +%% The Current Maintainer of this work is Vilar Camara Neto. +%% +%% This work consists of the files breakurl.dtx and +%% breakurl.ins and the derived file breakurl.sty. +%% +\NeedsTeXFormat{LaTeX2e}[1999/12/01] +\ProvidesPackage{breakurl} + [2013/04/10 v1.40 Breakable hyperref URLs] + + +\RequirePackage{xkeyval} +\RequirePackage{ifpdf} + +\ifpdf + % Dummy package options + \DeclareOptionX{preserveurlmacro}{} + \DeclareOptionX{hyphenbreaks}{} + \DeclareOptionX{anythingbreaks}{} + \DeclareOptionX{vertfit}{} + \ProcessOptionsX\relax + + \PackageWarning{breakurl}{% + You are using breakurl while processing via pdflatex.\MessageBreak + \string\burl\space will be just a synonym of \string\url.\MessageBreak} + \DeclareRobustCommand{\burl}{\url} + \DeclareRobustCommand*{\burlalt}{\hyper@normalise\burl@alt} + \def\burl@alt#1#2{\hyper@linkurl{\Hurl{#1}}{#2}} + \expandafter\endinput +\fi + +\@ifpackageloaded{hyperref}{}{% + \PackageError{breakurl}{The breakurl depends on hyperref package}% + {I can't do anything. Please type X , edit the source file% + \MessageBreak + and add \string\usepackage\string{hyperref\string} before + \string\usepackage\string{breakurl\string}.} + \endinput +} + +\newif\if@preserveurlmacro\@preserveurlmacrofalse +\newif\if@burl@fitstrut\@burl@fitstrutfalse +\newif\if@burl@fitglobal\@burl@fitglobalfalse +\newif\if@burl@anythingbreaks\@burl@anythingbreaksfalse + +\newtoks\burl@toks + +\let\burl@charlistbefore\empty +\let\burl@charlistafter\empty + +\def\burl@addtocharlistbefore{\g@addto@macro\burl@charlistbefore} +\def\burl@addtocharlistafter{\g@addto@macro\burl@charlistafter} + +\bgroup + \catcode`\&=12\relax + \hyper@normalise\burl@addtocharlistbefore{%} + \hyper@normalise\burl@addtocharlistafter{:/.?#&_,;!} +\egroup + +\def\burl@growmif#1#2{% + \g@addto@macro\burl@mif{\def\burl@ttt{#1}\ifx\burl@ttt\@nextchar#2\else}% +} +\def\burl@growmfi{% + \g@addto@macro\burl@mfi{\fi}% +} +\def\burl@defifstructure{% + \let\burl@mif\empty + \let\burl@mfi\empty + \expandafter\@tfor\expandafter\@nextchar\expandafter:\expandafter=% + \burl@charlistbefore\do{% + \expandafter\burl@growmif\@nextchar\@burl@breakbeforetrue + \burl@growmfi + }% + \expandafter\@tfor\expandafter\@nextchar\expandafter:\expandafter=% + \burl@charlistafter\do{% + \expandafter\burl@growmif\@nextchar\@burl@breakaftertrue + \burl@growmfi + }% +} + +\AtEndOfPackage{\burl@defifstructure} + +\def\burl@setvertfit#1{% + \lowercase{\def\burl@temp{#1}}% + \def\burl@opt{local}\ifx\burl@temp\burl@opt + \@burl@fitstrutfalse\@burl@fitglobalfalse + \else\def\burl@opt{strut}\ifx\burl@temp\burl@opt + \@burl@fitstruttrue\@burl@fitglobalfalse + \else\def\burl@opt{global}\ifx\burl@temp\burl@opt + \@burl@fitstrutfalse\@burl@fitglobaltrue + \else + \PackageWarning{breakurl}{Unrecognized vertfit option `\burl@temp'.% + \MessageBreak + Adopting default `local'} + \@burl@fitstrutfalse\@burl@fitglobalfalse + \fi\fi\fi +} + +\DeclareOptionX{preserveurlmacro}{\@preserveurlmacrotrue} +\DeclareOptionX{hyphenbreaks}{% + \bgroup + \catcode`\&=12\relax + \hyper@normalise\burl@addtocharlistafter{-}% + \egroup +} +\DeclareOptionX{anythingbreaks}{% + \@burl@anythingbreakstrue +} +\DeclareOptionX{vertfit}[local]{\burl@setvertfit{#1}} + +\ProcessOptionsX\relax + +\def\burl@hyper@linkurl#1#2{% + \begingroup + \hyper@chars + \burl@condpdflink{#1}% + \endgroup +} + +\def\burl@condpdflink#1{% + \literalps@out{ + /burl@bordercolor {\@urlbordercolor} def + /burl@border {\@pdfborder} def + }% + \if@burl@fitstrut + \sbox\pdf@box{#1\strut}% + \else\if@burl@fitglobal + \sbox\pdf@box{\burl@url}% + \else + \sbox\pdf@box{#1}% + \fi\fi + \dimen@\ht\pdf@box\dimen@ii\dp\pdf@box + \sbox\pdf@box{#1}% + \ifdim\dimen@ii=\z@ + \literalps@out{BU.SS}% + \else + \lower\dimen@ii\hbox{\literalps@out{BU.SS}}% + \fi + \ifHy@breaklinks\unhbox\else\box\fi\pdf@box + \ifdim\dimen@=\z@ + \literalps@out{BU.SE}% + \else + \raise\dimen@\hbox{\literalps@out{BU.SE}}% + \fi + \pdf@addtoksx{H.B}% +} + +\DeclareRobustCommand*{\burl}{% + \leavevmode + \begingroup + \let\hyper@linkurl=\burl@hyper@linkurl + \catcode`\&=12\relax + \hyper@normalise\burl@ +} + +\DeclareRobustCommand*{\burlalt}{% + \begingroup + \let\hyper@linkurl=\burl@hyper@linkurl + \catcode`\&=12\relax + \hyper@normalise\burl@alt +} + +\newif\if@burl@breakbefore +\newif\if@burl@breakafter +\newif\if@burl@prevbreakafter + +\bgroup +\catcode`\&=12\relax +\gdef\burl@#1{% + \def\burl@url{#1}% + \def\burl@urltext{#1}% + \burl@doit +} + +\gdef\burl@alt#1{% + \def\burl@url{#1}% + \hyper@normalise\burl@@alt +} +\gdef\burl@@alt#1{% + \def\burl@urltext{#1}% + \burl@doit +} + +\gdef\burl@doit{% + \burl@toks{}% + \let\burl@UrlRight\UrlRight + \let\UrlRight\empty + \@burl@prevbreakafterfalse + \@ifundefined{@urlcolor}{\Hy@colorlink\@linkcolor}{\Hy@colorlink\@urlcolor}% + \expandafter\@tfor\expandafter\@nextchar\expandafter:\expandafter=% + \burl@urltext\do{% + \if@burl@breakafter\@burl@prevbreakaftertrue + \else\@burl@prevbreakafterfalse\fi + \if@burl@anythingbreaks\@burl@breakbeforetrue\else\@burl@breakbeforefalse\fi + \@burl@breakafterfalse + \expandafter\burl@mif\burl@mfi + \if@burl@breakbefore + % Breakable if the current char is in the `can break before' list + \burl@flush\linebreak[0]% + \else + \if@burl@prevbreakafter + \if@burl@breakafter\else + % Breakable if the current char is not in any of the `can break' + % lists, but the previous is in the `can break after' list. + % This mechanism accounts for sequences of `break after' characters, + % where a break is allowed only after the last one + \burl@flush\linebreak[0]% + \fi + \fi + \fi + \expandafter\expandafter\expandafter\burl@toks + \expandafter\expandafter\expandafter{% + \expandafter\the\expandafter\burl@toks\@nextchar}% + }% + \let\UrlRight\burl@UrlRight + \burl@flush + \literalps@out{BU.E}% + \Hy@endcolorlink + \endgroup +} +\egroup + +\def\the@burl@toks{\the\burl@toks} + +\def\burl@flush{% + \expandafter\def\expandafter\burl@toks@def\expandafter{\the\burl@toks}% + \literalps@out{/BU.L (\burl@url) def}% + \hyper@linkurl{\expandafter\Hurl\expandafter{\burl@toks@def}}{\burl@url}% + \global\burl@toks{}% + \let\UrlLeft\empty +}% + +\if@preserveurlmacro\else\let\url\burl\let\urlalt\burlalt\fi + +\AtBeginDvi{% + \headerps@out{% + /burl@stx null def + /BU.S { + /burl@stx null def + } def + /BU.SS { + currentpoint + /burl@lly exch def + /burl@llx exch def + burl@stx null ne {burl@endx burl@llx ne {BU.FL BU.S} if} if + burl@stx null eq { + burl@llx dup /burl@stx exch def /burl@endx exch def + burl@lly dup /burl@boty exch def /burl@topy exch def + } if + burl@lly burl@boty gt {/burl@boty burl@lly def} if + } def + /BU.SE { + currentpoint + /burl@ury exch def + dup /burl@urx exch def /burl@endx exch def + burl@ury burl@topy lt {/burl@topy burl@ury def} if + } def + /BU.E { + BU.FL + } def + /BU.FL { + burl@stx null ne {BU.DF} if + } def + /BU.DF { + BU.BB + [ /H /I /Border [burl@border] /Color [burl@bordercolor] + /Action << /Subtype /URI /URI BU.L >> /Subtype /Link BU.B /ANN pdfmark + /burl@stx null def + } def + /BU.BB { + burl@stx HyperBorder sub /burl@stx exch def + burl@endx HyperBorder add /burl@endx exch def + burl@boty HyperBorder add /burl@boty exch def + burl@topy HyperBorder sub /burl@topy exch def + } def + /BU.B { + /Rect[burl@stx burl@boty burl@endx burl@topy] + } def + /eop where { + begin + /@ldeopburl /eop load def + /eop { SDict begin BU.FL end @ldeopburl } def + end + } { + /eop { SDict begin BU.FL end } def + } ifelse + }% +} +\endinput +%% +%% End of file `breakurl.sty'. diff --git a/thesis.pdf b/thesis.pdf index bba894c..3cea829 100644 Binary files a/thesis.pdf and b/thesis.pdf differ diff --git a/thesis.ps b/thesis.ps index aabb34f..b97db51 100644 --- a/thesis.ps +++ b/thesis.ps @@ -1,7 +1,7 @@ %!PS-Adobe-2.0 %%Creator: dvips(k) 5.992 Copyright 2012 Radical Eye Software %%Title: thesis.dvi -%%CreationDate: Mon Apr 21 15:07:59 2014 +%%CreationDate: Mon Apr 21 16:05:45 2014 %%Pages: 39 %%PageOrder: Ascend %%BoundingBox: 0 0 596 842 @@ -13,7 +13,7 @@ %DVIPSWebPage: (www.radicaleye.com) %DVIPSCommandLine: dvips -o thesis.ps thesis.dvi %DVIPSParameters: dpi=600 -%DVIPSSource: TeX output 2014.04.21:1507 +%DVIPSSource: TeX output 2014.04.21:1605 %%BeginProcSet: tex.pro 0 0 %! /TeXDict 300 dict def TeXDict begin/N{def}def/B{bind def}N/S{exch}N/X{S