Hello
I'm a newbie with Ruby but it seems that there is a problem with "fileExt".
I try this (I add fileExt=[] )
#!/usr/bin/env ruby # ##################### # Helper function ##################### def recursiveFileSearch(initialList) extraPathList = [] fileExt=[]
and now I can use alt+esc in all the cases.
Is it a good solution?
Alain
Le 30 sept. 08 à 00:08, Alain Matthes a écrit :
Hello
I'm a newbie with Ruby but it seems that there is a problem with "fileExt".
I try this (I add fileExt=[] )
#!/usr/bin/env ruby # ##################### # Helper function ##################### def recursiveFileSearch(initialList) extraPathList = [] fileExt=[]
and now I can use alt+esc in all the cases.
Is it a good solution?
I make the change in the LateXCommandCompletions file
sorry :(
Alain
I think actually you would want
fileExt = "tex"
Does that also work for you?
Haris Skiadas Department of Mathematics and Computer Science Hanover College
On Sep 30, 2008, at 12:33 AM, Alain Matthes wrote:
Le 30 sept. 08 à 00:08, Alain Matthes a écrit :
Hello
I'm a newbie with Ruby but it seems that there is a problem with "fileExt".
I try this (I add fileExt=[] )
#!/usr/bin/env ruby # ##################### # Helper function ##################### def recursiveFileSearch(initialList) extraPathList = [] fileExt=[]
and now I can use alt+esc in all the cases.
Is it a good solution?
I make the change in the LateXCommandCompletions file
sorry :(
Alain
Le 30 sept. 08 à 12:55, Charilaos Skiadas a écrit :
I think actually you would want
fileExt = "tex"
Does that also work for you?
Hello
Yes that works in the two cases and I try it with \label and \ref
and also with normal completion.
I have a question about this? I learn to work with Ruby actually and I would to understand the problem.
I've some questions
- When I use the completion. I have a list of words (name of macro) from TeX and LaTeX. Sometimes the list is very big. Perhaps it's possible to have a list when the selected language is LaTeX and an other with TeX ?
- A better idea perhaps is to put this words in files and to put the name of the files in a array (with the prefs) Is this possible with Ruby?
- When we work in an environment
\begin{tikzpicture}
\end{tikzpicture}
It would be fine to add completion for latex words and for "tikz" words.
- the last:) I would like to make a simple script to run LaTeX like the old script (Typset and view) but with Ruby. Do you have try to write something like this ? actually when I want to test a picture I select the environment
\begin{tikzpicture}
\end{tikzpicture}
and I run the script below but I would like to write this with Ruby
Is it easy ?
Best Regards
Alain
# Source some support functions we need. . "${TM_SUPPORT_PATH}/lib/html.sh" . "${TM_SUPPORT_PATH}/lib/webpreview.sh"
# Get the viewer program. Any program (that works with open -a <name>) can be used, # except 'html' which is reserved to mean the internal HTML window. This is also the # default option. V=${TM_LATEX_VIEWER:-html} EL=${TM_LATEX_ERRLVL:-1} M=${TM_LATEX_MASTER:-$TM_FILEPATH}
PDF="${FILE%.*}.pdf" CWD="`pwd`/"
DIR="/Users/ego/Boulot/temp" FILE="temptex.tex"
# Set up TeX compiler, fallback to xelatex if document indicates it if grep -Esq '\usepackage{.*(xunicode|fontspec)|program=xelatex' "$M" then DEF_TEX=xelatex else DEF_TEX=pdflatex fi TEX=${TM_LATEX_COMPILER:-$DEF_TEX}
# Add our tex directory to the TEXINPUTS variable so e.g. pdfsync is found (even when the user hasn’t installed it) export TEXINPUTS="$TM_BUNDLE_SUPPORT/tex//:$(kpsewhich --expand-var '$TEXINPUTS')"
# si nécesaire \graphicspath{{$DIRtemp/}} cd ${TM_DIR_FOR_TEMP} cat >temptex.tex<<EOF \documentclass{$MY_CLASS} \param[] \thispagestyle{empty} \begin{document} \input $M \end{document} EOF
# Switch to the right directory. cd "$TM_PROJECT_DIRECTORY" cd "$DIR"
# Prepare output window. html_header 'Typeset & View' "$FILE" echo '<h2>Compiling LaTeX…</h2>'
# Check if we actually have a tex compiler require_cmd "$TEX" "You can either set the <tt>TM_LATEX_COMPILER</tt> variable to the full path of your LaTeX compiler (e.g. <tt>/opt/local/ bin/pdflatex</tt> or set the <tt>PATH</tt> variable to include the path of <tt>pdflatex</tt>."
run_tex () { "$TEX" ${TM_LATEX_OPTIONS:=--shell-escape -interaction=nonstopmode - file-line-error-style} "$1" }
# Compile. run_tex "$FILE" 2>&1
open -a "$V" temptex.pdf
html_footer
Hi Alain,
I haven't had much time to look at it, busy with schoolwork an editing a proceedings book, but it seems to work for you, doesn't it? The problem was only with the LateXCommandCompletions.rb script, not the ones for \label and \ref. Those were working just fine before. Am I right?
Haris Skiadas Department of Mathematics and Computer Science Hanover College
On Oct 3, 2008, at 9:45 AM, Alain Matthes wrote:
Le 30 sept. 08 à 15:30, Alain Matthes a écrit :
fileExt = "tex"
Hello Haris
What do you think about fileExt = "tex" ???
I would like to know if I can make this change !
Thanks
Alain
Le 3 oct. 08 à 15:52, Charilaos Skiadas a écrit :
Hi Alain,
Hi Haris,
I haven't had much time to look at it, busy with schoolwork an editing a proceedings book
ok I understand. It's the same for me ...
, but it seems to work for you, doesn't it? The problem was only with the LateXCommandCompletions.rb script, not the ones for \label and \ref. Those were working just fine before. Am I right?
Yes but I'm not a ruby expert . But I think that now it's fine with \label and \ref and with normal completion.
it's fine also with an input of unknown file
\documentclass{article} \begin{document} Essai alt+esc
\medskip \input{unknown} \mi %<<<< \end{document}
Thanks
Alain
Excellent! Yes, in your own local copy of the command, you should feel free to add the fileExt="tex" line. I wanted to do more testing before committing the change to bundle for everyone.
Haris Skiadas Department of Mathematics and Computer Science Hanover College
On Oct 3, 2008, at 10:17 AM, Alain Matthes wrote:
Le 3 oct. 08 à 15:52, Charilaos Skiadas a écrit :
Hi Alain,
Hi Haris,
I haven't had much time to look at it, busy with schoolwork an editing a proceedings book
ok I understand. It's the same for me ...
, but it seems to work for you, doesn't it? The problem was only with the LateXCommandCompletions.rb script, not the ones for \label and \ref. Those were working just fine before. Am I right?
Yes but I'm not a ruby expert . But I think that now it's fine with \label and \ref and with normal completion.
it's fine also with an input of unknown file
\documentclass{article} \begin{document} Essai alt+esc
\medskip \input{unknown} \mi %<<<< \end{document}
Thanks
Alain
Hi all,
I've been using TextMate for a while, but this is my first message on this list. First of all, I'd like to thank you guys for building such great bundles. And thank you Allan for all the good ideas that make TextMate such a great environment to evolve in.
As you might have guessed, I don't write an email just to congratulate. I have a question for the C language grammar maintainer.
The following function definition is wrongly parsed by the C bundle:
void __attribute__((section(".sramtext"))) hal_LpsDeepSleep(bool die) { ... }
Here, the __attribute__ is considered as an entity.name.function.c, instead of hal_LpsDeepSleep. The __attribute__ keyword applied to variables also make the parser lost.
Is there a simple way to exclude __attribute__ from the "possible function names"? I have not much experience with the language grammar syntax, so instead of implementing a dirty fix, I wanted to have your opinion about that.
Thanks in advance.
Mathieu
___________________________________________
Mathieu Godart
Skype: mathieu_godart MSN: mathieu_godart@hotmail.com
ASIC Integration Manager Coolsand Technologies ___________________________________________
Hi all,
I've been using TextMate for a while, but this is my first message on this list. First of all, I'd like to thank you guys for building such great bundles. And thank you Allan for all the good ideas that make TextMate such a great environment to evolve in.
As you might have guessed, I don't write an email just to congratulate. I have a question for the C language grammar maintainer.
The following function definition is wrongly parsed by the C bundle:
void __attribute__((section(".sramtext"))) hal_LpsDeepSleep(bool die) { ... }
Here, the __attribute__ is considered as an entity.name.function.c, instead of hal_LpsDeepSleep. The __attribute__ keyword applied to variables also make the parser lost.
Is there a simple way to exclude __attribute__ from the "possible function names"? I have not much experience with the language grammar syntax, so instead of implementing a dirty fix, I wanted to have your opinion about that.
Thanks in advance.
Mathieu
___________________________________________
Mathieu Godart
Skype: mathieu_godart MSN: mathieu_godart@hotmail.com
ASIC Integration Manager Coolsand Technologies ___________________________________________