{"id":38,"date":"2008-12-21T21:56:14","date_gmt":"2008-12-21T19:56:14","guid":{"rendered":"http:\/\/www.blackhats.es\/wordpress\/?p=38"},"modified":"2022-08-20T18:26:12","modified_gmt":"2022-08-20T16:26:12","slug":"tex-y-latex-en-emacs","status":"publish","type":"post","link":"https:\/\/www.blackhats.es\/wordpress\/?p=38","title":{"rendered":"TeX y LaTeX en emacs"},"content":{"rendered":"<p>Los comandos LaTeX normalmente toman la forma:<\/p>\n<p style=\"padding-left: 30px;\"><em>\\keyword{text}<\/em><\/p>\n<p>Debido a que LaTeX es extensible, Emacs no checkea que la palabra clave sea correcta. Adem\u00e1s de ello en LaTeX, los caracteres <strong>{}<\/strong> y <strong>$$<\/strong> aparecen en pares, por lo que emacs genera estos pares.<\/p>\n<p>Para entrar en el modo LaTeX debemos invocar <strong>M-x latex-mode<\/strong> o bien <strong>M-x plain-text-mode<\/strong> si vamos a trabajar con TeX. Adem\u00e1s de ello existen otras dos opciones m\u00e1s, que son <strong>M-x tex-latex<\/strong> y <strong>M-x text-context<\/strong>. Veamos que juego de keystrokes facilita emacs para tareas fundamentales en estos modos:<\/p>\n<p><strong>C-c {<\/strong> : inserta el par de llaves.<br \/>\n<strong> C-c }<\/strong> : se desplaza por el par de llaves.<br \/>\n<strong>(sin keystroke asociada)<\/strong> : &#8216;<span style=\"color: #0000ff;\">tex-validate-buffer<\/span>&#8216;; valida la apertura y cierre de llaves y dolares en el buffer.<br \/>\n<strong>(sin keystroke asociada)<\/strong> : &#8216;<span style=\"color: #0000ff;\">tex-validate-region<\/span>&#8216;; valida la apertura y cierre de llaves y dolares en una regi\u00f3n dada.<br \/>\n<strong> C-q \u00ab<\/strong>; inserta quotation marks (ya que no forma parte del ASCII standard).<br \/>\n<strong> C-q `<\/strong>; inserta quotation marks (ya que no forma parte del ASCII standard).<br \/>\n<strong> C-c C-o<\/strong>; &#8216;<span style=\"color: #0000ff;\">latex-insert-block<\/span>&#8216;: inserta un par comando.<br \/>\n<strong> C-c C-c<\/strong>; &#8216;<span style=\"color: #0000ff;\">latex-close-block<\/span>&#8216;; inserta el cierre del comando en caso de haber escrito la apertura.<br \/>\n<strong> C-c C-f<\/strong>; &#8216;<span style=\"color: #0000ff;\">tex-file<\/span>&#8216;; parsea, compila y muestra el tex.<br \/>\n<strong> C-c C-l<\/strong>; &#8216;<span style=\"color: #0000ff;\">tex-recent-output-buffer<\/span>&#8216;; representa el fichero si no se encuentra en una ventana el buffer.<br \/>\n<strong> C-c C-u<\/strong>; para ver el resultado del fichero usando el visor xdvi.<br \/>\n<strong> C-c C-p<\/strong>; &#8216;<span style=\"color: #0000ff;\">tex-print<\/span>&#8216;; imprime el fichero.<br \/>\n<strong> C-c C-q<\/strong>; &#8216;<span style=\"color: #0000ff;\">tex-show-print-queue<\/span>&#8216;; muestra la cola de impresi\u00f3n.<br \/>\n<strong> C-j<\/strong>; &#8216;<span style=\"color: #0000ff;\">tex-terminate-paragraph<\/span>&#8216;; inserta dos retornos &#8216;duros&#8217; y checkea la sintaxis del p\u00e1rrafo.<br \/>\n<strong> C-c C-b<\/strong>; &#8216;<span style=\"color: #0000ff;\">tex-buffer<\/span>&#8216;; procesa el buffer.<br \/>\n<strong> C-c C-k<\/strong>; &#8216;<span style=\"color: #0000ff;\">tex-kill-job<\/span>&#8216;; mata el procesamiento.<br \/>\n<strong> C-c TAB<\/strong>; &#8216;<span style=\"color: #0000ff;\">tex-bibtex-file<\/span>&#8216;; procesa el trabajo actual usando bibtex (para bibliografias).<br \/>\n<strong>(sin keystroke asociada) <\/strong>: &#8216;<span style=\"color: #0000ff;\">tex-all-print<\/span>&#8216;; imprime el dvi usando una impresora adicional. Para ello checkea la variable tex-alt-dvi-print-command.<br \/>\n<strong>(sin keystroke asociada) <\/strong>: &#8216;<span style=\"color: #0000ff;\">latex-insert-item<\/span>&#8216;; inserta un <strong>\\item<\/strong> en latex.<br \/>\n<strong>(sin keystroke asociada) <\/strong>: &#8216;<span style=\"color: #0000ff;\">latex-split-block<\/span>&#8216;; inserta el final del bloque actual y el principio de uno nuevo.<br \/>\n<strong>(sin keystroke asociada)<\/strong> : &#8216;<span style=\"color: #0000ff;\">tex-insert-quote<\/span>&#8216;; inserta <strong>\u00ab<\/strong>.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>Los comandos LaTeX normalmente toman la forma: \\keyword{text} Debido a que LaTeX es extensible, Emacs no checkea que la palabra clave sea correcta. Adem\u00e1s de ello en LaTeX, los caracteres {} y $$ aparecen en pares, por lo que emacs genera estos pares. Para entrar en el modo LaTeX debemos invocar M-x latex-mode o bien [&hellip;]<\/p>\n","protected":false},"author":3,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[17],"tags":[8,47,48],"class_list":["post-38","post","type-post","status-publish","format-standard","hentry","category-basic","tag-emacs","tag-latex-mode","tag-tex-latex"],"_links":{"self":[{"href":"https:\/\/www.blackhats.es\/wordpress\/index.php?rest_route=\/wp\/v2\/posts\/38"}],"collection":[{"href":"https:\/\/www.blackhats.es\/wordpress\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.blackhats.es\/wordpress\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.blackhats.es\/wordpress\/index.php?rest_route=\/wp\/v2\/users\/3"}],"replies":[{"embeddable":true,"href":"https:\/\/www.blackhats.es\/wordpress\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=38"}],"version-history":[{"count":2,"href":"https:\/\/www.blackhats.es\/wordpress\/index.php?rest_route=\/wp\/v2\/posts\/38\/revisions"}],"predecessor-version":[{"id":793,"href":"https:\/\/www.blackhats.es\/wordpress\/index.php?rest_route=\/wp\/v2\/posts\/38\/revisions\/793"}],"wp:attachment":[{"href":"https:\/\/www.blackhats.es\/wordpress\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=38"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.blackhats.es\/wordpress\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=38"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.blackhats.es\/wordpress\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=38"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}