<?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>latex &#8211; Luxing Huang</title>
	<atom:link href="https://luxing.im/tag/latex/feed/" rel="self" type="application/rss+xml" />
	<link>https://luxing.im</link>
	<description>Thoughs and things</description>
	<lastBuildDate>Fri, 08 Apr 2016 15:11:25 +0000</lastBuildDate>
	<language>en-CA</language>
	<sy:updatePeriod>
	hourly	</sy:updatePeriod>
	<sy:updateFrequency>
	1	</sy:updateFrequency>
	<generator>https://wordpress.org/?v=6.7.2</generator>
<site xmlns="com-wordpress:feed-additions:1">58771605</site>	<item>
		<title>Install XeLaTeX in Fedora</title>
		<link>https://luxing.im/install-xelatex-in-fedora/</link>
					<comments>https://luxing.im/install-xelatex-in-fedora/#respond</comments>
		
		<dc:creator><![CDATA[Luxing Huang]]></dc:creator>
		<pubDate>Fri, 08 Apr 2016 15:10:52 +0000</pubDate>
				<category><![CDATA[Learning Notes]]></category>
		<category><![CDATA[Personal]]></category>
		<category><![CDATA[latex]]></category>
		<category><![CDATA[xelatex]]></category>
		<guid isPermaLink="false">https://luxing.im/?p=639</guid>

					<description><![CDATA[A note to myself. I tried to install XeLaTeX to my freshly installed Fedora 23. sudo dnf install texlive-collection-fontsrecommended texlive-xetex texlive-latex texlive-titlesec 'tex(datetime.sty)' 'tex(eu1enc.def)' 'tex(polyglossia.sty)']]></description>
										<content:encoded><![CDATA[<p>A note to myself. I tried to install XeLaTeX to my freshly installed Fedora 23.<br />
<span id="more-639"></span></p>
<pre>sudo dnf install texlive-collection-fontsrecommended texlive-xetex texlive-latex texlive-titlesec 'tex(datetime.sty)' 'tex(eu1enc.def)' 'tex(polyglossia.sty)' </pre>
]]></content:encoded>
					
					<wfw:commentRss>https://luxing.im/install-xelatex-in-fedora/feed/</wfw:commentRss>
			<slash:comments>0</slash:comments>
		
		
		<post-id xmlns="com-wordpress:feed-additions:1">639</post-id>	</item>
		<item>
		<title>Install missing LaTeX styles and definitions</title>
		<link>https://luxing.im/install-missing-latex-styles-and-definitions/</link>
					<comments>https://luxing.im/install-missing-latex-styles-and-definitions/#respond</comments>
		
		<dc:creator><![CDATA[Luxing Huang]]></dc:creator>
		<pubDate>Wed, 25 Nov 2015 21:29:48 +0000</pubDate>
				<category><![CDATA[Personal]]></category>
		<category><![CDATA[dnf]]></category>
		<category><![CDATA[latex]]></category>
		<category><![CDATA[rpm]]></category>
		<category><![CDATA[xelatex]]></category>
		<category><![CDATA[yum]]></category>
		<guid isPermaLink="false">https://luxing.im/?p=551</guid>

					<description><![CDATA[When I was compiling my report, some files are missing: ! Package fontenc Error: Encoding file `eu1enc.def' not found. An interesting installation of relatex packages is, you can install the missing files by providing this command: dnf install 'tex(eulenc.def)' It is benefited from RPM&#8217;s provides tag, documented here. Credit goes to @vtrefny on Ask Fedora.]]></description>
										<content:encoded><![CDATA[<p>When I was compiling my <img decoding="async" src="https://s0.wp.com/latex.php?latex=%5CLaTeX&#038;bg=ffffff&#038;fg=000&#038;s=0&#038;c=20201002" alt="&#92;LaTeX" class="latex" /> report, some files are missing:</p>
<pre>! Package fontenc Error: Encoding file `eu1enc.def' not found.</pre>
<p>An interesting installation of <img decoding="async" src="https://s0.wp.com/latex.php?latex=%5CTeX&#038;bg=ffffff&#038;fg=000&#038;s=0&#038;c=20201002" alt="&#92;TeX" class="latex" /> relatex packages is, you can install the missing files by providing this command:<br />
<span id="more-551"></span></p>
<pre>dnf install 'tex(eulenc.def)'</pre>
<p>It is benefited from RPM&#8217;s <code>provides</code> tag, documented <a href="http://www.rpm.org/max-rpm/s1-rpm-depend-manual-dependencies.html" target="_blank">here</a>.<br />
Credit goes to @vtrefny on Ask Fedora.</p>
]]></content:encoded>
					
					<wfw:commentRss>https://luxing.im/install-missing-latex-styles-and-definitions/feed/</wfw:commentRss>
			<slash:comments>0</slash:comments>
		
		
		<post-id xmlns="com-wordpress:feed-additions:1">551</post-id>	</item>
		<item>
		<title>Join PDFs together using LaTeX</title>
		<link>https://luxing.im/join-pdfs-together-using-latex/</link>
					<comments>https://luxing.im/join-pdfs-together-using-latex/#respond</comments>
		
		<dc:creator><![CDATA[Luxing Huang]]></dc:creator>
		<pubDate>Wed, 12 Feb 2014 14:18:57 +0000</pubDate>
				<category><![CDATA[Techie Stuff]]></category>
		<category><![CDATA[latex]]></category>
		<category><![CDATA[pdf]]></category>
		<guid isPermaLink="false">http://blog.luxing.im/?p=278</guid>

					<description><![CDATA[There is a package called pdfpages, its usage can be found here. \documentclass{article}% or something else \usepackage{pdfpages} \begin{document} \includepdf[pages=-]{paper1} \includepdf[pages=-]{paper2} \end{document} This is a sample code copied from here. Under Unix-like systems, after installing texlive and pdfjam, we could always join PDFs together by such command: pdfjoin 1.pdf 2.pdf 3.pdf --outfile combine.pdf see pdfjoin &#8211;help &#8230; <p class="link-more"><a href="https://luxing.im/join-pdfs-together-using-latex/" class="more-link">Continue reading<span class="screen-reader-text"> "Join PDFs together using LaTeX"</span></a></p>]]></description>
										<content:encoded><![CDATA[<p>There is a <img decoding="async" src="https://s0.wp.com/latex.php?latex=%5CLaTeX&#038;bg=ffffff&#038;fg=000&#038;s=0&#038;c=20201002" alt="&#92;LaTeX" class="latex" /> package called pdfpages, its usage can be found <a href="http://www.ctan.org/tex-archive/macros/latex/contrib/pdfpages/pdfpages.pdf" target="_blank">here</a>.<br />
<span id="more-278"></span></p>
<pre>
\documentclass{article}% or something else
\usepackage{pdfpages}
\begin{document}
\includepdf[pages=-]{paper1}
\includepdf[pages=-]{paper2}

\end{document}
</pre>
<p>This is a sample <img decoding="async" src="https://s0.wp.com/latex.php?latex=%5CLaTeX&#038;bg=ffffff&#038;fg=000&#038;s=0&#038;c=20201002" alt="&#92;LaTeX" class="latex" /> code copied from <a href="http://tex.stackexchange.com/questions/8662/merge-two-pdf-files-output-by-latex" target="_blank">here</a>.</p>
<p>Under Unix-like systems, after installing texlive and pdfjam, we could always join PDFs together by such command:</p>
<pre>pdfjoin 1.pdf 2.pdf 3.pdf --outfile combine.pdf</pre>
<p>see pdfjoin &#8211;help for more information.</p>
]]></content:encoded>
					
					<wfw:commentRss>https://luxing.im/join-pdfs-together-using-latex/feed/</wfw:commentRss>
			<slash:comments>0</slash:comments>
		
		
		<post-id xmlns="com-wordpress:feed-additions:1">278</post-id>	</item>
		<item>
		<title>Small Makefile script for making daily course notes on LaTeX</title>
		<link>https://luxing.im/small-makefile-script-for-making-daily-course-notes-on-latex/</link>
					<comments>https://luxing.im/small-makefile-script-for-making-daily-course-notes-on-latex/#respond</comments>
		
		<dc:creator><![CDATA[Luxing Huang]]></dc:creator>
		<pubDate>Wed, 08 Jan 2014 16:22:40 +0000</pubDate>
				<category><![CDATA[Personal]]></category>
		<category><![CDATA[latex]]></category>
		<category><![CDATA[linux]]></category>
		<category><![CDATA[Makefile]]></category>
		<guid isPermaLink="false">http://blog.luxing.im/?p=258</guid>

					<description><![CDATA[I have a habit of making daily course notes using (Probably not the most suitable way for you readers). By using this Makefile script I can automatically generate date based file, and avoiding overriding the current date notes. Because I have an folder structure like this: ~/ study/ termX/ course1/ course2/ termY/ In this structure &#8230; <p class="link-more"><a href="https://luxing.im/small-makefile-script-for-making-daily-course-notes-on-latex/" class="more-link">Continue reading<span class="screen-reader-text"> "Small Makefile script for making daily course notes on LaTeX"</span></a></p>]]></description>
										<content:encoded><![CDATA[<p>I have a habit of making daily course notes using <img decoding="async" src="https://s0.wp.com/latex.php?latex=%5CLaTeX&#038;bg=ffffff&#038;fg=000&#038;s=0&#038;c=20201002" alt="&#92;LaTeX" class="latex" /> (Probably not the most suitable way for you readers). By using this Makefile script I can automatically generate date based <img decoding="async" src="https://s0.wp.com/latex.php?latex=%5CLaTeX&#038;bg=ffffff&#038;fg=000&#038;s=0&#038;c=20201002" alt="&#92;LaTeX" class="latex" /> file, and avoiding overriding the current date notes.<br />
<span id="more-258"></span><br />
Because I have an folder structure like this:</p>
<pre>
  ~/
    study/
        termX/
            course1/
            course2/
        termY/
</pre>
<p>In this structure I can copy this Makefile to anywhere.</p>
<pre>
LC = pdflatex
NAME = $(shell date +%Y%m%d)
TEMPLATE = template.tex

all: make

make: $(NAME).tex
    pdflatex $(NAME).tex
    xdg-open $(NAME).pdf

create: $(TEMPLATE)
    if [ ! -e `date +%Y%m%d`.tex ]; \
    then \
        cp $(TEMPLATE) `date +%Y%m%d`.tex; \
    fi; 
    vim `date +%Y%m%d`.tex

clean:
    rm -f *.aux *.log *.out
</pre>
<p>The usage is very clear, the default is to compile a tex file to PDF.</p>
<p>You still need to write a tex template called template.tex for this to work.</p>
]]></content:encoded>
					
					<wfw:commentRss>https://luxing.im/small-makefile-script-for-making-daily-course-notes-on-latex/feed/</wfw:commentRss>
			<slash:comments>0</slash:comments>
		
		
		<post-id xmlns="com-wordpress:feed-additions:1">258</post-id>	</item>
		<item>
		<title>Some useful LaTeX tips</title>
		<link>https://luxing.im/some-useful-latex-tips/</link>
					<comments>https://luxing.im/some-useful-latex-tips/#respond</comments>
		
		<dc:creator><![CDATA[Luxing Huang]]></dc:creator>
		<pubDate>Fri, 25 Oct 2013 02:10:34 +0000</pubDate>
				<category><![CDATA[Learning Notes]]></category>
		<category><![CDATA[latex]]></category>
		<category><![CDATA[usage]]></category>
		<guid isPermaLink="false">http://blog.luxing.im/?p=155</guid>

					<description><![CDATA[This is for my own reminder, and if you like them, take and modify them as you wish. Preamble Preamble is where you put all your defining and including stuff there. It&#8217;s a bit like #include #define BLAH blahblah in C. In , we need to start with a \documentclass[letterpaper]{article} to start an article. Usually &#8230; <p class="link-more"><a href="https://luxing.im/some-useful-latex-tips/" class="more-link">Continue reading<span class="screen-reader-text"> "Some useful LaTeX tips"</span></a></p>]]></description>
										<content:encoded><![CDATA[<p>This is for my own reminder, and if you like them, take and modify them as you wish.<br />
<span id="more-155"></span></p>
<h1>Preamble</h1>
<p>Preamble is where you put all your defining and including stuff there. It&#8217;s a bit like </p>
<pre>
#include <blah>
#define BLAH blahblah
</pre>
<p> in C.</p>
<p>In <img decoding="async" src="https://s0.wp.com/latex.php?latex=%5CLaTeX&#038;bg=ffffff&#038;fg=000&#038;s=0&#038;c=20201002" alt="&#92;LaTeX" class="latex" />, we need to start with a </p>
<pre>\documentclass[letterpaper]{article}</pre>
<p> to start an article. Usually when I write an assignment or Lab report, I use <em>article</em> rather than <em>report</em>.</p>
<h2>Packages</h2>
<p>Then it&#8217;s the packages. <img decoding="async" src="https://s0.wp.com/latex.php?latex=%5CLaTeX&#038;bg=ffffff&#038;fg=000&#038;s=0&#038;c=20201002" alt="&#92;LaTeX" class="latex" /> is so versatile because so many clever people put their effort in improving it. The usual ones that I use are:</p>
<pre>\usepackage[margin=1cm]{geometry} % For paper margin
\usepackage{amsmath, amssymb, color, colortbl, graphicx, tikz, setspace, multirow}
\usepackage[pdfstartview=FitH]{hyperref}
\usepackage[utf8]{inputenc}
% amsmath is used for generating math expressions;
% amssymb is used for getting prettier math symbols;
% color is color :) and colortbl can be used to highlight cells in tabular (table);
% graphicx is used for importing graphics to the document;
% tikz is a strong and powerful graphics drawer, very versatile and difficult to learn them all.
% setspace is used for setting space size between lines. 
% multirow is an extra tool used for mainly creating tables.
% hyperref is used to changing default zoom options.
% inputenc set the default encoding to utf8 or else.
</pre>
<p>The percentage sign % is comment sign! When you need the percentage sign, you need to type \% like in regex.<br />
When it comes to you that you&#8217;ll use some of the packages, then include the necessary ones into your \usepackage.</p>
<h3>Resources</h3>
<p>amssymb list: <a href="http://www.math.niu.edu/help/tex/amssymbols.pdf" target="_blank">http://www.math.niu.edu/help/tex/amssymbols.pdf</a><br />
tikz examples: <a href="http://www.texample.net/tikz/" target="_blank">http://www.texample.net/tikz/</a><br />
tikz docu: <a href="http://www.texample.net/media/pgf/builds/pgfmanualCVS2012-11-04.pdf" target="_blank">http://www.texample.net/media/pgf/builds/pgfmanualCVS2012-11-04.pdf</a><br />
Importing graphics: <a href="http://en.wikibooks.org/wiki/LaTeX/Importing_Graphics" target="_blank">http://en.wikibooks.org/wiki/LaTeX/Importing_Graphics</a><br />
setspace: <a href="http://mirror.its.dal.ca/ctan/macros/latex/contrib/setspace/setspace.sty" target="_blank">http://mirror.its.dal.ca/ctan/macros/latex/contrib/setspace/setspace.sty</a><br />
multirow: <a href="http://en.wikibooks.org/wiki/LaTeX/Tables#Columns_spanning_multiple_rows" target="_blank">http://en.wikibooks.org/wiki/LaTeX/Tables#Columns_spanning_multiple_rows</a><br />
hyperref:<a href="http://mirror.switch.ch/ftp/mirror/tex/macros/latex/contrib/hyperref/doc/manual.html" target="_blank">http://mirror.switch.ch/ftp/mirror/tex/macros/latex/contrib/hyperref/doc/manual.html</a><br />
Always, Google is our best friend.</p>
<h2>End of Preamble</h2>
<p>For more detailed Document Structure, please visit <a href="http://en.wikibooks.org/wiki/LaTeX/Document_Structure" target="_blank">WikiBooks</a></p>
<h1> Document </h1>
<p>After finishing the preamble content, let&#8217;s start to write our content!<br />
Usually we need to add title, author and date on our first page for lab report or assignments.</p>
<pre>
\begin{document}
\title{Some Lab Report \\ % \\ is nextline
     Circuit Lab \\
     Section 1 \\
     Composed by: }
\author{ Luxing Huang \and Some Guy \and Another Guy }
\date{\today}
\maketitle
</pre>
<p>You can extend your spacing between lines using \vspace{2cm} inside your title or author section.<br />
I think the indentation is messed up by default, so I always add </p>
<pre>\setlength{\parindent}{0cm}</pre>
<p> under \maketitle.</p>
<p>Then time for your \section{name}&#8217;s. And \subsections.</p>
<h2>Math</h2>
<p>The math module is very fun. You need to write your math expressions inside two dollar signs &#8220;$&#8221;.</p>
<pre>$\sum m{(0, 1, 3, 6)}$</pre>
<p> looks like: <img decoding="async" src="https://s0.wp.com/latex.php?latex=%5Csum+m%7B%280%2C+1%2C+3%2C+6%29%7D&#038;bg=ffffff&#038;fg=000&#038;s=0&#038;c=20201002" alt="&#92;sum m{(0, 1, 3, 6)}" class="latex" />, fraction function is </p>
<pre>\frac{numeritor}{denominator}</pre>
<p>Some Math resources: <a href="http://en.wikibooks.org/wiki/LaTeX/Mathematics" target="_blank">http://en.wikibooks.org/wiki/LaTeX/Mathematics</a> <a href="http://en.wikibooks.org/wiki/LaTeX/Advanced_Mathematics" target="_blank">http://en.wikibooks.org/wiki/LaTeX/Advanced_Mathematics</a></p>
<h2>Table</h2>
<p>Table is even more fun. Here is a snippet of my <img decoding="async" src="https://s0.wp.com/latex.php?latex=%5CLaTeX&#038;bg=ffffff&#038;fg=000&#038;s=0&#038;c=20201002" alt="&#92;LaTeX" class="latex" /> for the lab work:</p>
<pre>
\begin{center}
    \begin{tabular}{l l l l l l} 
        A & B & C & D & f & Simu \\ \hline
        0 & 0 & 0 & 0 & 1 & 1 \\ \hline
        0 & 0 & 0 & 1 & 1 & 1 \\ \hline
        0 & 0 & 1 & 0 & 1 & 1 \\ \hline
        0 & 0 & 1 & 1 & 0 & 0 \\ \hline
        0 & 1 & 0 & 0 & 1 & 1 \\ \hline
        0 & 1 & 0 & 1 & 0 & 0 \\ \hline
        0 & 1 & 1 & 0 & 0 & 0 \\ \hline
        0 & 1 & 1 & 1 & 1 & 1 \\ \hline
        1 & 0 & 0 & 0 & 0 & 0 \\ \hline
        1 & 0 & 0 & 1 & 0 & 0 \\ \hline
        1 & 0 & 1 & 0 & 1 & 1 \\ \hline
        1 & 0 & 1 & 1 & 1 & 1 \\ \hline
        1 & 1 & 0 & 0 & 0 & 0 \\ \hline
        1 & 1 & 0 & 1 & 1 & 1 \\ \hline
        1 & 1 & 1 & 0 & 0 & 0 \\ \hline
        1 & 1 & 1 & 1 & 0 & 0 \\ 
    \end{tabular} 
\end{center}</pre>
<p>You define whether you&#8217;ll need a column line in \begin{tabular}{l l l l l l}, where the second set of braces located. So l l l l l means 5 left alignment&#8217;s, if I write |c|c|c|c|c| then I&#8217;ll get colomn lines (\cline) and text centered. \hline is obviously a horizontal line.<br />
More on tables: <a href="http://en.wikibooks.org/wiki/LaTeX/Tables" target="_blank">http://en.wikibooks.org/wiki/LaTeX/Tables</a>.</p>
<h2>Tikz</h2>
<p>Tikz is always a headache for me. I do not have enough time to dig through it but I know it&#8217;s extreamly powerful.<br />
Here is some code I wrote for probability tree:</p>
<pre>
\tikzstyle{level 1}=[level distance=3cm, sibling distance=7cm]
\tikzstyle{level 2}=[level distance=1.5cm, sibling distance=3.5cm]
\tikzstyle{level 3}=[level distance=2.5cm, sibling distance=2cm]

\tikzstyle{fly}=[text width=2em, text centered]
\tikzstyle{end}=[circle, minimum width=1pt, fill, inner sep=0pt]

\begin{tikzpicture}[grow=right, sloped]
\node[fly] {}
child
{
    node[fly] {B}
    child
    {
        node[fly]{B}
        child
        {
            node [end, label=right:B BBB 0.027] {}
            edge from parent
            node[above] {0.3}
        }   
        child
        {   
            node[end, label=right:G BBG 0.063] {}
            edge from parent
            node[above] {0.7}
        }   
    }       
    child   
    {   
        node[fly]{G}
        child
        {
            node[end, label=right:B BGB 0.063] {}
            edge from parent
            node[above] {0.3}
        }   
        child
        {   
            node[end, label=right:G BGG 0.147] {}
            edge from parent
            node[above] {0.7}
        }   
    }       
}
child   
{   
    node[fly] {G}
    child
    {
        node[fly]{B}
        child
        {
            node[end, label=right:B GBB 0.063] {}
            edge from parent
            node[above] {0.3}
        }
        child
        {
            node[end, label=right:G GBG 0.147] {}
            edge from parent
            node[above] {0.7}
        }
    }
    child
    {
        node[fly]{G}
        child
        {
            node[end, label=right:B GGB 0.147] {}
            edge from parent
            node[above] {0.3}
        }
        child
        {
            node[end, label=right:G GGG 0.343] {}
            edge from parent
            node[above] {0.7}
        }
    }
};
\end{tikzpicture}
</pre>
<p>You&#8217;ll see what it looks like when you compile it to PDF.</p>
<h2>Bullet Points and Indentation</h2>
<p>There are 3 types of bullet points listing, itemize(points or dashes), enumerate(using numbers and abc&#8217;s) and description, can be nested. No external package required. Code is like this:</p>
<pre>
\begin{itemize}
    \item Be Professional

        \begin{itemize}
            \item Formal

            \item Subject Line - State the Purpose

            \item Hello, Good Morning, Good Afternoon ...

            \item Clear, concise, get to the point

            \item Proofread everything
        \end{itemize}

    \item Don't be Emotional

        \begin{itemize}
            \item Angry, Sad, Frustrated.

            \item Never assume the receiver will take your message the way you expect.

            \item Limit the exchanges

            \item Limit the "reply all" Button

            \item Acronyms

                \begin{description}
                    \item[yes]: TQM(Total Quality Management)/CEO/ROI

                    \item[no]: LOL/TTYL/CUL8R
                \end{description}
        \end{itemize}
\end{itemize}
</pre>
<h2>Compilation</h2>
<p><img decoding="async" src="https://s0.wp.com/latex.php?latex=%5CLaTeX&#038;bg=ffffff&#038;fg=000&#038;s=0&#038;c=20201002" alt="&#92;LaTeX" class="latex" /> is so great when it work with Makefile. I didn&#8217;t write much for my Makefile, here is the general template:</p>
<pre>LC = pdflatex  # LC stands for Latex Compiler
SOURCE = assign5.tex
OUTPUT = assign5.pdf

make: all

all: $(SOURCE)
    $(CC) $(SOURCE) $(OUTPUT)
    okular $(OUTPUT) #okular is my pdf viewer.
</pre>
<p>When you see an error or warning while compiling PDF from .tex files, read where the problem is, and type X then enter to quit compilation. Otherwise sometimes pdflatex will drain your CPU resource.<br />
When you finish your document, put \end{document} at the very bottom.</p>
<h1>texlive</h1>
<p>This is the package you need to install under your system. For Linux users, package manage systems should already include most of the latex packages.<br />
For RHEL and Fedora users, type</p>
<pre>sudo yum install texlive*</pre>
<p> should do the intallation job.<br />
I will add more <img decoding="async" src="https://s0.wp.com/latex.php?latex=%5CLaTeX&#038;bg=ffffff&#038;fg=000&#038;s=0&#038;c=20201002" alt="&#92;LaTeX" class="latex" /> notes when it comes to me.</p>
]]></content:encoded>
					
					<wfw:commentRss>https://luxing.im/some-useful-latex-tips/feed/</wfw:commentRss>
			<slash:comments>0</slash:comments>
		
		
		<post-id xmlns="com-wordpress:feed-additions:1">155</post-id>	</item>
	</channel>
</rss>
