{"id":1449,"date":"2018-04-18T15:39:00","date_gmt":"2018-04-18T20:39:00","guid":{"rendered":""},"modified":"2018-10-16T09:57:41","modified_gmt":"2018-10-16T14:57:41","slug":"cambiar-tipografia-documento-latex-usando-fontspec-y-xelatex","status":"publish","type":"post","link":"https:\/\/linuxitos.com\/main\/cambiar-tipografia-documento-latex-usando-fontspec-y-xelatex\/","title":{"rendered":"Cambiar Tipografia documento LaTeX  usando fontspec y xelatex"},"content":{"rendered":"<div dir=\"ltr\" style=\"text-align: left;\">\n<div style=\"clear: both; text-align: center;\"><a href=\"https:\/\/linuxitos.com\/main\/wp-content\/uploads\/2018\/04\/Captura-2Bde-2Bpantalla-2Bde-2B2015-05-31-2B14-253A43-253A44.png\" style=\"margin-left: 1em; margin-right: 1em;\"><img decoding=\"async\" border=\"0\" src=\"https:\/\/linuxitos.com\/main\/wp-content\/uploads\/2018\/04\/Captura-2Bde-2Bpantalla-2Bde-2B2015-05-31-2B14-253A43-253A44-300x184.png\" \/><\/a><\/div>\n<div style=\"text-align: justify;\"><span style=\"font-size: large;\">Hace poco cree una entrada en la que explico c\u00f3mo compilar archivos usando fontspec para cambiar tipograf\u00edas en los documentos en Latex. Pero la manera en la que lo compilaba era desde la terminal, un poco tedioso a mi parecer. FontSpec es para cambiar el tipo de letra usado el documento. Pero, que para compilarlo, se necesita usar Xelatex o Xetex, no funciona con latex o pdflatex normal.<\/span><\/div>\n<div style=\"text-align: justify;\"><span style=\"font-size: large;\"><br \/><\/span><\/div>\n<div style=\"text-align: justify;\"><span style=\"font-size: large;\">Ahora, les mostrar\u00e9 las configuraciones necesarias para compilarlos desde TexStudio. Incluso funciona si en el documento hay citas bibliogr\u00e1ficas. La configuraci\u00f3n que se requiere es&nbsp; la que se muestra en la imagen de arriba.<\/span><\/div>\n<div style=\"text-align: justify;\"><span style=\"font-size: large;\"><br \/><\/span><\/div>\n<div style=\"text-align: justify;\"><span style=\"font-size: large;\">Ir al men\u00fa Opciones -&gt; Configurar TexStudio -&gt; Compilar -&gt; Meta \u00d3rdenes y configurar la opci\u00f3n compilar y agregar Xelatex como entorno de compilaci\u00f3n.<\/span><\/p>\n<div style=\"clear: both; text-align: center;\"><a href=\"https:\/\/linuxitos.com\/main\/wp-content\/uploads\/2018\/04\/Captura-2Bde-2Bpantalla-2Bde-2B2016-06-18-2B11-22-35.png\" style=\"margin-left: 1em; margin-right: 1em;\"><img loading=\"lazy\" decoding=\"async\" border=\"0\" height=\"74\" src=\"https:\/\/linuxitos.com\/main\/wp-content\/uploads\/2018\/04\/Captura-2Bde-2Bpantalla-2Bde-2B2016-06-18-2B11-22-35-300x35.png\" width=\"640\" \/><\/a><\/div>\n<p><span style=\"font-size: large;\">Lo m\u00e1s importante aqu\u00ed, es eliminar la compilaci\u00f3n de latex, o la que se muestra por default.<\/span><br \/><span style=\"font-size: large;\"><br \/><\/span><span style=\"font-size: large;\">Muy importante: La tipograf\u00eda que vayan a utilizar debe estar instalada en el sistema, o les marcar\u00e1 error, y deben usar el nombre exacto como est\u00e1 en el sistema. Una manera de saberlo, es abrir Writer, o Word, para ver c\u00f3mo aparece en el listado.<\/span><br \/><span style=\"font-size: large;\"><br \/><\/span><span style=\"font-size: large;\">Ejemplo:&nbsp;<b><span style=\"color: black;\"><br \/><\/span><\/b><\/span><br \/><span style=\"font-size: large;\"><br \/><\/span><\/p>\n<pre style=\"background: url(&quot;assets\/shadow.png&quot;) 50% 100% repeat-x rgb(245, 245, 245); border-radius: 4px; border: 1px solid rgb(204, 204, 204); box-shadow: rgb(204, 204, 204) 0px 0px 3px; box-sizing: border-box; color: #262626; font-family: &quot;Courier 10 Pitch&quot;, Courier, monospace; font-size: 1.5rem; font-stretch: normal; font-style: inherit; font-weight: inherit; line-height: 1.6; margin-bottom: 10px; max-width: 100%; outline: 0px; overflow: auto; padding: 9.5px; tab-size: 4; text-align: left; text-shadow: rgb(255, 255, 255) 0px 1px 0px; vertical-align: baseline; word-break: break-all; word-wrap: break-word;\"><span style=\"border: 0px; color: #333333; font-family: &quot;menlo&quot; , &quot;monaco&quot; , &quot;consolas&quot; , &quot;courier new&quot; , monospace; font-size: 15px; font-style: inherit; font-weight: inherit; margin: 0px; outline: 0px; padding: 0px; vertical-align: baseline;\"><span style=\"border: 0px; font-family: inherit; font-style: inherit; font-weight: inherit; line-height: 18.5714px; margin: 0px; outline: 0px; padding: 0px; vertical-align: baseline; white-space: pre-wrap;\">documentclass[letterpaper,11pt]{report}<br \/>usepackage{color}<br \/>definecolor{Blue}{rgb}{0.3,0.3,0.9}<br \/>usepackage{fontspec}<br \/>defaultfontfeatures{Ligatures=TeX} % To support LaTeX quoting style<br \/>setromanfont{Lato Hairline}<br \/>begin{document}<br \/>Cambiando tipograf\u00eda de documentos en LaTeX. Un tutorial aqu\u00ed <br \/>{color{Blue}{http:\/\/linuxgx.blogspot.mx\/}}<br \/>end{document}<\/span><\/span><\/pre>\n<p><span style=\"font-size: large;\"><br \/><\/span><span style=\"font-size: large;\">El ejemplo de arriba mostrar\u00e1 un documento como el siguiente:<\/span><br \/><span style=\"font-size: large;\"><br \/><\/span><\/p>\n<div style=\"clear: both; text-align: center;\"><a href=\"https:\/\/linuxitos.com\/main\/wp-content\/uploads\/2018\/04\/Screenshot-2Bfrom-2B2018-04-18-2B15-33-00.png\" style=\"margin-left: 1em; margin-right: 1em;\"><img decoding=\"async\" border=\"0\" data-original-height=\"900\" data-original-width=\"1600\" src=\"https:\/\/linuxitos.com\/main\/wp-content\/uploads\/2018\/04\/Screenshot-2Bfrom-2B2018-04-18-2B15-33-00.png\" \/><\/a><\/div>\n<p><span style=\"font-size: large;\"><br \/><\/span><span style=\"font-size: large;\"><br \/><\/span><span style=\"font-size: large;\">El ejemplo es para sistemas operativos basados en Linux, la tipograf\u00eda&nbsp;<b>DejaVu Serif<\/b>&nbsp;viene por default instalada en distros Linux.<\/span><br \/><span style=\"font-size: large;\"><br \/><\/span><span style=\"font-size: large;\">No olviden reconfigurar TexStudio a su modo normal utilizando compilaci\u00f3n en entornos Latex o PdfLatex, sino quieren compilar documentos en los que no se use fontspec, de otro modo no compilar\u00e1.<\/span><br \/><span style=\"font-size: large;\"><br \/><\/span><span style=\"font-size: large;\">Fontspec es muy \u00fatil, pero no es compatible con los paquetes de configuraci\u00f3n de caracteres, por ejemplo los paquetes&nbsp;<span style=\"color: black;\"><b>usepackage[spanish]{babel}, usepackage[T1]{fontenc}, usepackage[utf8]{inputenc}<\/b><\/span>&nbsp;&nbsp; esto se debe a que, se utiliza al propia codificaci\u00f3n de caracteres que provea la tipograf\u00eda que se seleccione al usar fontspec.<\/span><br \/><span style=\"font-size: large;\"><br \/><\/span><span style=\"font-size: large;\">Ejemplos realizados:<\/span><br \/><span style=\"font-size: large;\"><br \/><\/span><\/p>\n<div style=\"clear: both; text-align: center;\"><a href=\"https:\/\/linuxitos.com\/main\/wp-content\/uploads\/2018\/04\/Screenshot-2Bfrom-2B2018-04-18-2B15-28-02.png\" style=\"margin-left: 1em; margin-right: 1em;\"><img decoding=\"async\" border=\"0\" data-original-height=\"900\" data-original-width=\"1600\" src=\"https:\/\/linuxitos.com\/main\/wp-content\/uploads\/2018\/04\/Screenshot-2Bfrom-2B2018-04-18-2B15-28-02.png\" \/><\/a><\/div>\n<p><\/p>\n<div style=\"clear: both; text-align: center;\"><a href=\"https:\/\/linuxitos.com\/main\/wp-content\/uploads\/2018\/04\/Screenshot-2Bfrom-2B2018-04-18-2B15-28-13.png\" style=\"margin-left: 1em; margin-right: 1em;\"><img decoding=\"async\" border=\"0\" data-original-height=\"900\" data-original-width=\"1600\" src=\"https:\/\/linuxitos.com\/main\/wp-content\/uploads\/2018\/04\/Screenshot-2Bfrom-2B2018-04-18-2B15-28-13.png\" \/><\/a><\/div>\n<p><\/p>\n<div style=\"clear: both; text-align: center;\"><a href=\"https:\/\/linuxitos.com\/main\/wp-content\/uploads\/2018\/04\/Screenshot-2Bfrom-2B2018-04-18-2B15-28-35.png\" style=\"margin-left: 1em; margin-right: 1em;\"><img decoding=\"async\" border=\"0\" data-original-height=\"900\" data-original-width=\"1600\" src=\"https:\/\/linuxitos.com\/main\/wp-content\/uploads\/2018\/04\/Screenshot-2Bfrom-2B2018-04-18-2B15-28-35.png\" \/><\/a><\/div>\n<p><\/p>\n<div style=\"clear: both; text-align: center;\"><a href=\"https:\/\/linuxitos.com\/main\/wp-content\/uploads\/2018\/04\/Screenshot-2Bfrom-2B2018-04-18-2B15-28-48.png\" style=\"margin-left: 1em; margin-right: 1em;\"><img decoding=\"async\" border=\"0\" data-original-height=\"900\" data-original-width=\"1600\" src=\"https:\/\/linuxitos.com\/main\/wp-content\/uploads\/2018\/04\/Screenshot-2Bfrom-2B2018-04-18-2B15-28-48.png\" \/><\/a><\/div>\n<p><\/p>\n<div style=\"clear: both; text-align: center;\"><a href=\"https:\/\/linuxitos.com\/main\/wp-content\/uploads\/2018\/04\/Screenshot-2Bfrom-2B2018-04-18-2B15-29-18.png\" style=\"margin-left: 1em; margin-right: 1em;\"><img decoding=\"async\" border=\"0\" data-original-height=\"900\" data-original-width=\"1600\" src=\"https:\/\/linuxitos.com\/main\/wp-content\/uploads\/2018\/04\/Screenshot-2Bfrom-2B2018-04-18-2B15-29-18.png\" \/><\/a><\/div>\n<p><\/p>\n<div style=\"clear: both; text-align: center;\"><a href=\"https:\/\/linuxitos.com\/main\/wp-content\/uploads\/2018\/04\/Screenshot-2Bfrom-2B2018-04-18-2B15-30-29.png\" style=\"margin-left: 1em; margin-right: 1em;\"><img decoding=\"async\" border=\"0\" data-original-height=\"900\" data-original-width=\"1600\" src=\"https:\/\/linuxitos.com\/main\/wp-content\/uploads\/2018\/04\/Screenshot-2Bfrom-2B2018-04-18-2B15-30-29.png\" \/><\/a><\/div>\n<p><span style=\"font-size: large;\"><br \/><\/span><span style=\"font-size: large;\"><br \/><\/span><span style=\"font-size: large;\">Y eso ser\u00eda todo.<\/span><\/p>\n<p>Fuentes:<br \/><a href=\"https:\/\/en.wikibooks.org\/wiki\/LaTeX\/Fonts\">https:\/\/en.wikibooks.org\/wiki\/LaTeX\/Fonts<\/a><br \/><a href=\"http:\/\/stackoverflow.com\/questions\/877597\/how-do-you-change-the-document-font-in-latex\">http:\/\/stackoverflow.com\/questions\/877597\/how-do-you-change-the-document-font-in-latex<\/a><\/div>\n<\/div>\n","protected":false},"excerpt":{"rendered":"<p>Hace poco cree una entrada en la que explico c\u00f3mo compilar archivos usando fontspec para cambiar tipograf\u00edas en los documentos en Latex. Pero la manera en la que lo compilaba era desde la terminal, un poco tedioso a mi parecer. FontSpec es para cambiar el tipo de letra usado el documento. Pero, que para compilarlo, [&hellip;]<\/p>\n","protected":false},"author":2,"featured_media":791,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[51,48,52,11,49,50],"tags":[],"class_list":["post-1449","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-compilando-documentos-latex-con-diferente-tipografia","category-fonts-latex","category-fontspec","category-latex","category-pdflatex","category-xelatex"],"_links":{"self":[{"href":"https:\/\/linuxitos.com\/main\/wp-json\/wp\/v2\/posts\/1449","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/linuxitos.com\/main\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/linuxitos.com\/main\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/linuxitos.com\/main\/wp-json\/wp\/v2\/users\/2"}],"replies":[{"embeddable":true,"href":"https:\/\/linuxitos.com\/main\/wp-json\/wp\/v2\/comments?post=1449"}],"version-history":[{"count":1,"href":"https:\/\/linuxitos.com\/main\/wp-json\/wp\/v2\/posts\/1449\/revisions"}],"predecessor-version":[{"id":1888,"href":"https:\/\/linuxitos.com\/main\/wp-json\/wp\/v2\/posts\/1449\/revisions\/1888"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/linuxitos.com\/main\/wp-json\/wp\/v2\/media\/791"}],"wp:attachment":[{"href":"https:\/\/linuxitos.com\/main\/wp-json\/wp\/v2\/media?parent=1449"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/linuxitos.com\/main\/wp-json\/wp\/v2\/categories?post=1449"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/linuxitos.com\/main\/wp-json\/wp\/v2\/tags?post=1449"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}