Masters of Illustrator can probably chop-chop-compose such a thing in a flash. I, however, abruptly failed as I tried to insert formulae. Why not directly script it in latex, I thought. So I unearthed the big old latex manuals and learned about \multicolumn and \cline. Eventually, I came up with the following code:
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 | \begin{tabular}{|l|c|l|c|l|} \multicolumn{1}{c}{} &\multicolumn{2}{c}{$e_i$} &\multicolumn{2}{c}{$e_{i+1}$}\\ \multicolumn{1}{c}{$D$} &\multicolumn{2}{c}{$\overbrace{\hspace{1cm}}^{}$} &\multicolumn{2}{c}{$\overbrace{\hspace{1cm}}^{}$} \\\cline{1-1} $P_1$ &\multicolumn{1}{c}{} &\multicolumn{1}{c}{} &\multicolumn{1}{c}{} &\multicolumn{1}{c}{} \\\cline{1-1} $\vdots$ &\multicolumn{1}{c}{} &\multicolumn{1}{c}{$W$} &\multicolumn{1}{c}{} &\multicolumn{1}{c}{} \\\cline{1-1} \cline{3-3} $P_{i}$ &$\longleftrightarrow$ &$V_0$ &\multicolumn{1}{c}{} &\multicolumn{1}{c}{$W$} \\\cline{3-3} \cline{1-1}\cline{5-5} $P_{i+1}$ &$\longleftrightarrow$ &$V_1$ &$\longleftrightarrow$ &$V_0$ \\\cline{3-3} \cline{1-1} \cline{5-5} $P_{i+2}$ &$\longleftrightarrow$ &$V_2$ &$\longleftrightarrow$ &$V_1$ \\\cline{3-3} \cline{1-1} \cline{5-5} $\vdots$ &$\longleftrightarrow$ &$\vdots$ &$\longleftrightarrow$ &$V_2$ \\\cline{3-3} \cline{1-1}\cline{5-5} $P_{i+k}$ &$\longleftrightarrow$ &$V_k$ &$\longleftrightarrow$ &$\vdots$ \\\cline{3-3} \cline{1-1} \cline{5-5} $P_{i+k+1}$ & \multicolumn{1}{c}{} &\multicolumn{1}{c}{}& $\longleftrightarrow$ &$V_k$ \\\cline{1-1} \cline{5-5} $\vdots$ &\multicolumn{1}{c}{} &\multicolumn{1}{c}{} &\multicolumn{1}{c}{} &\multicolumn{1}{c}{} \\\cline{1-1} $P_m$ &\multicolumn{1}{c}{} &\multicolumn{1}{c}{} &\multicolumn{1}{c}{} &\multicolumn{1}{c}{} \\\cline{1-1} \multicolumn{1}{c}{} &\multicolumn{1}{c}{} &\multicolumn{1}{c}{} &\multicolumn{1}{c}{} &\multicolumn{1}{c}{} \\ \end{tabular} |
and
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 | \begin{tabular}{|c|c|c|c|c|c|c|c|c|} \hline $P_1$ &$\hdots$ &$P_{i}$ &$P_{i+1}$ &$P_{i+2}$ &$\hdots$ &$P_{i+k}$ &$\hdots$ &$P_m$ \\\hline \multicolumn{1}{c}{} &\multicolumn{1}{c}{} &\multicolumn{1}{c}{$\updownarrow$} & \multicolumn{1}{c}{$\updownarrow$} & \multicolumn{1}{c}{$\updownarrow$} & \multicolumn{1}{c}{$\hdots$} & \multicolumn{1}{c}{$\updownarrow$} & \multicolumn{2}{c}{} \\\cline{3-7} \multicolumn{1}{c}{} & & $V_{0}$ & $V_{1}$ & $V_{2}$ & $\hdots$ & $V_{k}$ & \multicolumn{2}{c}{} \\\cline{3-7} \end{tabular} |
The trick is to create borderless cells using \multicolumn and then fill in horizontal lines with \cline. You’re welcome. Now back to work!
]]>1 2 3 4 5 | \documentclass[a4paper,12pt]{report} \usepackage{amsmath,amssymb,amsthm} \begin{document} text \end{document} |
The following template could be employed for a more advanced text, such as a thesis:
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 | \documentclass[a4paper,twoside,12pt]{scrbook} \usepackage{amsmath,amssymb,amsthm} \usepackage[footnotesize,sl,SL,hang,tight]{subfigure} % helpful package for aligning figures next to each other \usepackage{longtable} % tables over several pages \usepackage[font={small,sl},hang,labelfont=bf]{caption} % configure captions \usepackage{captcont} % continue sufigures over several pages \usepackage{booktabs} % publication quality tables for LaTeX %\usepackage{showkeys} % shows the labels above the references for easier development \usepackage{mathrsfs} \ifpdfoutput{% \usepackage[pdftex]{graphicx} \usepackage[]{pdfpages} %for including full pdf pages }{% \usepackage{graphicx} } \usepackage{wrapfig} % wraping text around figures \usepackage{rotating} % rotate figures \usepackage{verbatim} % multiline comment \usepackage{algorithmic} \usepackage[headinclude]{scrpage2} %\KOMAoptions{headinclude} % Font packages: \usepackage{times} \usepackage{helvet} % sets sans serif font \usepackage[T1]{fontenc} %\usepackage{lmodern} %PDF hyperref config \ifpdfoutput{% \usepackage[pdftex, a4paper, bookmarks, bookmarksopen=true, bookmarksnumbered=true, pdfauthor={Alfredo Albino}, pdftitle={My Life And More}, colorlinks, linkcolor=black, citecolor=black, filecolor=black, urlcolor=black, anchorcolor=black, menucolor=black, breaklinks=true, pageanchor=true, plainpages=false, pdfpagelabels=true]{hyperref} }{} \ifpdfoutput{% \pdfcompresslevel=9 \pdfoutput=1 \DeclareGraphicsExtensions{.pdf,.png} }{} \bibliographystyle{alpha} \pagestyle{useheadings} % A4 \topmargin -0.5in \textheight 9.3in \textwidth 6.3in \oddsidemargin 0.18in \evensidemargin -0.22in \parskip 0.1in \parindent 0in \renewcommand{\arraystretch}{1.5} \renewcommand{\baselinestretch}{1} \begin{document} \begin{titlepage} \topmargin 1.0cm \oddsidemargin 0.0cm \evensidemargin 0.0cm %\textwidth 6.5in \centering \Huge \vspace{2.0cm} \textbf{\textsf{My Life And More}} \\[1.5cm] %\includegraphics*[width=0.4\textwidth]{image} \\[1.5cm] \vspace{2.0cm} \sffamily \Large Alfredo Albino \\[0.8cm] \large BEST University \\ August 2010 \\[1.3cm] Prof. Dr. Alfons Aareweg \vfill %\includegraphics*[width=0.3\textwidth]{logo1} \hfill %\includegraphics*[width=0.3\textwidth]{logo2} \vspace{3.4cm} \end{titlepage} \cleardoublepage \pagenumbering{roman} \setcounter{page}{1} %\include{abstract} \chapter*{Abstract} abstract stuff \cleardoublepage \cleardoublepage %\include{acknowledgment} \chapter*{Acknowledgment} thanks \tableofcontents \cleardoublepage \pagenumbering{arabic} \renewcommand*{\chapterformat}{} % show chapter titles only (no numbers) %\include{chapter1} \chapter{Start} \section{Now} start \appendix \clearpage %\renewcommand*{\chapterpagestyle}{myappendixpagestyle} \addcontentsline{toc}{chapter}{List of Figures} \listoffigures \cleardoublepage \addcontentsline{toc}{chapter}{List of Tables} \listoftables \cleardoublepage \clearpage \renewcommand*{\chapterpagestyle}{empty} %\nocite{*} \addcontentsline{toc}{chapter}{Bibliography} %\bibliography{bib} \end{document} |
We wish to darken the borders of an image in a smooth manner. This can be achieved in probably a hundred thousand ways or more, but I shall present the Quick-Mask-Mode-way.
Select an area using the Marquee Tool (M).
Enter Quick Mask Mode (Q).
To edit the mask you can use any brush, shape, text, filters, etc. Let’s apply a Gaussian blur filter.
Invert the mask (Ctr+I).
Exit Quick Mask Mode (Q).
Edit the masked image to your liking. Open the Levels dialog (Ctr+L) and move the black point slider and the midtone slider up.
Btw: the picture was taken at the Santa Barbara City College.
]]>First, we need some mechanism to render the matrix into a file. Let A be a sparse matrix. We open a file file, iterate over all values in A, and write every item sItem with preceding row and column number into a new line:
1 2 3 4 5 6 7 8 9 10 11 12 13 | QFile *file = OpenFileWriteOnly("A.txt"); if (file != NULL) { SparseRowMatrix::const_iterator it; for (it = A.begin(); it != A.end(); it++) { QString sItem = QString::number(it.data()); QString sLine; sLine.sprintf("%d %d %s \n", it.row(), it.col(), sItem.toAscii().data()); file.write(sLine.toAscii()); } CloseFile(file); } |
Second, we load the matrix into matlab using the following code:
And third, voilà, you can use your all time favorite matlab methods to analyse the sh*t out of A. If you have no favorite one, try
1 | >> spy(A) |
Wow, this matrix surely looks odd…
]]>“That” is defining, restrictive, limiting. Use it to specify which one. You cannot split the sentence into two without losing information.
“Which” is nonrestrictive, non-defining. Use it to add a fact about the noun to the text. You could split the sentence into two. Note that nonrestrictive relative clauses are parenthetic; comas are therefore needed.
In many sentences either one can be employed, but the sentence’s meaning is changed.
“The neighbor’s dog, which I killed yesterday, was purple.”
means “The neighbor’s dog was purple. And also I killed the neighbor’s dog yesterday.”
“The neighbor’s dog that I killed yesterday was purple”
means “Yesterday I killed the neighbor’s purple dog.” They have more than one dog and I killed the purple one. It cannot be split into two sentences: “The neighbor’s dog was purple. Yesterday I killed the neighbor’s dog.” In the second sentence, information about which of the neighbor’s dogs I killed is missing.
“We were donated 8 sequences that comprise between 500 and 1500 frames.” Wrong. It can be split into two sentences: “We were donated 8 sequences. The 8 sequences comprise between 500 and 1500 frames.” Furthermore, “comprise between 500 and 1500 frames” does not define which sequences we were donated. One cannot ask: ”Which 8 sequences?” Answer: “The ones that comprise between 500 and 1500 frames.“ Correct: “We were donated 8 sequences, which comprise between 500 and 1500 frame.”
“The set K contains only numbers, which are larger than k“. Wrong, unless the author wanted to say “The set K contains only numbers.” and “In the set K, all numbers are larger than k.” “Which are larger than k” is not meant to add a fact about K, but to define K. Correct: “The set K contains only numbers that are larger than k.”
This should help careful writers improve their work.
]]>
Start with any object; it can be a placed image, text, a line, a shape, anything… For simplicity, I chose a half-circle.
Select both, right click->Make Clipping Mask
Voilàs!
And the good thing is: Both objects remain in the figure. You can still adjust, move around, or delete both objects individually.
]]>Using
1 | \newcommand{\ve}[1]{\mbox{\bf #1}} |
in your preamble, you can easily write vectors as follows:
1 2 3 | \begin{equation} \mathscr{L}(\ve v_i) = \ve v_i - \frac{1}{\left| N_i \right|} \sum_{j\in N_i} \ve v_j \end{equation} |
You always need matrices. Try this code:
1 2 3 4 5 6 7 8 9 10 | \begin{equation} \begin{pmatrix} A & A_k \end{pmatrix} \begin{pmatrix} D \\ D_k \end{pmatrix} = 0 \end{equation} |
This code comes in handy to define certain funtions or matrices:
1 2 3 4 5 6 7 8 | \begin{equation} A_{ij} = \left\{ \begin{array}{l l} 1 & \quad (i,j) \in K \\ 0 & \quad \text{otherwise} \\ \end{array} \right \end{equation} |
]]>