27.11.15

Configurar diccionario en TeXmaker

Para configurar el corrector ortográfico en español, por cierto pueden utilizar los diccionarios de OpenOffice o LibreOffice, una vez que hayan descargado los diccionarios el proceso sería así:

  • Cambien la extensión del archivo a .7z .rar .zip o la que quieran siempre y cuando sea de un archivo comprimido.
  • Extraen el contenido de la carpeta, encontrarán un archivo con extensión .dic y otro con extensión .aff los dos deben de tener el mismo nombre. Estos los pueden mover a una carpeta aparte para estar mas organizados. Estos archivos se copian al directorio de TeXmaker
  • Luego abren Texmaker y van a Opciones > Configurar Texmaker > Editor, verán lo siguiente.
  • En la sección que dice diccionario ortográfico, seleccionan la carpeta que aparece a la derecha y buscan la ubicación en la que tienen los archivos .dic y .aff, seleccionan el .dic luego marcan la casilla de integrado para que la corrección sea en tiempo real, guardan las preferencias y listo.

Instalación de TeXstudio incluido el diccionario

Para llevar a cabo la instalación de TeXstudio
  1. Vaya al sitio oficial de TeXstudio y descargue el archivo TeXstudio correspondiente a su sistema operativo
     http://www.texstudio.org/
  2. El archivo que se descargó ejecútelo y ya tendrá TeXstudio instalado en su sistema.
Por alguna razón que desconozco, TeXstudio no trae por defecto el diccionario ni tampoco el thesaurus del idioma español,  (para llevar a cabo la corrección ortográfica y sinónimos), pero nosotros podemos instalarlo y activarlo fácilmente.
  1. Los diccionarios que necesitamos los hallaremos en las extensiones de OpenOffice o LibreOffice, en mi caso, las obtuve del sitio de OpenOffice.El archivo que descargará tendrá extensión oxt
     Extensions
  2. Al archivo descargado cambie su extensión oxt por zip (en realidad es un archivo comprimido que nuestro sistema puede abrir fácilmente con cambiar la extensión) ahi se encuentran los archivos de diccionario que nos interesan, por ejemplo es_ES.dices_ES.aff y th_es_ES_v2.dat. Tampien se pueden descomprimir con 7zip. Copie los archivos (o muévalos) al directorio dictionaries de nuestra aplicación TeXstudio.
  3. Por último, tenemos que decirle a TeXstudio, en caso de que así lo deseemos, que tome el diccionario en español como diccionario por defecto.
  4. Para ello, abra TeXstudio y vaya a la configuración de preferencias generales, en la sección de diccionarios, de la aplicación como se muestra en las figuras siguientes:
  5. Así se verá nuestra configuración 
  6. Eso es todo, ya tenemos nuestro TeXstudio con soporte para corrector ortográfico de idioma español.

20.11.15

Putting a timeline for dates in moderncv

Here's a way of getting this to work with moderncv. I've defined a new macro, \funkycventry that takes the start and end year and then all the same arguments as cventry, and uses this to draw the timeline bar in the same colour and width as the section headers. If the end year is 0, the bar fades out, and no end year is printed.
\documentclass[]{moderncv}
\usepackage{tikz}
\moderncvtheme[blue]{casual}

\usepackage[scale=0.8]{geometry}
\firstname{John}
\familyname{Doe}


\begin{document}
\maketitle

\tikzset{
    startyear/.style={
        font=\scriptsize,
        name=startyear,
        above=3pt,
        inner xsep=0pt,
        anchor=base west,
    },
    endyear/.style={
        font=\scriptsize,
        name=endyear,
        below,
        inner xsep=0pt,
        anchor=north east,
    }
}

\def\firstyear{2000}
\def\lastyear{2011}
\pgfmathsetmacro\yearrange{\lastyear-\firstyear}

\newcommand{\funkycventry}[7]{%
\pgfmathsetmacro\endyear{ifthenelse(#2==0,\lastyear,#2)}
\pgfmathsetmacro\startfraction{(#1-\firstyear)/(\lastyear-\firstyear)}%
\pgfmathsetmacro\endfraction{(\endyear-\firstyear)/(\lastyear-\firstyear)}%
\pgfmathsetmacro\ongoing{!(#2==0)}
 \cventry{\tikz[baseline=(endyear.north)]{
    \fill [sectionrectanglecolor] (0,0) 
        ++(\startfraction*\hintscolumnwidth,0pt)
        node [startyear] {#1}
        rectangle (\endfraction*\hintscolumnwidth,0.5ex)
        node [endyear] {\pgfmathparse{ifthenelse(#2==0,,#2)}\pgfmathresult}
        (\hintscolumnwidth,0pt) ;
    \ifnum #2=0
        \shade [left color=sectionrectanglecolor]
        (\endfraction*\hintscolumnwidth-1em,0pt) rectangle ++(1em,0.5ex);
    \fi}
}
{#3}{#4}{#5}{#6}{#7}
}

\section{Experience}
\subsection{Vocational}
\funkycventry{2002}{2007}{Job title}{Employer}{City}{}{General description no longer than 1--2 lines.\newline{}%
Detailed achievements:%
\begin{itemize}%
\item Achievement 1;
\item Achievement 2, with sub-achievements:
\item Achievement 3.
\end{itemize}}
\funkycventry{2000}{2011}{Job title}{Employer}{City}{}{Description line 1\newline{}Description line 2}
\subsection{Miscellaneous}
\funkycventry{2005}{0}{Job title}{Employer}{City}{}{Description}


\end{document}

For the record, I have adapted Jake's code and began working on a new package calledmoderntimeline:
\usepackage{moderntimeline}

% Set the scale.
% I go up to 2013 otherwise some late dates overflow on the entry
\tlmaxdates{1999}{2013}
% Set the line width.
% This automatically sets the space under the top label to be 1pt more
\tlwidth{0.8ex}
% Set the labels text size
\tltext{\tiny}
And then a few examples:
\section{Experience}
\subsection{IT Experience}
\tlcventry[blue]{2006}{0}{Systems Engineer}{\href{http://www.orness.com}{ORNESS} then \href{http://www.alten.fr}{Alten}}{Sophia Antipolis}{}
{Consultant at France T\'el\'ecom
\begin{itemize}
 \item Administration of Cfengine, FAI and the software package repository;
 \item Renewal and industrialization of the software deployment system for Debian/Ubuntu;
 \item Management of the Gforge (collaborative development web interface) platform;
 \item Monitoring of the fleet of servers;
 \item Writing of technical documentation.
\end{itemize}}
tl1
\tllabelcventry[purple]{1999}{2000}{1999--2000}{Paramedic}
  {\href{http://www.croix-rouge.fr/}{French Red Cross}}{Paris Suburbs}{}
  {Served in several volunteer missions as a paramedic}
tl2
\tldatelabelcventry[red]{2004}{July 2004}{Blue Collar Internship}
  {\href{http://www.snecma.com}{SNECMA}}{Moissy-Cramayel}{}
  {Assembled and equilibrated turbo reactors for planes}
tl3
\tldatecventry[green]{2005}{Student in Pedagogy (`Gestion Mentale')}
  {\href{http://www.ifgm.org/}{IFGM}}{Bordeaux}{}
  {Pedagogy, Didacticism, Cognitive Psychology}
tl4
Edit: Since moderncv aligns the left column to the right, there were weird things with dates, so I decided to put a white rectangle all over each entry to make sure the whole space was used. After that, my wife suggested I used a thin line to every entry to make things clearer, so now it looks like this (color and width of the thin line can be set):
tl5
Full examples can be seen in my updated CV.

Compiling documents online

Online compiler with storage and editor features:
Meanwhile inactive:
Online compiler with basic functionality:
Tiny equation compiler:
Latex Table generator:
Document frame generator:
The other way round:
  • DeTeXify outputs the corresponding LaTeX command code after you've drawn a symbol

Where do I place my own .sty or .cls files, to make them available to all my .tex files?

You could create a folder below your TeX home directory and put your .sty file therein. Use this command at the command prompt to find out where:
kpsewhich -var-value=TEXMFHOME
On my computer it shows
C:/Users/stefan/texmf
but it might also be ~/texmf/ on a Linux or Unix computer.
Following the TeX directory structure, you should place your file in a subdirectory like ~/texmf/tex/latex/commonstuff/, according to Arthur's comment below. This has the advantage that it is not necessary to update the package database as TeX searches your personal texmf tree directly. If there is an ls-R file in your home texmf tree you can safely delete it as TeX will not use it anyway. (Note: this assumes your personal tree is on a local file system: users with remotely-mounted home folders may still need to hash.)
Regarding MiKTeX, have a look at the section "Installing sty or cls files" in the answer to the question How can I manually install a package on MikTex (Windows).
You can then verify what file will be used with:
kpsewhich filename.sty
This will show the path to the file picked up by the TeX implementation.

There are two parts to telling TeX about a new .sty file. First, you have to put it in the 'right' place and second you need to update the database TeX uses to find files. The place to put the file depends on your operating system. Assuming you have a standard installation, this will probably be
  • Windows XP C:\Documents and Settings\\texmf\tex\latex\local\
  • Windows Vista/7 C:\Users\\texmf\tex\latex\local\
  • Linux ~/texmf/tex/latex/local/
  • Mac OS X /Users//Library/texmf/tex/latex/local/
A few of notes on that. First, on Windows the 'Users' part of the location is language dependent. Second, I've represented your home/user folder as '': this will obviously be dependent on your system. The folder I've indicated may well not exist: you may just have the texmf part, bits within that or nothing at all. The file location is important, and although you could just put your file inside texmf/tex/latex is is usual to keep things organised by package. The local folder is reserved for stuff installed on individual machines.
Letting TeX 'know' about the file means running a program that builds a database of file locations. There are graphical interfaces to do this, but the way that works on all operating systems is to use the Command Prompt/Terminal and type texhash. This will build the databases for your tree (the one that is in your home folder). Once the 'hash' is created TeX should be able to find your file. For recent TeXLive distributions, this step is not necessary for files in the local folder.

Which packages should be loaded after hyperref instead of before?

  • cleveref
Many others are documented in section 6 of the hyperref README. Some are more complex than simply loading after hyperref. Here are some more common ones...
  • amsrefs
  • float before hyperref before algorithm
  • chappg
  • sidecap
  • linguex
  • geometry