-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathbrain.tex
319 lines (297 loc) · 11.2 KB
/
brain.tex
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
%%%
% BeGiN
% Wed 19 Jun 2013 14:06:02 EDT
%%%
%% Presentation make-shift "class"...
% The paper and font size are chosen as with the 'Beamer' document
% class :: these sizes can be adjusted for various projector
% capabilities, including:
% (*) 144mm:90mm (16:10),
% (*) 120mm:96mm (16:9),
% (*) 160mm:90mm (HDTV 720p/i),
% (*) 192mm:108mm (HDTV 1080p/i), &
% (*) 128mm:96mm (Beamer's default).
% (*) 216mm:279mm (ANSI A papersize, aka 'letter')
\documentclass[ %
paper=279mm:216mm, % 'letter' size paper, landscape mode
fontsize=12pt, % 12pt font selection
twoside,
pagesize=auto, % write page size to dvi or pdf
version=last,
numbers=noendperiod,% removes points for special parts (e.g. appendix)
captions=nooneline, % do not distinguish between one or more lines in captions
DIV=calc
]{scrartcl}
\usepackage{scrpage2}
\setkomafont{pagehead}{\normalfont\footnotesize\sffamily\bfseries}
\setkomafont{pagenumber}{\normalfont\footnotesize\sffamily\bfseries}
\deftripstyle{CPI}[0pt][0.5pt]{\rightmark}{}{\thepage}{}{}{}
\pagestyle{CPI}
\typearea[current]{calc}
\areaset[current]{\textwidth}{\textheight}
\usepackage{multicol} % better column-balancing
\setlength{\columnsep}{1cm}
\setlength{\columnseprule}{0.4pt}
\setlength{\topmargin}{-2cm}
\setlength{\oddsidemargin}{0cm}
\setlength{\evensidemargin}{\oddsidemargin}
%
\usepackage{cmap}
\usepackage{datetime}
\renewcommand{\dateseparator}{-}
\settimeformat{hhmmsstime}
\newcommand{\todayiso}{\the\year \dateseparator \shortmonthname \dateseparator \twodigit\day}
\newcommand{\semver}{[DDF \href{http://semver.org/}{v1.0.0}]}
\usepackage{ae,aecompl,aeguill}
\usepackage{fix-cm}
\usepackage{lmodern} % latin modern font
\usepackage[T1]{fontenc} % for correct hyphenation and T1 encoding
\usepackage[protrusion=true,expansion=false]{microtype} % for character protrusion and font expansion (only with pdflatex)
\usepackage[raise]{engord}
\usepackage{ucs}
\usepackage[utf8x]{inputenc}
\usepackage[x11names]{xcolor}
\usepackage{graphicx}
\usepackage{csquotes} % for inline quotations
\usepackage{ccicons} % for CC licenses
\usepackage{tikz} % sophisticated graphics package
\usepackage{mathtools}
\usepackage{dsfont,amstext,amssymb,amsbsy,amsopn,amsthm}
\usepackage[charter]{mathdesign}
\renewcommand{\sfdefault}{fvs}
\renewcommand{\ttdefault}{fvm}
\DeclareMathAlphabet{\mathpzc}{T1}{pzc}{m}{it} % $\mathpzc{F}$
% \usepackage{bm} % for bold math symbols
\usepackage{eucal}
\usepackage{empheq}
\usepackage{pifont}
\usepackage{textcomp}
\usepackage{wasysym}
\usepackage{calc} % working with lengths, counters etc.
\usepackage[ %
includeheadfoot, %
vmargin=1cm, %
hmargin=2cm %
]{geometry} % set page layout parameters
\usepackage[3D]{movie15}
\usepackage{xkeyval}
\usepackage{lipsum} % just some lorem-ipsum text filling
\usepackage{fancyvrb}
\usepackage[colorlinks=true,urlcolor=RoyalBlue3,linkcolor=OrangeRed3,citecolor=SpringGreen3,linktocpage=true]{hyperref}
\hypersetup{
pdftitle = {Digital Reading: two-column landscape format using KOMA scripts},
pdfauthor = {D.D. Ferrante <[email protected]>},
pdfsubject = {eReading},
pdfcreator = {LaTeX2e with hyperref package},
pdfproducer = {pdflatex},
pdfkeywords = {Open Access, Open, Access, eReader, Digital, Reading, Online, LaTeX, KOMA},
pdfview = {FitH},
pdflang = {en_US}
}
\usepackage{bookmark}
\usepackage{cite}
%
%% extensible `=' sign :: \stakrel{\text{definition}}{\hbox{\equalsfill}}
\makeatletter
\def\equalsfill{$\m@th\mathord=\mkern-7mu
\cleaders\hbox{$\!\mathord=\!$}\hfill
\mkern-7mu\mathord=$}
\makeatother
%% Hooked Square Root sign...
\def\hksqrt{\mathpalette\DHLhksqrt}
\def\DHLhksqrt#1#2{\setbox0=\hbox{$#1\sqrt{#2\,}$}\dimen0=\ht0
\advance\dimen0-0.2\ht0
\setbox2=\hbox{\vrule height\ht0 depth -\dimen0}%
{\box0\lower0.4pt\box2}}
%
\title{Online Reading: two-column landscape format using KOMA-scripts}
\author{\sffamily Daniel D. Ferrante\footnote{
\href{http://www.het.brown.edu/people/danieldf/}{\copyright}\; \semver\,,\;
\href{http://creativecommons.org/licenses/by-nc-sa/3.0/}{\ccbyncsa}\,.}}
\date{\sffamily\todayiso}
%
%%
\begin{document}
%
\maketitle
%
\begin{multicols}{2}
\tableofcontents
\section{Original Motivation}
The original motivation came from
``\href{http://scholardox.wordpress.com/2013/05/29/two-column-landscape-should-be-the-standard-format-of-scholarly-online-articles/}
{\emph{Advocating two-column landscape format for scholarly online articles}}''.
However, because of typographical issues, among some other, I personally prefer
to use the \href{http://www.ctan.org/pkg/koma-script}{KOMA-scripts}. Thus, I
just wrote a \LaTeX\/ template that suited me better.
\section{Text Example: \textit{Lorem Ipsum} and the Balancing of Columns}
\lipsum
\section{Multimedia Example: 3D Object and Control Toolbar}
\includemovie[ %
poster, %
toolbar, % same as `controls'
attach=true, %
label=brain.u3d, %
text=(brain.u3d),%
3Droo=42.473432080582924, %
3Dcoo=-3.474954605102539 1.9501128196716309 6.208690643310547, %
3Dc2c=-0.9117389917373657 -0.24471230804920197 -0.32992100715637207, %
3Droll=-164.74804232815612, %
3Dlights=CAD, %
3Drender=SolidWireframe, %
]{\linewidth}{\linewidth}{brain.u3d}
\section{Some Itemized Equations for Good Measure, and Some Mathematical Fonts}
Before we proceed and show the code used to generate this file, let us create
a list with some equations, just to see how things turn out:
\begin{itemize}
\item Let us open up the first item in a very cliché fashion with an inline
equation: $E^2 = (m\, c^2)^2 + (p\, c)^2 \rightsquigarrow (\Box + m^2)\, \psi = 0$.
\item Now we can move on to something more interesting, \emph{e.g.},
\begin{align*}
\mathscr{Z}(J) &= \int e^{i\, S(\phi,\, J)}\, \mathcal{D}\phi \;;\\
\mathpzc{Z}{}_{\mathds{M}}[\mathfrak{J}]&= \varint_{\mathds{M}}
e^{i\, S[\boldsymbol{\Phi};\, \mathfrak{J}]}\, \mathpzc{D}\boldsymbol{\Phi}\;.
\end{align*}
\end{itemize}
\section{Ti\emph{k}Z/PGF Example}
\begin{center}
\begin{tikzpicture}[scale=1]
\foreach \t in {0,0.1,...,.8} {
\pgfmathsetmacro\x{6*\t^3 + 4 * 3 * \t^2*(1 - \t) + 2 * 3 * \t * (1 -\t)^2 + 0 * (1 - \t)^3}
\pgfmathsetmacro\z{1*\t^3 + 1 * 3 * \t^2*(1 - \t) + -1 * 3 * \t * (1 -\t)^2 + -1 * (1 - \t)^3 + 2}
\pgfmathsetmacro\tt{\t+.1}
\pgfmathsetmacro\xx{6*\tt^3 + 4 * 3 * \tt^2*(1 - \tt) + 2 * 3 * \tt * (1 -\tt)^2 + 0 * (1 - \tt)^3}
\pgfmathsetmacro\zz{1*\tt^3 + 1 * 3 * \tt^2*(1 - \tt) + -1 * 3 * \tt * (1 -\tt)^2 + -1 * (1 - \tt)^3 + 2}
% If second control is relative, it is relative to second end point!
\path[shade=axis, top color=green!50!black, bottom color=green!50!black, middle color=green]
(\xx,0,-\zz)
.. controls +(0,-.417,0) and +(0,.155,.387) ..
++(0,-0.928,-0.629)
-- (\x, -0.928,-\z-.629)
.. controls +(0,.155,.387) and +(0,-.417,0) ..
++(0,.928,.629)
.. controls +(0,.555,0) and +(0,0,.555) ..
++(0,1,-1)
.. controls +(0,0,-.139) and +(0,.0516,.129) ..
++(0,-.072,-.371)
-- (\xx,0.928,-\zz-2+.629)
.. controls +(0,.0516,.129) and +(0,0,-.139) ..
++(0,.072,.371)
.. controls +(0,0,.555) and +(0,.555,0) ..
++(0,-1,1);
\pgfmathsetmacro{\zz}{-\zz+2}
\pgfmathsetmacro{\z}{-\z+2}
\path[shade=axis, top color=green!50!black, bottom color=green!50!black, middle color=green]
(\xx,0,-\zz)
.. controls +(0,-.417,0) and +(0,.155,.387) ..
++(0,-0.928,-0.629)
-- (\x, -0.928,-\z-.629)
.. controls +(0,.155,.387) and +(0,-.417,0) ..
++(0,.928,.629)
.. controls +(0,.555,0) and +(0,0,.555) ..
++(0,1,-1)
.. controls +(0,0,-.139) and +(0,.0516,.129) ..
++(0,-.072,-.371)
-- (\xx,0.928,-\zz-2+.629)
.. controls +(0,.0516,.129) and +(0,0,-.139) ..
++(0,.072,.371)
.. controls +(0,0,.555) and +(0,.555,0) ..
++(0,-1,1);
}
\foreach \t in {0.8,0.9,...,1} {
\pgfmathsetmacro\x{6*\t^3 + 4 * 3 * \t^2*(1 - \t) + 2 * 3 * \t * (1 -\t)^2 + 0 * (1 - \t)^3}
\pgfmathsetmacro\z{1*\t^3 + 1 * 3 * \t^2*(1 - \t) + -1 * 3 * \t * (1 -\t)^2 + -1 * (1 - \t)^3 + 2}
\pgfmathsetmacro\tt{\t+.1}
\pgfmathsetmacro\xx{6*\tt^3 + 4 * 3 * \tt^2*(1 - \tt) + 2 * 3 * \tt * (1 -\tt)^2 + 0 * (1 - \tt)^3}
\pgfmathsetmacro\zz{1*\tt^3 + 1 * 3 * \tt^2*(1 - \tt) + -1 * 3 * \tt * (1 -\tt)^2 + -1 * (1 - \tt)^3 + 2}
%\path[shade=axis, top color=red, bottom color=black]
% If second control is relative, it is relative to second end point!
\path[shade=axis, top color=black, bottom color=black, middle color=red!70!black]
(\xx,0,-\zz-2)
.. controls +(0,-.555,0) and +(0,0,-.555) ..
++(0,-1,1)
.. controls +(0,0,.139) and +(0,-.0516,-.129) ..
++(0,.072,.371)
-- (\x,-0.928,-\z-.629)
.. controls +(0,-.0516,-.129) and +(0,0,.139) ..
++(0,-.072,-.371)
.. controls +(0,0,-.555) and +(0,-.555,0) ..
++(0,1,-1)
.. controls +(0,+.417,0) and +(0,-.155,-.387) ..
++(0,+0.928,+0.629)
-- (\xx, +0.928,-\zz-2+.629)
.. controls +(0,-.155,-.387) and +(0,.417,0) ..
++(0,-.928,-.629)
-- (\xx,0,-\zz-2);
\path[shade=axis, top color=green!50!black, bottom color=green!50!black, middle color=green]
(\xx,0,-\zz)
.. controls +(0,-.417,0) and +(0,.155,.387) ..
++(0,-0.928,-0.629)
-- (\x, -0.928,-\z-.629)
.. controls +(0,.155,.387) and +(0,-.417,0) ..
++(0,.928,.629)
.. controls +(0,.555,0) and +(0,0,.555) ..
++(0,1,-1)
.. controls +(0,0,-.139) and +(0,.0516,.129) ..
++(0,-.072,-.371)
-- (\xx,0.928,-\zz-2+.629)
.. controls +(0,.0516,.129) and +(0,0,-.139) ..
++(0,.072,.371)
.. controls +(0,0,.555) and +(0,.555,0) ..
++(0,-1,1);
\pgfmathsetmacro{\zz}{-\zz+2}
\pgfmathsetmacro{\z}{-\z+2}
% If second control is relative, it is relative to second end point!
\path[shade=axis, top color=black, bottom color=black, middle color=red!70!black]
(\xx,0,-\zz-2)
.. controls +(0,-.555,0) and +(0,0,-.555) ..
++(0,-1,1)
.. controls +(0,0,.139) and +(0,-.0516,-.129) ..
++(0,.072,.371)
-- (\x,-0.928,-\z-.629)
.. controls +(0,-.0516,-.129) and +(0,0,.139) ..
++(0,-.072,-.371)
.. controls +(0,0,-.555) and +(0,-.555,0) ..
++(0,1,-1)
.. controls +(0,+.417,0) and +(0,-.155,-.387) ..
++(0,+0.928,+0.629)
-- (\xx, +0.928,-\zz-2+.629)
.. controls +(0,-.155,-.387) and +(0,.417,0) ..
++(0,-.928,-.629)
-- (\xx,0,-\zz-2);
\path[shade=axis, top color=green!50!black, bottom color=green!50!black, middle color=green]
(\xx,0,-\zz)
.. controls +(0,-.417,0) and +(0,.155,.387) ..
++(0,-0.928,-0.629)
-- (\x, -0.928,-\z-.629)
.. controls +(0,.155,.387) and +(0,-.417,0) ..
++(0,.928,.629)
.. controls +(0,.555,0) and +(0,0,.555) ..
++(0,1,-1)
.. controls +(0,0,-.139) and +(0,.0516,.129) ..
++(0,-.072,-.371)
-- (\xx,0.928,-\zz-2+.629)
.. controls +(0,.0516,.129) and +(0,0,-.139) ..
++(0,.072,.371)
.. controls +(0,0,.555) and +(0,.555,0) ..
++(0,-1,1);
}
\end{tikzpicture}
\end{center}
\section{Code Used to Generate this File}
To compile this file you just need to run \texttt{pdflatex} on it as many
times as necessary. Also, note that the order of some of the packages is
important, for example, \texttt{hyperref} should be loaded before
\texttt{bookmark}. Lastly, in order to access and make use of the multimedia
file embedded, you need to use the \href{http://get.adobe.com/reader/}
{Adobe Acrobat Reader}, for it seems to be the only one that implemented such
features.
\fvset{fontsize=\tiny,numbers=left,numbersep=2pt}
\VerbatimInput{brain.tex}
\end{multicols}
%
%
\end{document}
%%%
% eNd
%%%