2016-11-08 8 views
1

라텍스 상태 시스템 템플릿을 만들려면 숭고한 스 니펫을 사용하고 있습니다. 그러나 아무 것도하지 않습니다 ("stmach"를 입력하고 Tab을 누르면 stmach이 사라지지만 라텍스 코드는 포함되지 않습니다). 나는 왜 다른 모든 발췌 문장이 잘 작동하는지 이해하지 못한다.라텍스 숭고함 스 니펫

나는 그것이 작동, 스 니펫에 몇 줄을 제거하면,하지만 전체 블록을 필요 라텍스 코드 오류 또는 경고없이 작동/

<snippet> 
<content><![CDATA[ 
    \begin{center} 
     \begin{tikzpicture}[shorten >=1pt,node distance=4.5cm,on grid,auto] 

     \tikzstyle{every state}=[draw=blue!50,very thick,fill=blue!20] % Node color 

     \node[state,initial,initial text=reset, initial where=below] (configuration) {$conf$}; % Node name and position 
     \node[state] (init) [below right=of configuration] {$init$}; 

     \path[->] % Arrow 
     (configuration) 
      edge [bend left]     node {finishConfiguration=1} (init) 

     (init) 
      edge [bend left]     node {} (configuration); 

     \end{tikzpicture} 
    \end{center} 
]]></content> 
<!-- Optional: Set a tabTrigger to define how to trigger the snippet --> 
<tabTrigger>stmach</tabTrigger> 
<!-- Optional: Set a scope to limit where the snippet will trigger --> 
<scope>text.tex</scope> 

참고.

답변

2

문자 $은 Sublime Text 스 니펫에 특별한 의미가 있으므로 유효한 것으로 이스케이프되어야합니다.

당신은 documentation shows 같은 선행 백 슬래시로 이스케이프 수 : ST 불행히도 피드백을 제공하지 않는

<snippet> 
<content><![CDATA[ 
    \begin{center} 
     \begin{tikzpicture}[shorten >=1pt,node distance=4.5cm,on grid,auto] 

     \tikzstyle{every state}=[draw=blue!50,very thick,fill=blue!20] % Node color 

     \node[state,initial,initial text=reset, initial where=below] (configuration) {\$conf\$}; % Node name and position 
     \node[state] (init) [below right=of configuration] {\$init\$}; 

     \path[->] % Arrow 
     (configuration) 
      edge [bend left]     node {finishConfiguration=1} (init) 

     (init) 
      edge [bend left]     node {} (configuration); 

     \end{tikzpicture} 
    \end{center} 
]]></content> 
<!-- Optional: Set a tabTrigger to define how to trigger the snippet --> 
<tabTrigger>stmach</tabTrigger> 
<!-- Optional: Set a scope to limit where the snippet will trigger --> 
<scope>text.tex</scope> 
</snippet> 
https://github.com/sublimehq/Packages/pull/576에서 강조 구문을 사용

당신과 같은 문제 명확하게 본 : invalid snippet

가 보인다 어떻게 탈출 할 때 : valid snippet

+0

감사합니다, 매력처럼 작동 :) – Nakrule