Burning the Midnight Oil

Research, personal interests, life and all the pretty stuff in between

Posts Tagged ‘LaTeX

Formatting Optimization Problems with LaTeX | JC Notes

leave a comment »


& \underset{x}{\text{minimize}}
& & f_0(x) \\
& \text{subject to}
& & f_i(x) \leq b_i, \; i = 1, \ldots, m.


\begin{aligned}  & \underset{x}{\text{minimize}}  & & f_0(x) \\  & \text{subject to}  & & f_i(x) \leq b_i, \; i = 1, \ldots, m.  \end{aligned}

Extracted from Formatting Optimization Problems with LaTeX | JC Notes.

Written by cd

August 14, 2013 at 5:28 am

Posted in LaTeX tips

Tagged with , ,

My top 3 LaTeX Environments: Notepad++, ShareLaTeX, and Sublime Text

leave a comment »

Not long ago setting up a LaTeX environment was painfully hard as a non-Linux user. Recently, I’ve found myself spending more time in my Ubuntu machine and have started to appreciate its simplicity when it comes to writing. Hardcore Linux users may prefer something like emacs as a LaTeX editor, even tough l started to use it frequently, still find a bit difficult when it comes to Latex.

Since I’m still bound to go back to Windows, I’ve decided to write this post about my three preferred LaTex Environments for Linux, Windows and the Web.

For Windows, Notepad++:

I’ve already been using several specific editors for quite some a while. In the end, none provided the simplicity and customisation I wanted, until I found Notepad++. It is a very simple, extremely efficient text editor with an impressive arsenal of bindings, tweaks and settings to suit any need you may have.


  • Extremely flexible and lightweight
  • Full-screen and post-it mode ( quite necessary these days )
  • Allows custom UI and key bindings ( probably need a while to figure them all)
  • Advanced syntax highlight ( not only for LaTeX obviously)


  • Requires time to setup to your needs and extend to LaTeX. This post was helpful
  • No cloud or auto-save features included natively (you could just use dropbox for that)
  • Doesn’t include a PDF previewer (If you mind for that, you need a non-blocking viewer like SumatraPDF)

On the Web, ShareLaTeX :

This is a relatively new project (but not the only one) on a web-based collaborative LaTeX specific editor. I joined since very early and been recommending it often, mainly because it takes from you the burden of setting up an environment (the main reason for Win users to find LaTeX tedious), you just need to open an account and you’re good to go, libraries are already included and even has some templates to get you writing. The main advantage of ShareLaTeX is, as it names implies, the collaborative twist it has. I use it to distribute my latest version by keeping the document public and non-editable (not everyone wants to open another account just to preview and edit the document) – collaborators can just get a copy, edit it and send their updates, then you merge the copies and update the shared version.



  • Safely stores your documents on the cloud and auto-save included
  • Access to few handy templates ( I rather use my own, though)
  • The editor can be themed, but I found the highlighting not as good as others
  • Share the project (several files) with others via link (public or private)
  • Chat functionality ( I haven’t really used that but good to have it)
  • Each project includes a huge LaTeX scripts library! But you can still add your own in case is not already included .
  • Will allow Dropbox syncs for premium users


  • The editor still feels a bit awkward, even collapsing the panels and going full screen doesn’t give you a comfy, isolated writing environment.
  • Multi screen support for editor and output PDF ( but you can actually open a separate window with the same project)
  • Key shortcuts might be a good idea as I dislike clicking to preview
  • You need an Internet connection to access your projects. This is a problem if you really need to cut all distractions and temptations.

For Linux, Sublime Text :

This editor excels in all categories. It has a really smooth, minimalistic interface that can be configured in almost any possible way. It is very slick and you have access not only to a million keyboard shortcuts but also a plug-in browser within the editor itself. This is probably my first choice for LaTeX. The software is also available for Windows and MacOS. It features a minimap that allows you to move with ease, but if you need total isolation you can try the distraction free mode. It seems well documented and so far, I’ve found posts on any modification I wanted to do.



  • Slick and fully customizable experience
  • Tons of keyboard shortcuts and simple compiler configuration (using Latex Tools plug-in)
  • Embedded plug-in market where you can get utilities such as reference management, auto-completion  and more
  • Nice highlighting system and theming included
  • The free-distraction mode is simply perfect
  • Native spell-checker included
  • The snippet tool and command palette are pretty nifty


  • It has a very steep licence price you can, however, use Sublime2 for free (with a few pop ups from time to time). A more comprehensive pricing scheme would be great.
  • Many of the most impressive features have to be installed separately and some of them aren’t free.

To conclude, my top 3 LaTeX environment share certain features such as responsiveness, flexibility and coding experience overall. Some other features like auto-completion and version management are not as important to me. If you find yourself using LaTeX a lot and not feeling comfortable with your current editor there are plenty of options now to choose from.

Written by cd

August 9, 2013 at 7:32 am

LaTex: Power combo

leave a comment »

If you still wondering whether you need to use LaTex, take a look at this article . Many websites provide detailed information on how to install and use LaTex, but since I was looking for a concise source, I decided to put here my configuration (one of many), and a simplified step-by-step to get LaTex running. I will focus in what to get, how to install and how to create a simple document from a template in Windows7. You need:

After installing the software, open TeXworks and then File > New From Template > Basic LaTex documents > article. This will open a new document which you must save and then compile by clicking the green button in the toolbar (with pdfLaTex selected in the dropdown). If everything goes fine and after a few lines in the console output the TeXworks viewer will pop out with your output PDF. That is pretty much to it. Sumatra PDF allows you to edit and recompile (in TeXworks) without closing the file which is not the case for other PDF Readers.

When things go wrong…

One common issue with this setup is the use of mismatching versions of MiKTex  and TeXworks templates. This can be easily fixed by accessing All Programs > MiKTex x.x. > Maintenance(Admin) > Update and running the wizard. More on formatting with LaTex and reference use later .


Written by cd

September 13, 2011 at 6:40 am

Searching for a reference manager

leave a comment »

Once again, Microsoft Word has crashed in my computer after trying to edit a reference from Endnote. I’ve already uninstalled it, and Word went back to normal. Now, I am facing the dilemma of finding an efficient way to collect and use my references. These are my options:

  • Try other reference managers (as refman.com)
  • Give another try to Latex (and Bibtex.org)
  • Use the reference system included in Office Word  (Which have been using for a year)

Seems like a workaround for the Word2010/endnote issue won’t be here soon according to this guys. Would be good to have some ideas about this, I’ve seen other people organizing their references in files which I think is completely tedious and keeps you away from doing real work (as reading your references!).

More thoughts on this soon.

Written by cd

April 28, 2011 at 3:35 pm

%d bloggers like this: