# Update of Gams-Tex

Edson Valle sent me an update for Gams-Tex (see my blog from 28. Januari) where he showed how to add new keywords to the Gams-Tex file (here done for the MPSGE keywords):

Just add the following lines to the gams theme file (theme_gams.tex) after the moreKeywords={
$PROD,$DEMAND, $AUXILIARY,$COMMODITIES, $SECTORS,$CONSUMERS, $MODEL,$REPORT,
It’ll become automatically case insensitive due to the options selected.

# OrgMode on my iPhone: MobileOrg and Dropbox

In one of my last year posts I wrote about using Org-Mode for organizing your projects and your notes/todo’s with links to your files. I am now using org-mode for lots of things but especially for my todo’s. Now this works fine if my notebook is up and running, but sometimes I want to have a look at those org-files without firing up my notebook. I use an iPhone and Richard Moreland developed a nice app (see http://mobileorg.ncogni.to/) that works together with dropbox (http://www.dropbox.com/).

It has some nice features:
• Support for Dropbox or WebDAV as a transfer mechanism
• Org files are stored offline and available anywhere
• Complete editing support, including editable headings, body text, todo state, tags and priority.
• Note-taking facility built in, including offline support
• Full-text search, or search by keyword (TODO, DONE, WAITING) or by tag (errand, office)
• Mark nodes as done, or flag them with an optional note for reference later
• Document view of your outlines, for reading document-style Org files with long body text
• Powerful support for linking between Org files

Here are some printscreens from my iPhone (by the way: printscreens can be produced by pushing the on/off and home button at the same time).

# New update of Gams-Mode (3.6)

There is a update for Gams-mode. It contains some bug fixes and a nice new feature: If you hit C-u C-c C-. you can search for an identifier. It finds the parameter and has several options like jump to the next occurrence, jump to the file, split the screen and also show the file where gams-mode found the parameter. All these possibilities are described at the bottom-line and are self-explaining (“decl” shows the declaration of the identifier).

# Gams code in LaTeX documents

Edson Valle recently wrote a style for the package listings from LaTeX. It allows you to format Gams code nicely in your LaTeX documents.
Here is a small example taken from his post to the Gams mailing list:
Scalar X /1/;
Scalar Y;
Y = 2*X;
Display “This is the famous Y”, Y;
In your LaTeX document this would look like:
The only thing you have to do is write a file gams.tex with the style and include this file in your LaTeX document before \begin{document}.
Information on the package Listings can be found here: listings
The gams.tex file should look like this:
\usepackage{listings}
%author Edson Cordeiro do Valle edsoncv at gmail dot com

\lstdefinelanguage{GAMS}{
morekeywords={
ABORT , ACRONYM , ACRONYMS , ALIAS , ALL , AND , ASSIGN , BINARY , CARD , DISPLAY , EPS , EQ , EQUATION , EQUATIONS , GE , GT , INF , INTEGER , LE , LOOP , LT , MAXIMIZING , MINIMIZING , MODEL , MODELS , NA , NE , NEGATIVE , NOT , OPTION , OPTIONS , OR , ORD , PARAMETER , PARAMETERS , POSITIVE , PROD , SCALAR , SCALARS , SET , SETS , SMAX , SMIN , SOS1 , SOS2 , SUM , SYSTEM , TABLE , USING , VARIABLE , VARIABLES , XOR , YES , REPEAT , UNTIL , WHILE , IF , THEN , ELSE , SEMICONT , SEMIINT , FILE , FILES , PUT , PUTPAGE , PUTTL , PUTCLOSE , FREE , NO , SOLVE , FOR , ELSEIF , ABS , ARCTAN , CEIL , COS , ERROR , EXP , FLOOR , LOG , LOG10 , MAP , MAPVAL , MAX , MIN , MOD , NORMAL , POWER , ROUND , SIGN , SIN , SQR , SQRT , TRUNC , UNIFORM , LO , UP , FX , SCALE , PRIOR , PC , PS , PW , TM , BM , CASE , DATE , IFILE , OFILE , PAGE , RDATE , RFILE , RTIME , SFILE , TIME , TITLE , TS , TL , TE , TF , LJ , NJ , SJ , TJ , LW , NW , SW , TW , ND , NR , NZ , CC , HDCC , TLCC , LL , HDLL , TLLL , LP , WS , /,PROD: },
sensitive = false,
morecomment=[f]*,%
morecomment=[s]{$ontext}{$offtext},
morecomment=[s][\color{green}]{/}{/},
morestring=[b]”,
morestring=[b]’
}
\lstset{
basicstyle=\fontfamily{pcr}\fontseries{m}\selectfont\footnotesize,
keywordstyle=\color{blue}\bfseries,
stringstyle=\color[rgb]{0.5,0,0.5}\itshape,
showstringspaces=false,
numbers=left,
numberstyle=\color[rgb]{0,0.5,0.5}\fontfamily{pcr}\fontseries{m}\selectfont\tiny,
numberblanklines=false,
showlines=false,
belowskip=\bigskipamount{},
breaklines=true,
%stepnumber=2,
tabsize=6,
%extendedchars=true,
%float=h,
frame=tb
}