> I'll give a talk on the ConTeXt bundle next weekend in
> Epen/Netherlands. Until then I will enchance it a lot and post it to
> the ConTeXt mailing list. (And here, if anyobdy is interested.)
>
>
> Patrick
Patrcick,
Would you mind posting a link to your talk here too? (I don't
subscribe to the
ConTeXt mailing list anymore)
> I suppose that given that the syntax is very similar, we could try to
> add ConTeXt to the existing LaTeX bundle and try to make the commands
> work for ConTeXt as well. I'd be happy to help people out with this,
> but I don't know much ConTeXt. (On the other hand, I do know the
> workings of the LaTeX bundle pretty well ;) ). So perhaps we can
> figure out what needs to be done and then start doing it.
>
> Do I understand correctly that ConTeXt is an extension of TeX, i.e.
> all TeX code is valid in general? In that case we can use the
> existing TeX syntax and include it, and just add the special features
> that ConTeXt has.
>
> Really the only reason ConTeXt is not part of the LaTeX bundle at
> this point is (I think) simply the fact that the people who have
> worked on the LaTeX bundle haven't had much use for ConTeXt. But I
> see no reason not to make it work, if there are enough people
> interested in it and willing to make it work.
>
> Haris Skiadas
> Department of Mathematics and Computer Science
> Hanover College
>
>
Haris,
In general, I believe that you can use plain tex commands, but
ConTeXt also provides a complete macro
set built on TeX, so that you do not need to use plain TeX commands.
I've attached a good template file from Sanjoy Mahajan that you can
typeset in TeXShop.
-paul
% "Hello world!" document for the ConTeXt typesetting system
%
% === History ===
% 2006-12-29 Sanjoy Mahajan <sanjoy(a)mit.edu>
% * Created
%
% This document is the public domain (no copyright).
\setupcolors[state=start] % otherwise you get greyscale
\definecolor[headingcolor][r=1,g=0.0]
% for the document info/catalog (reported by 'pdfinfo', for example)
\setupinteraction[state=start, % make hyperlinks active, etc.
title={Hello world!},
subtitle={A ConTeXt template},
author={Sanjoy Mahajan},
keyword={template}]
% useful urls
\useURL[author-email][mailto:a.u.thor@somewhere.edu][]
[a.u.thor(a)somewhere.edu]
\useURL[wiki][http://wiki.contextgarden.net][][\ConTeXt\ wiki]
\useURL[sanjoy][mailto:sanjoy@mit.edu][][sanjoy@mit.edu]
% for US paper; the sensible default is [A4][A4] (A4 typesetting,
% printed on A4 paper)
\setuppapersize[letter][letter]
\setuplayout[topspace=0.5in, backspace=1in, header=24pt, footer=36pt,
height=middle, width=middle]
% uncomment the next line to see the layout
% \showframe
% headers and footers
\setupfooter[style=\it]
\setupfootertexts[\date\hfill \ConTeXt\ template]
\setuppagenumbering[location={header,right}, style=bold]
\setupbodyfont[11pt] % default is 12pt
\setuphead[section,chapter,subject][color=headingcolor]
\setuphead[section,subject][style={\ss\bfa},
before={\bigskip\bigskip}, after={}]
\setuphead[chapter][style={\ss\bfd}]
\setuphead[title][style={\ss\bfd},
before={\begingroup\setupbodyfont[14.4pt]},
after={\leftline{\ss\tfa A. U. Thor $\langle$\from[author-email]$
\rangle$}
\bigskip\bigskip\endgroup}]
\setupitemize[inbetween={}, style=bold]
% set inter-paragraph spacing
\setupwhitespace[medium]
% comment the next line to not indent paragraphs
\setupindenting[medium, yes]
\starttext
\title{Hello, world!}
Here is a hello-world template document to illustrates a few \ConTeXt\
features. Have fun. You can find a lot more information at
\from[wiki]; the preceding text should be colored and clickable, and
clicking it should take you to the wiki.
\subject{A list}
Here is an example of a list.
\startitemize[a] % tags are lowercase letters
\item first
\item second
\item third
\stopitemize
\subject{Math}
An equation can be typeset inline like $e^{\pi i}+1=0$, or as a
displayed formula:
\startformula
\int_0^\infty t^4 e^{-t}\,dt = 24.
\stopformula
% don't use $$...$$ (the plain TeX equivalent)
You can also have numbered equations:
\placeformula[eq:factorial-example]\startformula
\int_0^\infty t^5 e^{-t}\,dt = 120.
\stopformula
And you can refer to them by name. I called the previous equation {\tt
factorial-example}, and it is equation \in[eq:factorial-example].
\ConTeXt\ figures out the number for you. And with interaction turned
on, you can click on the equation number to get to the equation.
\subject{Text with figures}
Now text with a few figures. The first figure goes on the right, with
the paragraph flowing around it.
\placefigure[right,none]{}{\externalfigure[dummy]}
\input tufte
The next figure will go inline, like a displayed formula:
\placefigure[here,none]{}{\externalfigure[dummy]}
\input tufte
Here's another reference to the numbered equation -- equation
\in[eq:factorial-example] on \at{page}[eq:factorial-example], so that
you can test clicking on it or on the page reference.
% most plain TeX commands work
\vfill
\noindent
\framed[corner=round, width=\textwidth,height=1in,
backgroundcolor=gray,background=color]
{This document is in the public domain, so that you can improve it,
share
it, and otherwise do what you want with it.
Suggestions are welcome. You can send them to me
at \from[sanjoy] (Sanjoy Mahajan).}
\stoptext
Hi,
I noticed some weird indentation problem when using "Insert as
Snippet" as the output for a command. I reduced it to a simple test
case (at least I hope):
Make a command with
Output: "Insert as Snippet"
Command: echo -n "$TM_SELECTED_TEXT"
Example text:
✂------✂------✂------✂------
- list1
[tab]- indented list2
paragraph 1
paragraph 2
✂------✂------✂------✂------
If I select the text somewhere in the first line to the end and run
the command, nothing changes, which is good.
If I select the text somewhere after the tab in the second line to
the end I get this:
✂------✂------✂------✂------
- test list
[tab]- test indented list
[tab]paragraph 1
[tab]paragraph 2
✂------✂------✂------✂------
If I use "Replace selected text" instead, this doesn't happend.
So, if I understand this right: When a command inserts a snippet on a
indented line, everything in the snippet is indented. Why?
Just in case, I deselected "Re-indent pasted text" in the prefs,
still the same.
Am I missing something?
Thanks
--
FredB
Hi,
I was wondering if there's an easy to to prefix or suffix selected
lines with a string.
Anyone who has used BBEdit will know what I am taking about.
I assume there is a way to do this, but I was hoping to avoid regular
expressions other overly complex gyrations.
Thanks in advance.
I've found this topic a few times in the archives, but never came up
with a definitive answer.
I'm using Textmate for basic XHTML/CSS/JavaScript editing and while
Camino and Safari happily pop right up when I choose "Open Document
in Running Browser(s)" and Refresh when I pick "Refresh Running
Browser(s)" but Firefox responds a bit differently.
It doesn't respond at all to "Open Document in Running Browser(s)"
and Refresh Running Browser(s)" just opens a new, empty, window or tab.
It's a bit frustrating as Firefox is my browser of choice for working
on sites, thanks of course to the Web Development plugin among others.
Any advice?
Hi all.
I've just finished the 0.1 release of a command I've been working on
tonight, based on Tom Counsell's (http://tom.counsell.org/view/
ExcelToLatexTableConvertor) excel2latex, that will take an excel
table from clipboard (copy from excel. doesn't work for selected text
yet.) and run by typing excel[tab] (excel⇥').
It requires that the longtable package is included, but if you're
working with tables, you'll probably want that anyway. This isn't
perfect, you'll probably want to change the '\begin{longtable}{c c c
c c c }' to format the rows how you like, but it seems to work for me.
let me know what you think. I know this saves me a lot of time, so I
hope it will for you too.
Cheers, Al.
☠☢✯☢☠
Hello!
Two Problems on the Latex bundle.
I have a project structure like this:
-Projectfolder
projectmain.tex (master file)
-- subfolder1
-- file_1_1.tex
-- file_1_2.tex
-- subfolder 2
-- file_2_1.tex
When I now drag file file_1_2.tex into file_2_1.tex,
I get
\include{../subfolder1/file_1_2.tex}
The problem is, that I´get an error, because the file
can not be found. The file path has to be
\include{subfolder1/file_1_2.tex}
because it depends on the master file. But when I then
invoke the command "Show outline", the file file_1_2.tex
is not found, because it expects the path as the first
statement.
Another problem is, that latex does not typeset the
files, that where included. Why does the drag command
produce a include command?
Helge
Hi,
Is there a way to setup Textmate (for Ruby on Rails development) such that
when I'm "tailing" the error log I will get different line colors for errors
based on the severity of the error?
Eg
- logger.error ('xxx') => RED
- logger.warning ('xxx') => ORANGE
- etc
Thanks in advance
Greg
Hi,
I'm looking for a way to crate a simple snippet so that tab
completion: //(tab) will insert CSS comments and wrap any text on the
line if applicable.
I've got so far as this:
/* ${1:${TM_CURRENT_LINE/(^\s+)(.+;)/$2/g}} */
$2
Which when you feed something like:
//(tab)some-property: some-value;
Produces output:
/* some-property: some-value; */
some-property: some-value;
What I would like is to delete the second instance. Is there any
way? Or, will I just have to settle for selecting the text and
create a key equivalent snippet (which means I have one snippet for
plain comment and another for wrapping...).
Oh and one other question about snippets: in the sequence ${«tab
stop»/«regexp»/«format»/«options»} what are the options? I stuck with
g because that's what I had seen.
thanks in advance,
Gabriel
Hi!
Just wondering because of the news that input managers will be banned
in Leopard. Is there already a new solution planned for "Edit in
TextMate"?
Niels
--
Jammern für Anfänger: Niels K. (25) Jammerbacke -- auch für
professionelles Jammern zu haben
http://jammern.wordpress.com
I made my first screencast ever. It's 11 minutes long, and 15Mb big! The
volume is a little low,
pronunciation could be better, but I hope you enjoy! demonstrates the
latest svn features.
http://home.mac.se/joachimm/Objective-C_with_TextMate.mov
Joachim Mårtensson
For a bundle I'm maintaining, I wanted to be able to easily toggle
between having changes written directly to the bundle (so that I can
commit them) and having changes written to deltas (so that I can make
local customizations that are not committed).
I wrote a command for this:
http://henrik.nyh.se/2007/03/24/textmate-command-to-toggle-writing-deltas/
I'm sure others have done similar things before, but I couldn't find
anything, so I rolled my own, and thought I'd share.
If the command does something bad or unnecessary, or if you've solved
this problem in a better way, please let me (us) know.
I have lately had to use code that includes
\begin{SaveVerbatim}[commandchars=\\\{\},codes={\catcode`$=3
\catcode`^=7}]{guard}
$\lnot$busy(phone)
\end{SaveVerbatim}
The \catcode`$=3 confuses the TextMate's grammar and thus everything
that follows is treated at maths in scopes and hence in colouring.
Is there an easy solution without messing with the main language
definition?
Hi there,
after getting nagged at my blog (http://www.gnegg.ch/archives/354-
External-blogging-tools.html) to look into why TextMate's Blogging
Bundle behaves strangely with Serendipity blogs, I had a look into
the problem.
Actually, there are two problems, but so far, I've only fixed one
(it's getting late here):
1) When you have a Date:-Header in your Posting, s9y will interpret
the date wrongly and will assume it to be the beginning of the epoch
(1970-01-01). This is problably a flaw in s9y and I'll report it
there as soon as I know what's going on.
2) The Pings- and Comments-Headers were ignored and Pings/Comments
were turned off regardless of what the headers were set to. This is
what I've actually looked into this evening (GMT+1 here):
Basically it all comes down to the fact that parse_post (blogging.rb)
is unable to cope with empty headers of which s9y produces at least
one: s9y always sends an empty mt_convert_breaks-member in the post
record and when no tags are defined, it'll also send an empty
mt_keywords member.
With an unpatched blogging.rb, this will create something like this
(ignore the f*ed up date - that's caused by bug 1) above):
Type: Blog Post (Markdown)
Blog: s9y
Post: 1
Title: First entry
Date: 1970-01-01 02:00:00 +0100
Keywords:
Format:
Pings: On
Comments: On
This causes the parser to stop after the Keywords-header (lines
206/207) which will lead to the following headers to be ignored, thus
turning off comments (s9y assumes Comments=off if the information
isn't present in the RPC-call).
Now I'm not sure if s9y's behaviour is actually legal here (please
enlighten me), but I think the blogging bundle should be able to cope
with empty fields.
There are two possible fixes: One is to fix the fields-parser to make
it stop bailing out at empty fields. I've attached bb_fixparser.diff
which does that. The other way is to make post_to_document stop
adding empty format and keyword fields. bb_skipempty.diff does that.
I'm not sure which way is the correct way to go. fixparser has the
tendency of working with even more crude blogging engines, while
skipempty is what the bundle did so far (look at the handling of
mt_tags for example.
Anyways. Please consider merging one of the patches to make the
blogging bundle work better with serendipity.
Thanks
Philip
Hi Allan
How diffiicult would it be to add an option to
the folding system telling it to obey indentation
exclusively?
With this option, TextMate would become a
very nice cataloging tool for removable media:
I drag and drop the CD on a TextMate window
and the tab-indented list of the content appears.
It is already very easy to search such lists,
with folding-at-indentations it would be also
easy to navigate them.
Thanks
Piero
Hi,
We are evaluating textmate as part of a wider move from PHP to Rails. I have an issue which I hope someone here might be able to help me with...
We have a shared linux development server and we each checkout and edit our files on the server remotely either via samba shares or directly by SSHing in. This is so we can preview the changes in our dev sites as we make them.
This works OK for the windows guys (they use Tortoise svn and map a network drive to get to their files). I am OK as I am comfortable in the terminal and don't mind SSHing over to the dev server to do any subversion stuff, but we have a couple of designers who have a fear of command lines and want to work strictly within textmate. Running any SVN command from textmate fails because the samba share appears like a local directory and all the SVN commands get screwed up. It then locks their copy and we have to clean up the locks.
Is it possible to set up textmate to either tunnel the SVN commands through SSH so they run in the devserver environment as if performed in a dev server shell or switch to using a different network filesystem (SSHFS, maybe?) so that we can edit our files remotely on the development server and use SVN from within TextMate?
We'd even consider moving to another open source version control system to fix this as long as there is good support for Mac, Win and linux...
Many thanks in advance,
Matt.
---------------------------------
What kind of emailer are you? Find out today - get a free analysis of your email personality. Take the quiz at the Yahoo! Mail Championship.
Hi,
Textmate incorrectly labels italicised and bolded text.
In the following markdown: "this is s_om_e markdown", 'om' will be
tagged as italicised. When converting to HTML, 'om' will not be
italicised. I am guessing that the Markdown processor requires that
italicised text be surrounded by white space. The same is also true
for bolded text.
I was able to modify the language grammar to not incorrectly tag the
text. My solution is probably quite naive but it did work for me. Can
someone with more regex fu vet this and can we get it added to the
official bundle please (assuming it should be added and I am not
wrong on this).
Luke.
I've been toying around with the idea of a PHP/HTML language
definition. The problem is that when I'm working on a PHP project, I
switch back and forth between pure PHP files and PHP/HTML files all
the time. As you can imagine, switching the language definition each
time to get proper syntax hilighting can get bothersome. It would
most likely be a huge bundle and take a lot of work, but I was just
wondering if anybody else has found any tricks for this kind of issue
before I investigate it further.
Thanks,
Michael
Hello!
I have the following Latex code.
\begin{lstlisting}[language=PBN]
[Board "<Boardnummer>"]
\end{lstlisting}
The "< starts the scopes
punctuation.definition.string.begin.latex
string.quoted.double.guillemot.latex
The scopes are still active after the code.
Helge
With this function declaration TextMate will not show it in the
symbols list. Is there anyway of importing symbollists from external
commands instead of using regexps?
void client_clause_string(char *buf, int bufsiz,
struct Clause *pclause)
{
}
--
/Erik
Hi --
A quick request for help...
I thought there might be someone knowledgeable here about an error
that cropped up for me with the latest build (1372). I apologize in
advance is this isn't the sort of thing discussed here or if I should
bring this to another forum, but since it just happened NOW, minutes
after my update, I thought this might be the place.
Anyway, I'm using GTDalt and the context command (shift-@) gives this
error after the selection from the dialog:
/Users/mcg/Applications/Text/Textmate/TextMate.app/Contents/
SharedSupport/Support/lib/dialog.rb:138: warning: Insecure world
writable dir /Users/mcg/Documents, mode 040756
Any advice. Did I do something clueless when I grabbed the latest build?
-- Michael
I am having a problem with the GTDAlt date picker. The date inserted
does not correspond to the date entered. So entering 12/03/2007 gives
me 2007-03-11. And entering 31/05/2007 gives me 2007-05-29.
While on the topic of the date picker a small issue about the UI.
Dates are entered day month year. I think it should be year month day
for two reasons:
1. That way it is consistent with what is entered in the file.
2. The date picker defaults to the current date which is now
February. Helpfully it doesn't allow you to pick a day not in that
month. So to enter in 31/05/2007 I first had to tab ahead to change
the month before entering the day (since there are not 31 days in
February). The year month day format would avoid this problem.
Thanks.
All the best, Mark
_________________
Mark Eli Kalderon
Department of Philosophy
University College London
Gower Street
London WC1E 6BT
Departmental webpage: http://www.ucl.ac.uk/philosophy
Personal webpage: http://markelikalderon.com
Hello all,
I use the Pascal bundle quite a bit, and I've been annoyed that it can't tell the difference between declarations/prototypes of functions and definitions of functions.
I'll give you that this is tricky - in Pascal they both mostly look the same, and what they are is really determined by the next line (which would be a BEGIN if it was a definition)
FUNCTION aTest(varName: theType);
However, there is two cases where such a difference can be seen easily: the forward keyword and the external keyword
FUNCTION aTest(varName: theType); FORWARD;
{a prototype of a function found later in the file}
FUNCTION aTest(varName: theType); EXTERNAL;
{EXTERNAL is just like C's extern keyword}
And, in GPC (the Gnu Pascal Compiler) there's also:
FUNCTION aTest(varName: theType); attribute (name = 'aTest');
{You could see this kinda like declaring a prototype in C -
functions above this in the file OR outside the file
can call this function
}
Can we make the Pascal bundle use the following regular expression in the meta.function.prototype.pascal scope (so then we can use a preference to turn off their appearance in the symbol list?
\b(?i:(function|procedure))\b\s+(\w+(\.\w+)?)(\(.+?\)); (attribute|forward|external)
Or other thoughts etc would be appreciated - this could be an inefficient way of doing this.
Thanks In Advance,
_Ryan Wilcox
--
Wilcox Development Solutions: <http://www.wilcoxd.com>
Toolsmiths for the Internet Age PGP: 0x2F4E9C31