Giter Site home page Giter Site logo

Comments (6)

rbenit68 avatar rbenit68 commented on August 16, 2024

#187

Please include the following line inside command.rb import section:

require ENV['TM_SUPPORT_PATH'] + '/lib/osx/plist'

otherwise the OSX variable cannot be set and the template selector will not trigger.

from latex.tmbundle.

ondohotola avatar ondohotola commented on August 16, 2024

Works,

thank you.

el

from latex.tmbundle.

AlainMatthes avatar AlainMatthes commented on August 16, 2024

When I attempt to insert a LaTeX Template into an otherwise empty file, on Monterery 12.1 on both x86_64 and arm64 I get the error

Failure running “LaTeX Template”.

/Users/el/Library/Application Support/TextMate/Managed/Bundles/LaTeX.tmbundle/Support/lib/Ruby/command.rb:423:in `template_text': uninitialized constant OSX (NameError)
from /Users/el/Library/Application Support/TextMate/Managed/Bundles/LaTeX.tmbundle/Support/lib/Ruby/command.rb:430:in `insert_template'
from LaTeX Template:9

With which version of TextMate? No problem with 2.0.17 but problem with 2.0.23 for me

from latex.tmbundle.

juandesant avatar juandesant commented on August 16, 2024

Changed it LaTeX.tmblundle/Support/lib/Ruby/command.rb, and now the UI for selecting each of the templates is fine. However, it seems something else is broken in my environment (macOS 12.6), because why I get as output is something like this:

["\t\t\t% !TEX TS-program = xelatex\n", "\t\t\t%\n", "\t\t\t% Created by Juande Santander-Vela on date: illegal time format usage: date [-jnRu] [-r seconds|file] [-v[+|-]val[ymwdHMS]] [-I[date | hours | minutes | seconds]] [-f fmt date | [[[mm]dd]HH]MM[[cc]yy][.ss]] [+format].\n", "\t\t\t% Copyright (c) date: illegal time format usage: date [-jnRu] [-r seconds|file] [-v[+|-]val[ymwdHMS]] [-I[date | hours | minutes | seconds]] [-f fmt date | [[[mm]dd]HH]MM[[cc]yy][.ss]] [+format] .\n", "\t\t\t\documentclass[addpoints]{exam}\n", "\t\t\t\n", "\t\t\t\usepackage{polyglossia}\n", "\t\t\t\n", "\t\t\t\firstpageheader{Course}{Exam}{Page \thepage\ of \numpages}\n", "\t\t\t\firstpageheadrule\n", "\t\t\t\n", "\t\t\t\begin{document}\n", "\t\t\t\n", "\t\t\t\begin{center}\n", "\t\t\t \fbox{\parbox{0.9\textwidth}{\centering\n", "\t\t\t Answer the questions in the spaces provided on the\n", "\t\t\t question sheets. If you run out of room for an answer,\n", "\t\t\t continue on the back of the page.}}\n", "\t\t\t\end{center}\n", "\t\t\t\n", "\t\t\t\vspace{0.5cm}\n", "\t\t\t\makebox[0.9\textwidth]{Name:\enspace\hrulefill}\n", "\t\t\t\n", "\t\t\t\begin{questions}\n", "\t\t\t\question[5] First question\n", "\t\t\t\end{questions}\n", "\t\t\t\n", "\t\t\t\end{document}\n", "\t\t\t"]

from latex.tmbundle.

juandesant avatar juandesant commented on August 16, 2024

See also Issue #187.

from latex.tmbundle.

juandesant avatar juandesant commented on August 16, 2024

Don't mind this: it seems it was the result of having also changed the actual TextMate command to use /usr/bin/env ruby instead of /usr/bin/env ruby18. Restoring the LaTeX bundle to the latest released, and then adding the require ENV['TM_SUPPORT_PATH'] + '/lib/osx/plist' at the beginning of LaTeX.tmblundle/Support/lib/Ruby/command.rb does indeed resolve the issue.

Changed it LaTeX.tmblundle/Support/lib/Ruby/command.rb, and now the UI for selecting each of the templates is fine. However, it seems something else is broken in my environment (macOS 12.6), because why I get as output is something like this:

["\t\t\t% !TEX TS-program = xelatex\n", "\t\t\t%\n", "\t\t\t% Created by Juande Santander-Vela on date: illegal time format usage: date [-jnRu] [-r seconds|file] [-v[+|-]val[ymwdHMS]] [-I[date | hours | minutes | seconds]] [-f fmt date | [[[mm]dd]HH]MM[[cc]yy][.ss]] [+format].\n", "\t\t\t% Copyright (c) date: illegal time format usage: date [-jnRu] [-r seconds|file] [-v[+|-]val[ymwdHMS]] [-I[date | hours | minutes | seconds]] [-f fmt date | [[[mm]dd]HH]MM[[cc]yy][.ss]] [+format] .\n", "\t\t\t\documentclass[addpoints]{exam}\n", "\t\t\t\n", "\t\t\t\usepackage{polyglossia}\n", "\t\t\t\n", "\t\t\t\firstpageheader{Course}{Exam}{Page \thepage\ of \numpages}\n", "\t\t\t\firstpageheadrule\n", "\t\t\t\n", "\t\t\t\begin{document}\n", "\t\t\t\n", "\t\t\t\begin{center}\n", "\t\t\t \fbox{\parbox{0.9\textwidth}{\centering\n", "\t\t\t Answer the questions in the spaces provided on the\n", "\t\t\t question sheets. If you run out of room for an answer,\n", "\t\t\t continue on the back of the page.}}\n", "\t\t\t\end{center}\n", "\t\t\t\n", "\t\t\t\vspace{0.5cm}\n", "\t\t\t\makebox[0.9\textwidth]{Name:\enspace\hrulefill}\n", "\t\t\t\n", "\t\t\t\begin{questions}\n", "\t\t\t\question[5] First question\n", "\t\t\t\end{questions}\n", "\t\t\t\n", "\t\t\t\end{document}\n", "\t\t\t"]

from latex.tmbundle.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.