Created an IS option to do the right thing with languages and babel
This commit is contained in:
45
rubook.sty
45
rubook.sty
@@ -42,8 +42,10 @@
|
||||
\newbool{debug}
|
||||
\newbool{draftbool}
|
||||
\newbool{online}
|
||||
\newbool{IS}
|
||||
\newbool{proof}
|
||||
|
||||
|
||||
%% ---------------- Declaration of Class Options--------------------
|
||||
%% Remember that we have \AtEndOfClass{},\AtEndOfPackage{}
|
||||
%% \AtBeginDocument{}, \AtEndDocument{}
|
||||
@@ -55,26 +57,28 @@
|
||||
%% \PackageError{class-name}{error-text}{help-text}
|
||||
|
||||
% Generalized settings
|
||||
\DeclareOption{debug}{%
|
||||
\booltrue{debug}
|
||||
\typeout{rubook option: debug}%
|
||||
\typeout{DEBUG MODE ENABLED! PREPARE FOR VERBOSITY!}}
|
||||
\DeclareOption{debug}{%
|
||||
\booltrue{debug}
|
||||
\typeout{rubook option: debug}%
|
||||
\typeout{DEBUG MODE ENABLED! PREPARE FOR VERBOSITY!}}
|
||||
|
||||
\DeclareOption{draft}{\booltrue{draftbool}}
|
||||
\DeclareOption{draft}{\booltrue{draftbool}}
|
||||
|
||||
\DeclareOption{IS}{\booltrue{IS}}
|
||||
|
||||
\DeclareOption{online}{
|
||||
\setbool{online}{true}
|
||||
\typeout{rubook option: online}
|
||||
}
|
||||
|
||||
\DeclareOption{forcegraphics}{%
|
||||
\PassOptionsToPackage{final}{graphicx}
|
||||
\PassOptionsToPackage{final}{pdfpages}
|
||||
\PassOptionsToPackage{final}{hyperref}
|
||||
%% add any other elements that should be included in draft
|
||||
\finalifforcegraphics{graphicx}%We have to catch graphicx early
|
||||
\setbool{forcegraphics}{true}\typeout{rubook option: forcegraphics}%
|
||||
}%
|
||||
\typeout{rubook option: online}
|
||||
}
|
||||
|
||||
\DeclareOption{forcegraphics}{%
|
||||
\PassOptionsToPackage{final}{graphicx}
|
||||
\PassOptionsToPackage{final}{pdfpages}
|
||||
\PassOptionsToPackage{final}{hyperref}
|
||||
%% add any other elements that should be included in draft
|
||||
\finalifforcegraphics{graphicx}%We have to catch graphicx early
|
||||
\setbool{forcegraphics}{true}\typeout{rubook option: forcegraphics}%
|
||||
}%
|
||||
|
||||
%%% Memoir test: Memoir Manual 21.2 p.367
|
||||
%% Only works with the memoir class!!!!!!!!!!!!!!!
|
||||
@@ -105,6 +109,11 @@
|
||||
\RequirePackage[utf8]{inputenc}
|
||||
% allows UTF encoding, needed for Icelandic and other accented characters
|
||||
|
||||
\ifbool{IS}
|
||||
{\RequirePackage[english,icelandic]{babel}}%%Icelandic main language
|
||||
{\RequirePackage[icelandic,english]{babel}}%%English main language
|
||||
|
||||
|
||||
% \RequirePackage[autostyle,strict]{csquotes}
|
||||
%% http://mirrors.concertpass.com/tex-archive/macros/latex/contrib/csquotes/csquotes.pdf
|
||||
%% You invoke with \enquote{} and \blockquote{}
|
||||
@@ -153,10 +162,6 @@
|
||||
%% WARNING: If this breaks you will get very very weird errors
|
||||
|
||||
%% ---------------- Miscellaneous Packages ----------------------
|
||||
\RequirePackage{lipsum}
|
||||
% generates some test text for seeing how pages lay out
|
||||
%% usage: \lipsum[STARTNUM-ENDNUM]
|
||||
|
||||
\RequirePackage{booktabs}
|
||||
%% Format tables properly as in a book
|
||||
%% \toprule,\midrule,\bottomrule
|
||||
|
||||
Reference in New Issue
Block a user