If I run the command Bundles > LaTeX > Jump to Current Line in Viewer, I get
a dialogue box that contains this error:
Failure running ³Jump to Current Line in Viewer².
usage: texMate.py sync [-h] [filepath]
texMate.py sync: error: argument filepath: No such file or directory: 1
What causing this error and how can I solve it?
Ross Ahmed
Ecologist
07875533906
Twitter: @RossAhmed <https://twitter.com/RossAhmed>
LinkedIn: Ross Ahmed <https://www.linkedin.com/pub/ross-ahmed/2a/775/590>
In my .tex file, I have section titles and labels like this:
\section{My section title}
\label{sec:my_section_title}
I can then cross-reference this section in my text like this:
Lorem ipsum dolor sit amet \ref{my_section_title}
I'm frequently changing my section titles to something very different different which forces me to change my labels and cross references. This can becomes tedious when my cross references are scattered through a long document.
What is the best way of changing labels in which the cross references are scattered through long development? Is there any way to automate the process?
Ross Ahmed
Ecologist
--
07875533906
Twitter: @RossAhmed
LinkedIn: Ross Ahmed
Hi TextMaters,
I have a very superficial knowledge of perl, so I wonder if someone can
help.
Setup: before I compile my LaTeX document, I need to run a shell script
(using sed) to find/replace certain strings. [There is a long story for
why I need to do this, and why its not easily avoidable.]
Possible solution: I was wondering if I can insert something in the
latex_watch.pl script that would run this shell script, without causing
latex_watch to go into an infinite loop (since the shell script changes
the underlying LaTeX file/s).
I've tried inserting the relevant code in several locations, but I can't
seem to avoid the loop. That's not surprising, since I don't really know
perl. Does anyone know if there is easy way to
1) modify latex_watch.pl so it executes a shell script that modifies the
underlying LaTeX file without going in to a loop?
or
2) cause the shell script to run on the file whenever the file changes
by some other means?
Thanks!
Zvi
I have a request regarding citations based on current word or Ref-TeX style: is it possible to make them non-case sensitive?
When I search by author's name, which is most of the time, I know that the first letter of the word needs to be in uppercase and so I type it that way. But if I'm searching by title words, say for a word like "apocalypse", I am not sure I should type a truncated "Apocal" or "apocal". My bib files contain titles with first letters in upper- and lowercase. It would be great to be able to do a case insensitive search.
--Gildas
I have this piece of language grammar to match a struct in D :
begin = '(?x)^\s*
((?:\b(public|private|protected|static|final|synchronized|abstract|export|shared)\b\s*)*)
# modifier
(struct)\s+
(\w+)\s* # identifier
(?:\(\s*([^\)]+)\s*\)|)\s* # Template type
(if\s*\(\s*([^\)]+)\s*\)|)?\s* # Template constraint
';
end = '(?={|;)';
It will match this code, as an example:
struct Foo(A) if (true)
{
}
The problem is if I put the "if" on a new line it won't match. How can I
make the rule match across several lines?
--
/Jacob Carlborg
I've tried 'latex and view' again and it does now start up faster than I remember!
Thanks for the great work,
Geoff
>> On 24 Mar 2015, at 13:32 , Geoff Vallis <gkvallis(a)gmail.com> wrote:
>>
>> Hi Ren,
>>
>> Your fix did the trick, thanks very much.
>>
>> The reasons I don't use 'typeset and view' are twofold. The main one is just that it is a bit slow - I have to wait almost five seconds before it actually starts to typeset, which may not seem very long but when I am 'debugging' it is a little frustrating. Using a terminal window the typesetting starts instantly.
>
> Commit 39b09967 [1] should improve the startup time of `texmate` significantly.
>
> [1]: https://github.com/textmate/latex.tmbundle/commit/39b09967
>
> I get an overhead of less than 0.3s if I use `texmate` on a minimal file. The translation of the minimal file inside Terminal using the command `time pdflatex tmp.tex` takes 0.55s. The following command ? basically simulating a run of ?Typeset & View (PDF)? ? inside TextMate takes about 0.79s:
>
> ?
> #!/usr/bin/env bash
>
> BUNDLE_DIR="$HOME/Library/Application Support/Avian/Bundles/LaTeX.tmbundle"
> TM_BUNDLE_DIR="$HOME/Library/Application Support/TextMate/Managed/Bundles"
>
> export TM_FILEPATH="tmp.tex"
> export TM_SUPPORT_PATH="$TM_BUNDLE_DIR/Bundle Support.tmbundle/Support/shared"
> export TM_BUNDLE_SUPPORT="$BUNDLE_DIR/Support"
> export PATH="$BUNDLE_DIR/Support/bin":$PATH
> export TM_SELECTION='1:1'
>
> texmate.py -suppressview latex -latexmk no -engine pdflatex
> ?
>
> tmp.tex:
> ?
> \documentclass{article}
>
> \begin{document}
> Bla
> \end{document}
> ?
>
> Could you maybe test the above example and send in your results. If it takes multiples seconds before `texmate` starts typesetting, then maybe your local copy of the bundle does not contain the changes done in commit 5074427f [2]?
>
> [2]: https://github.com/textmate/latex.tmbundle/commit/5074427f
>
>> The second reason is that I can go back and forth between xelatex and pdflatex easily by setting up two scripts with different keyboard shortcuts, which I find quite convenient.
>
> You can change the typesetting engine used by ?Typeset & View (PDF)? with the following commands:
>
> defaults write com.macromates.textmate.preview latexEngine xelatex
> defaults write com.macromates.textmate.preview latexEngine pdflatex
>
>> I know there are some advantages to 'typeset and view' and if it were a bit quicker, like the equivalent command in TexShop which is quite fast, I would use it.
>
> Hopefully the latest changes help.
>
>> Thanks again
>> Geoff
>
> Kind regards,
> Ren?
>
Dear René,
The new citation command based on current word or Ref-TeX style is working well. I use both and wonder how to tailor them for my use, now that I realized that I had to throw out my ~/Library/Application\ Support/Avian previous tweakings of the two commands (they called LaTeXUtils.rb):
1. Citation based on current word gives results such as: \cite{Bellah:1996kx}. I would like to get \cite[]{Bellah:1996kx}, with the cursor in the square brackets so I can enter pages, and then tab the cursor after the citation.
2. My own use of the tweaked Citation Ref-TeX style gave me the choice of \cite[]{}, \textcite[]{}, \footcite[]{}, \autocite[]{} formats. I don't use any other cite formats and would rather have this small list for my case.
How do I adapt the new commands to my situation?
--Gildas
Hello,
I have just installed the latest security update on my Mac (10.10.2) and some commands in my latex bundle were broken by it. For example, I have a script (below) that opens a terminal window and typesets the master file, but after the security update the command no longer tries to typeset the master file, but the subfile, and hence typesetting fails. I am sure is is the Mac OS security update that led to the failure, because I tried on two Macs with the same behaviour.
Thanks for any help you may offer
Geoff
--------
#!/usr/bin/env bash
[[ -f "${TM_SUPPORT_PATH}/lib/bash_init.sh" ]] && . "${TM_SUPPORT_PATH}/lib/bash_init.sh"
TM_LATEX_MASTER=`${TM_RUBY:-ruby} <<"RUBY"
require "#{ENV['TM_SUPPORT_PATH']}/lib/escape.rb"
require "#{ENV['TM_BUNDLE_SUPPORT']}/lib/LaTeXUtils.rb"
master = LaTeX.master(ENV['TM_LATEX_MASTER'] || ENV['TM_FILEPATH'])
puts master
RUBY`
FILE=${TM_LATEX_MASTER:-$TM_FILEPATH}
cd ${TM_DIRECTORY}
open -a iterm
/Users/gkv/scripts/iterm "time /usr/texbin/pdflatex -synctex=1 ${FILE%.tex}"
--------