<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>Allen J. Hall &#187; LaTeX</title>
	<atom:link href="http://www.allenjhall.com/content/category/work/latex/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.allenjhall.com/content</link>
	<description>Materials Science &#38; Engineering, Productivity, and Life</description>
	<lastBuildDate>Fri, 27 Jan 2012 03:55:25 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.0.1</generator>
		<item>
		<title>Latex Hint: Use your computer leverage to output large amounts of data.</title>
		<link>http://www.allenjhall.com/content/2009/06/09/latex-hint-output-many-graphics-automated/</link>
		<comments>http://www.allenjhall.com/content/2009/06/09/latex-hint-output-many-graphics-automated/#comments</comments>
		<pubDate>Tue, 09 Jun 2009 18:14:32 +0000</pubDate>
		<dc:creator>Allen</dc:creator>
				<category><![CDATA[LaTeX]]></category>
		<category><![CDATA[Work]]></category>
		<category><![CDATA[How To]]></category>

		<guid isPermaLink="false">http://www.allenjhall.com/content/?p=170</guid>
		<description><![CDATA[After a few weeks of doing cryogenic cathodoluminescence spectroscopy on some of my samples, I have gobs and gobs of spectra to look over, and the task is a bit daunting.  Oh sure, you can do so on the computer in many different ways, but often, I need to see my data on the page [...]]]></description>
			<content:encoded><![CDATA[<p>After a few weeks of doing cryogenic cathodoluminescence spectroscopy on some of my samples, I have gobs and gobs of spectra to look over, and the task is a bit daunting.  Oh sure, you can do so on the computer in many different ways, but often, I need to see my data on the page (old school) before I can really sort through it.  Sometimes even then there&#8217;s just too much of it and playing with the data in MatLab all together is critical.</p>
<p>Here&#8217;s what I came up with to help output my data very quickly into a printable document that included numerous graphs.  First, the primary goal of this quick method is to be quick- to get tons of graphics (of same proportions) into a doc for printing or perusing.  Second- it should be relatively minimal typing, if possible.  [We all know we can do it by hand 100x; while grad-student pay rate is low, there's gotta be a better way.]</p>
<ol>
<li>Get a directory listing for all the items wanted to be included and dump this in a text file.  (ls *.pdf &gt; filelist.tex)</li>
<li>Create a main.tex file which includes the code we&#8217;ll need to do this fast.  [You can reuse this file for other directories of graphics needed to be printed.]  My example uses the following:
<pre>\documentclass[%
,secnumarabic%
,amssymb, amsmath,nobibnotes, aps, prl,superscriptaddress,letterpaper]{revtex4}
\usepackage[pdftex]{color,graphicx,rotating}
\setkeys{Gin}{width=0.85\columnwidth}

%Simple way to call images and add filenames to captions - for lots of data.
\newcommand{\dataimg}[1]{
\includegraphics[width=3in]{#1}
Filename: #1

}

\begin{document}
\title{CL Results\\
\textit{Internal document not for distribution.}}
\date{\today}
\author{Allen Hall}
\maketitle

\include{filenames}

\printfigures
\end{document}</pre>
<p>The important code is the &#8220;\include{}&#8221; line and also the &#8220;\newcommand{\dataimg}&#8230;&#8221; section.  This is what is going to do all the work for us.</li>
<li>Now, we need to take your filelist and add at the beginning of each line and end of each line the following:
<pre>\dataimg{</pre>
<p>and at the end:</p>
<pre>}</pre>
<p>One way to do this simply is with a command line gawk command:</p>
<pre>Terminal Prompt> ls |awk '{ print "\\dataimg{"$0"}" }'</pre>
</li>
<li>So, now each line looks like: \dataimg{filename1.pdf}</li>
<li>Once that is done, you can run the LaTeX compile, and you&#8217;ll have your file of graphs!  That&#8217;s a heck of a lot easier than writing each line out by hand.  [Use a program like TextMate or Gawk etc. to append and prepend each line with the necessary call.]</li>
</ol>
<p>The benefit of the \newcommand is that it fills in the needed formatting for each graphics file, and attaches the filename for each graphic beside the graphics file itself.  You can make it prettier, I&#8217;m sure, but this is what I was able to do in a very short time frame.</p>
<p>There are many ways to accomplish this little task, you could use Gawk itself to write the latex file for you, I&#8217;ve seen some do makefiles to do this type of thing, or perl, or bash shell scripting etc.  But, the critical part is to leverage the computer to output a latex file for typsetting and save yourself some time.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.allenjhall.com/content/2009/06/09/latex-hint-output-many-graphics-automated/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>LaTeX Tip: NewCommand</title>
		<link>http://www.allenjhall.com/content/2009/04/06/latex-tip-newcommand/</link>
		<comments>http://www.allenjhall.com/content/2009/04/06/latex-tip-newcommand/#comments</comments>
		<pubDate>Mon, 06 Apr 2009 05:16:29 +0000</pubDate>
		<dc:creator>Allen</dc:creator>
				<category><![CDATA[LaTeX]]></category>
		<category><![CDATA[Thesis Writing]]></category>
		<category><![CDATA[CIGS]]></category>
		<category><![CDATA[CIS]]></category>
		<category><![CDATA[How To]]></category>
		<category><![CDATA[Materials Science and Engineering]]></category>
		<category><![CDATA[Tip]]></category>

		<guid isPermaLink="false">http://www.allenjhall.com/content/?p=66</guid>
		<description><![CDATA[For those friends of mine currently attempting to work in LaTeX to code Materials Science and Engineering related tidbits&#8230; Here&#8217;s a quick tip. Tired of typing all those crazy math commands for your material&#8217;s name? Simply use a new command. Here&#8217;s are a couple examples&#8230; %Simpler way of writing CUINSE2: \newcommand{\cis}{CuInSe$_{2}$} %Simpler way of writing [...]]]></description>
			<content:encoded><![CDATA[<p>For those friends of mine currently attempting to work in LaTeX to code Materials Science and Engineering related tidbits&#8230;</p>
<p>Here&#8217;s a quick tip.  Tired of typing all those crazy math commands for your material&#8217;s name?  Simply use a new command.  Here&#8217;s are a couple examples&#8230;</p>
<pre>%Simpler way of writing CUINSE2:
\newcommand{\cis}{CuInSe$_{2}$}

%Simpler way of writing CUINGASE2:
 \newcommand{\cigs}{CuIn$_{(1-x)}$Ga$_{x}$Se$_{2}$}

%Simpler way of writing CUGASE2:
\newcommand{\cgs}{CuGaSe$_{2}$}</pre>
<p>To see how this looks in compiled LaTeX output and another example, click &#8220;More&#8221;&#8230;<br />
<span id="more-66"></span><br />
Add that to the top of your latex doc (below the document class stuff of course), and then when you need to type the name of CIS for instance, simply type: &#8220;\cis{}&#8221;  Much faster for those underscores or more complicated material names.</p>
<p>The output will look like this (the way I currently have math mode enabled) for my \cigs{} command similar to the above:</p>
<p><img class="alignnone size-full wp-image-96" title="LaTeX-CIGS" src="http://www.allenjhall.com/content/wp-content/cigs.jpg" alt="LaTeX-CIGS" width="178" height="42" /></p>
<p>For those Miller Bravais directions, there are a few ways to do it:</p>
<pre>% form of lattice planes
\newcommand{\lattplaneform}[1]{\ensuremath{\{#1\}}}</pre>
<p>The above will take anything you put after the new command like so: &#8220;\lattplaneform{0 0 1}&#8221; and turn it into the planeform: {0 0 1}.  Now, that&#8217;s fine, but you can gain a bit more control if you do something like this:</p>
<pre>% New Command for Lattice Vectors
\newcommand{\lattplaneform}[3]{\ensuremath{\{#1\:#2\:#3\}}}</pre>
<p>Notice that the &#8220;\:&#8221; is a finer control over spacing in math-mode (see lshort.pdf for more on math-mode spacing).  Now, we call the command like so: \lattplaneform{1}{1}{3} which will output: {1 1 3} with finer spacing.  We can also add overlines for negative numbers: \lattplaneform{1}{1}{\overline{3}}.</p>
<p>Output will look like so for my \complexlattplane{} command.  I added the $_{Tetragonal}$ after the newcommand:</p>
<p><img class="alignnone size-full wp-image-95" title="LaTeX-Vector" src="http://www.allenjhall.com/content/wp-content/1110.jpg" alt="LaTeX-Vector" width="167" height="32" /></p>
<p>So, newcommand is your friend!</p>
]]></content:encoded>
			<wfw:commentRss>http://www.allenjhall.com/content/2009/04/06/latex-tip-newcommand/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Quick One: UIUC Thesis Class Breaks ChapterBib (LaTeX)</title>
		<link>http://www.allenjhall.com/content/2008/06/19/quick-one-uiuc-thesis-class-breaks-chapterbib-latex/</link>
		<comments>http://www.allenjhall.com/content/2008/06/19/quick-one-uiuc-thesis-class-breaks-chapterbib-latex/#comments</comments>
		<pubDate>Thu, 19 Jun 2008 07:37:34 +0000</pubDate>
		<dc:creator>Allen H.</dc:creator>
				<category><![CDATA[BibTeX]]></category>
		<category><![CDATA[Doctoral Studies]]></category>
		<category><![CDATA[LaTeX]]></category>
		<category><![CDATA[Thesis Writing]]></category>

		<guid isPermaLink="false">http://www.allenjhall.com/content/?p=29</guid>
		<description><![CDATA[I could not decide exactly how to post this&#8230; searching high and low, I couldn&#8217;t find the answer to my problem. I felt, in the very least, it needed to be posted here. So, I&#8217;ve decided to focus on the problem only. Then, in a future post, I&#8217;ll describe in more detail how I go [...]]]></description>
			<content:encoded><![CDATA[<p>I could not decide exactly how to post this&#8230; searching high and low, I couldn&#8217;t find the answer to my problem.  I felt, in the very least, it needed to be posted here.  So, I&#8217;ve decided to focus on the problem only.  Then, in a future post, I&#8217;ll describe in more detail how I go about doing my research writing using LaTeX [<a href="http://en.wikipedia.org/wiki/LaTeX">wikipedia</a>].  So, my basic comment is: I write in LaTeX, BibTeX, etc., and the following will help only a few people doing the same, and doesn&#8217;t actually offer a solution right now.  <img src='http://www.allenjhall.com/content/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' />   [Boy, aren't I helpful?]  (click through to read more&#8230;)</p>
<p><span id="more-29"></span></p>
<p>It appears as though the UIUCThesis class (uiucthesis07.cls and it&#8217;s predecessor, uiucthesis) breaks the package ChapterBib (chapterbib.sty).  [<a href="http://www.physics.uiuc.edu/education/graduate/Degree_Req/thesis-templates.html" target="_blank">Official home of the UIUCThesis Class.</a>]  Searching high and low for answers on the network news group <a href="http://groups.google.com/group/comp.text.tex/" target="_blank">comp.text.tex</a>, I found a few discussion of bibliographies which live at the end of each chapter within a larger work.  It appears that most discussed the chapterbib package, and a few discussed bibunits.  I have both installed of course, but the implementation of chapterbib looks nice and simple.  So, I&#8217;ve attempted to implement it numerous times, only to fail.</p>
<p>How does it fail?  It produces the bibliographies for the \include{} files just fine.  However, when using the uiucthesis class, it causes the bibliographies to be placed inside a new chapter heading.  So, Appendix A which should include a subsection with references becomes Appendix A: body, Appendix B: references.  Not good!  ugh.</p>
<p>Interestingly, it turns out that chapterbib works perfectly with the Memoir Class document.  This suggests to me that the alterations of the Chapter commands in the uiucthesis class damages the normal chapter calls, preventing chapterbib and [sectionbib]{natbib} to work properly.  So, the question is- do I learn how to alter uiucthesis07 to fix this (double ugh), or do I try bibunits?</p>
<p>So, I&#8217;ll now turn to bibunits.</p>
<p>[I know this didn't make a lot of sense to most of you out there, but to the few who are wondering about this, perhaps you'll find this page and hours and hours of banging your head against the desk asking: "Why, why, - why don't you work chapterbib?!?" will be prevented.  I shall now leave you, my kind reader, to go put a salve on my forehead-bump...]</p>
]]></content:encoded>
			<wfw:commentRss>http://www.allenjhall.com/content/2008/06/19/quick-one-uiuc-thesis-class-breaks-chapterbib-latex/feed/</wfw:commentRss>
		<slash:comments>4</slash:comments>
		</item>
	</channel>
</rss>
