LaTeX https://yyhh.org/notebook/latex en High Resolution Image for Pdflatex https://yyhh.org/blog/2012/08/high-resolution-image-pdflatex <span>High Resolution Image for Pdflatex</span> <span><a title="View user profile." href="/user/yunyao" lang="" about="/user/yunyao" typeof="schema:Person" property="schema:name" datatype="">yunyao</a></span> <span>Thu, 08/09/2012 - 21:31</span> <div class="field field--name-field-notebook field--type-entity-reference field--label-hidden field__items"> <div class="field__item"><div about="/notebook/latex" id="taxonomy-term-18" class="taxonomy-term vocabulary-notebook"> <a href="/notebook/latex"> <div class="field field--name-name field--type-string field--label-hidden field__item">LaTeX</div> </a> <div class="content"> </div> </div> </div> </div> <div class="field field--name-body field--type-text-with-summary field--label-hidden field__item"><div class="tex2jax_process"><p>While preparing the camera-ready version for our CIKM demo, my colleagues and I found that the screenshot included in our paper appeared to be fairly blurry in the pdf version, even though the original .jpg file looks fine.</p> <p>I searched online to try to find the solutions. After a few trials and errors, adding the following two lines into the beginning of the latex files (before <span style="font-family: courier new,courier;">\begin{document}</span>) did the trick.</p> <p><span style="font-family: courier new,courier;">\pdfpxdimen=1in</span></p> <p><span style="font-family: courier new,courier;">\divide\pdfpxdimen by 300</span></p> <p>The above solution basically forces the pdf file generated at a higher resolution (in this case, 300 dpi) so that everything, including the images, looks better.</p> <p>The original solution comes from <a href="http://stackoverflow.com/questions/5041492/latex-how-to-set-the-pdf-dpi-when-using-images">here</a>.</p> </div></div> <section> <h2>Add new comment</h2> <drupal-render-placeholder callback="comment.lazy_builders:renderForm" arguments="0=node&amp;1=159&amp;2=comment_node_blog&amp;3=comment_node_blog" token="nM3XPeqbDkDux9hSpXG2ucj0M5CfCRxLAt5nwSLxEBA"></drupal-render-placeholder> </section> <strong class="node_view"></strong> Thu, 09 Aug 2012 20:31:02 +0000 yunyao 159 at https://yyhh.org Display LaTeX Math on Drupal with MathJax https://yyhh.org/blog/2011/07/display-latex-math-drupal-mathjax <span>Display LaTeX Math on Drupal with MathJax</span> <span><a title="View user profile." href="/user/huahai" lang="" about="/user/huahai" typeof="schema:Person" property="schema:name" datatype="">Huahai</a></span> <span>Mon, 07/18/2011 - 21:19</span> <div class="field field--name-field-notebook field--type-entity-reference field--label-hidden field__items"> <div class="field__item"><div about="/notebook/software" id="taxonomy-term-24" class="taxonomy-term vocabulary-notebook"> <a href="/notebook/software"> <div class="field field--name-name field--type-string field--label-hidden field__item">Software</div> </a> <div class="content"> </div> </div> </div> <div class="field__item"><div about="/notebook/math" id="taxonomy-term-25" class="taxonomy-term vocabulary-notebook"> <a href="/notebook/math"> <div class="field field--name-name field--type-string field--label-hidden field__item">Math</div> </a> <div class="content"> </div> </div> </div> <div class="field__item"><div about="/notebook/latex" id="taxonomy-term-18" class="taxonomy-term vocabulary-notebook"> <a href="/notebook/latex"> <div class="field field--name-name field--type-string field--label-hidden field__item">LaTeX</div> </a> <div class="content"> </div> </div> </div> </div> <div class="field field--name-body field--type-text-with-summary field--label-hidden field__item"><div class="tex2jax_process"><p><a href="http://www.mathjax.org/">MathJax</a> seems to be the emerging standard for displaying math on the Web at this moment. It is supported by American Mathematical Society and American Physical Society, and has already been adopted by major math related discussion venues such as Physics Forums and Stack Exchange. MathJax displays math using CSS and Web fonts instead of images, so the quality is very high and is resize-friendly. Below are some examples:</p> <p>Inline math: the geometric product $\boldsymbol{uv}$ of vectors $\boldsymbol{u}$ and $\boldsymbol{v}$ is $\boldsymbol{u}\cdot\boldsymbol{v} + \boldsymbol{u}\wedge\boldsymbol{v}$, where $\boldsymbol{u}\cdot\boldsymbol{v}$ is the inner product and $\boldsymbol{u}\wedge\boldsymbol{v}$ is the outer product.</p> <p>Display math: the rotation of vector $\boldsymbol{u}$ by angle $\theta$ in plane $\boldsymbol{i}$ is $$R_{\boldsymbol{i}\theta}(\boldsymbol{u}) = e^{-\boldsymbol{i}\theta/2}\boldsymbol{u}e^{\boldsymbol{i}\theta/2}$$</p> <p>Some random expressions copied directly from the <a href="ftp://ftp.ams.org/ams/doc/amsmath/short-math-guide.pdf">short math guide for latex</a>: $$\begin{pmatrix}<br /> \alpha&amp; \beta^{*}\\<br /> \gamma^{*}&amp; \delta<br /> \end{pmatrix}$$ $$\frac{{\displaystyle\sum_{n > 0} z^n}}<br /> {{\displaystyle\prod_{1\leq k\leq n} (1-q^k)}}$$ $$2^k-\binom{k}{1}2^{k-1}+\binom{k}{2}2^{k-2}$$</p> <p> Finally, an obligatory integral: $$\int \!\!\! \int_D f(x,y)\,dx\,dy$$</p> <p> The math input could be either LaTeX or MathML, embedded in regular HTML text. MathJax is a Javascript library, so it works at the browser's side. After the HTML is rendered, the MathJax code scans the output, find pieces of text marked by user defined math delimiters (more on that later), and replaces them by typesetted math. The math may take a couple of seconds to show up depending on the browser and the network speed. The MathJax library can be fetched from content delivery network (CDN), so it is fairly simple to add MathJax to any Web site. Here is how I did it for this Drupal 6 site.</p> <p>There is a <a href="http://drupal.org/project/mathjax">Drupal module for MathJax</a> that loads MathJax from CDN for every Drupal page. The module also allows Drupal pages to be selectively MathJax enabled according to some URL patterns. By default, all pages are MathJax enabled except for these paths: <em>admin*, node/add/*, node/*/edit</em>, which is reasonable. However, path based selective enabling is still a bit crude, because most pages would not contain math, so MathJax simply slows down page rendering for most pages without any benefit. It would be great if the selection can also be tag based, so only the posts tagged as "math" and maybe the front page need to incur such slow down. Another useful feature would be to allow MathJax configuration within the module. The default configuration of MathJax is not very reasonable for Drupal, <span style="text-decoration: line-through">so users have to add the configurations manually to the page template at this time</span>. <b>Updated Aug.25, 2011:</b> Julou, the author of the module, has responded to my feature request and added a text area for MathJax configuration in the development version of the module. I have tested it and it works, so the steps below are no longer necessary.</p> <p>One of the most annoying default settings of MathJax is the definition of math delimiters.&nbsp; For inline math, the default delimiters are ( ) and \$ \$, and for math on its own line, the default delimiters are [ ] and \$\$ \$\$.&nbsp; Because ( ) and [ ] are so commonly used in regular non-math text, this default setting is unreasonable for Drupal, as MathJax will remove the parentheses and change the text font to be math like for a Drupal page. \$ \$ is okay, but to show the regular dollar sign properly, it needs to be escaped by reverse backslash, which is not the default setting of MathJax. Also, the default message display of MathJax is a bit too much for my taste, and I minimized them a bit. Here is the MathJax configuration I added to <em>page.tpl.php</em> for my theme:</p> <div class="codeblock" style="background-color:#ffffff"><span style="background-color: #ffffff"><font color="#007080">&lt;</font></span><span style="background-color: #ffffff"><font color="#1f3f81"><b>script</b></font></span><span style="background-color: #ffffff"><font color="#007080">&nbsp;</font></span><span style="background-color: #ffffff"><font color="#912f11"><b>type</b></font></span><span style="background-color: #ffffff"><font color="#007080">=</font></span><span style="background-color: #ffffff"><font color="#077807">&quot;text/x-mathjax-config&quot;</font></span><span style="background-color: #ffffff"><font color="#007080">&gt;</font></span><span style="background-color: #ffffff"><font color="#912f11">&nbsp;</font></span><br /> <span style="background-color: #ffffff"><font color="#912f11">&nbsp;&nbsp;MathJax.Hub.Config</font></span>(<span style="background-color: #ffffff"><font color="#007080">{</font></span><span style="background-color: #ffffff"><font color="#912f11">&nbsp;</font></span><br /> <span style="background-color: #ffffff"><font color="#912f11">&nbsp;&nbsp;&nbsp;&nbsp;showProcessingMessages: </font></span><span style="background-color: #ffffff"><font color="#077807">false</font></span><span style="background-color: #ffffff"><font color="#912f11">, </font></span><br /> <span style="background-color: #ffffff"><font color="#912f11">&nbsp;&nbsp;&nbsp;&nbsp;messageStyle: </font></span><span style="background-color: #ffffff"><font color="#077807">&quot;simple&quot;</font></span><span style="background-color: #ffffff"><font color="#912f11">,</font></span><br /> <span style="background-color: #ffffff"><font color="#912f11">&nbsp;&nbsp;&nbsp;&nbsp;jax: </font></span><span style="background-color: #ffffff"><font color="#007080">[</font></span><span style="background-color: #ffffff"><font color="#077807">&quot;input/TeX&quot;</font></span><span style="background-color: #ffffff"><font color="#912f11">, </font></span><span style="background-color: #ffffff"><font color="#077807">&quot;output/HTML-CSS&quot;</font></span><span style="background-color: #ffffff"><font color="#007080">]</font></span><span style="background-color: #ffffff"><font color="#912f11">, </font></span><br /> <span style="background-color: #ffffff"><font color="#912f11">&nbsp;&nbsp;&nbsp;&nbsp;extensions: </font></span><span style="background-color: #ffffff"><font color="#007080">[</font></span><span style="background-color: #ffffff"><font color="#077807">&quot;tex2jax.js&quot;</font></span><span style="background-color: #ffffff"><font color="#912f11">,</font></span><span style="background-color: #ffffff"><font color="#077807">&quot;MathMenu.js&quot;</font></span><span style="background-color: #ffffff"><font color="#912f11">,</font></span><span style="background-color: #ffffff"><font color="#077807">&quot;MathZoom.js&quot;</font></span><span style="background-color: #ffffff"><font color="#007080">]</font></span><span style="background-color: #ffffff"><font color="#912f11">, </font></span><br /> <span style="background-color: #ffffff"><font color="#912f11">&nbsp;&nbsp;&nbsp;&nbsp;TeX: </font></span><span style="background-color: #ffffff"><font color="#007080">{</font></span><br /> <span style="background-color: #ffffff"><font color="#912f11">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;extensions: </font></span><span style="background-color: #ffffff"><font color="#007080">[</font></span><span style="background-color: #ffffff"><font color="#077807">&quot;AMSmath.js&quot;</font></span><span style="background-color: #ffffff"><font color="#912f11">,</font></span><span style="background-color: #ffffff"><font color="#077807">&quot;AMSsymbols.js&quot;</font></span><span style="background-color: #ffffff"><font color="#912f11">,</font></span><span style="background-color: #ffffff"><font color="#077807">&quot;noErrors.js&quot;</font></span><span style="background-color: #ffffff"><font color="#912f11">,</font></span><span style="background-color: #ffffff"><font color="#077807">&quot;noUndefined.js&quot;</font></span><span style="background-color: #ffffff"><font color="#007080">]</font></span><br /> <span style="background-color: #ffffff"><font color="#912f11">&nbsp;&nbsp;&nbsp;&nbsp;</font></span><span style="background-color: #ffffff"><font color="#007080">}</font></span><span style="background-color: #ffffff"><font color="#912f11">, </font></span><br /> <span style="background-color: #ffffff"><font color="#912f11">&nbsp;&nbsp;&nbsp;&nbsp;</font></span><span style="background-color: #ffffff"><font color="#077807">&quot;HTML-CSS&quot;</font></span><span style="background-color: #ffffff"><font color="#912f11">: </font></span><span style="background-color: #ffffff"><font color="#007080">{</font></span><span style="background-color: #ffffff"><font color="#912f11">&nbsp;availableFonts: </font></span><span style="background-color: #ffffff"><font color="#007080">[</font></span><span style="background-color: #ffffff"><font color="#077807">&quot;TeX&quot;</font></span><span style="background-color: #ffffff"><font color="#007080">]</font></span><span style="background-color: #ffffff"><font color="#912f11">&nbsp;</font></span><span style="background-color: #ffffff"><font color="#007080">}</font></span><span style="background-color: #ffffff"><font color="#912f11">,</font></span><br /> <span style="background-color: #ffffff"><font color="#912f11">&nbsp;&nbsp;&nbsp;&nbsp;tex2jax: </font></span><span style="background-color: #ffffff"><font color="#007080">{</font></span><br /> <span style="background-color: #ffffff"><font color="#912f11">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;inlineMath: </font></span><span style="background-color: #ffffff"><font color="#007080">[</font></span><span style="background-color: #ffffff"><font color="#912f11">&nbsp;</font></span><span style="background-color: #ffffff"><font color="#007080">[</font></span><span style="background-color: #ffffff"><font color="#077807">'$'</font></span><span style="background-color: #ffffff"><font color="#912f11">,</font></span><span style="background-color: #ffffff"><font color="#077807">'$'</font></span><span style="background-color: #ffffff"><font color="#007080">]</font></span><span style="background-color: #ffffff"><font color="#912f11">&nbsp;</font></span><span style="background-color: #ffffff"><font color="#007080">]</font></span><span style="background-color: #ffffff"><font color="#912f11">,</font></span><br /> <span style="background-color: #ffffff"><font color="#912f11">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;displayMath: </font></span><span style="background-color: #ffffff"><font color="#007080">[</font></span><span style="background-color: #ffffff"><font color="#912f11">&nbsp;</font></span><span style="background-color: #ffffff"><font color="#007080">[</font></span><span style="background-color: #ffffff"><font color="#077807">'$$'</font></span><span style="background-color: #ffffff"><font color="#912f11">,</font></span><span style="background-color: #ffffff"><font color="#077807">'$$'</font></span><span style="background-color: #ffffff"><font color="#007080">]</font></span><span style="background-color: #ffffff"><font color="#912f11">&nbsp;</font></span><span style="background-color: #ffffff"><font color="#007080">]</font></span><span style="background-color: #ffffff"><font color="#912f11">,</font></span><br /> <span style="background-color: #ffffff"><font color="#912f11">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;processEscapes: </font></span><span style="background-color: #ffffff"><font color="#077807">true</font></span><br /> <span style="background-color: #ffffff"><font color="#912f11">&nbsp;&nbsp;&nbsp;&nbsp;</font></span><span style="background-color: #ffffff"><font color="#007080">}</font></span><br /> <span style="background-color: #ffffff"><font color="#912f11">&nbsp;&nbsp;</font></span><span style="background-color: #ffffff"><font color="#007080">}</font></span>)<span style="background-color: #ffffff"><font color="#912f11">;</font></span><br /> <span style="background-color: #ffffff"><font color="#007080">&lt;/</font></span><span style="background-color: #ffffff"><font color="#1f3f81"><b>script</b></font></span><span style="background-color: #ffffff"><font color="#007080">&gt;</font></span> </div> <p><strong>Important</strong>: this configuration must be inserted <em>before</em> the line that loads MathJax itself. Otherwise, it has no effect. In the zen template I use, I inserted it before this line:</p> <p><code><br /> <?php print $scripts ?></code></p> <p>If your site has the <a href="http://drupal.org/project/print">print module</a> installed, you need to copy the file <em>print.tpl.php </em>to your theme templates directory, and add the same as above so the print friendly version also show math properly.&nbsp;</p> <p>For more MathJax configuration options, please refer to the <a href="http://www.mathjax.org/docs/1.1/configuration.html">MathJax documentation</a></p> </div></div> <ul class="links inline"><li class="comment-add"><a href="/blog/2011/07/display-latex-math-drupal-mathjax#comment-form" title="Share your thoughts and opinions." hreflang="und">Add new comment</a></li></ul><section> <a id="comment-1"></a> <article data-comment-user-id="0" class="js-comment comment"> <mark class="hidden" data-comment-timestamp="1311225240"></mark> <footer class="attribution"> <article typeof="schema:Person" about="/user/0"> <div class="field field--name-user-picture field--type-image field--label-hidden field__item"> <img src="/sites/default/files/styles/thumbnail/public/default_images/default-user-image.png?itok=hWWOuuKw" width="100" height="100" alt="Profile picture for user Nik" title="Anonymous user" typeof="foaf:Image" /> </div> </article> <div class="comment-submitted"> <p class="commenter-name"> <span lang="" typeof="schema:Person" property="schema:name" datatype="">Anonymous</span> </p> <p class="comment-time"> Thu, 07/21/2011 - 06:14 </p> </div> </footer> <div class="comment-text"> <div class="comment-arrow"></div> <h3><a href="/comment/1#comment-1" class="permalink" rel="bookmark" hreflang="en">Does this work for comments?</a></h3> <div class="content"> <div class="field field--name-comment-body field--type-text-long field--label-hidden field__item"><div class="tex2jax_process"><p>Does this work for comments? The square root of 4 equals 2: $\sqrt{4} = 2$</p> </div></div> <drupal-render-placeholder callback="comment.lazy_builders:renderLinks" arguments="0=1&amp;1=default&amp;2=en&amp;3=" token="f2l6E3exSxFDxa_4V_oxZaC4lhbUjGxcEMIVDS7iiXI"></drupal-render-placeholder> </div> </div> </article> <a id="comment-18"></a> <article data-comment-user-id="0" class="js-comment comment"> <mark class="hidden" data-comment-timestamp="1312894896"></mark> <footer class="attribution"> <article typeof="schema:Person" about="/user/0"> <div class="field field--name-user-picture field--type-image field--label-hidden field__item"> <img src="/sites/default/files/styles/thumbnail/public/default_images/default-user-image.png?itok=hWWOuuKw" width="100" height="100" alt="Profile picture for user Nik" title="Anonymous user" typeof="foaf:Image" /> </div> </article> <div class="comment-submitted"> <p class="commenter-name"> <span lang="" typeof="schema:Person" property="schema:name" datatype="">Anonymous</span> </p> <p class="comment-time"> Tue, 08/09/2011 - 14:01 </p> </div> </footer> <div class="comment-text"> <div class="comment-arrow"></div> <h3><a href="/comment/18#comment-18" class="permalink" rel="bookmark" hreflang="en">sample tex file for testing </a></h3> <div class="content"> <div class="field field--name-comment-body field--type-text-long field--label-hidden field__item"><div class="tex2jax_process"><p>At each time $\tau$, the test uses as the conditional inference frame<br /> the set $\mathcal{F}(H_\tau)$ of all tables with the same three two-way<br /> marginal tables as the obtained table $H_\tau$.</p> </div></div> <drupal-render-placeholder callback="comment.lazy_builders:renderLinks" arguments="0=18&amp;1=default&amp;2=en&amp;3=" token="jVhirhDd91eC6XV9WsQl4PLehFgKsOgX9j8i4FgvScs"></drupal-render-placeholder> </div> </div> </article> <a id="comment-26"></a> <article data-comment-user-id="0" class="js-comment comment"> <mark class="hidden" data-comment-timestamp="1314267707"></mark> <footer class="attribution"> <article typeof="schema:Person" about="/user/0"> <div class="field field--name-user-picture field--type-image field--label-hidden field__item"> <img src="/sites/default/files/styles/thumbnail/public/default_images/default-user-image.png?itok=hWWOuuKw" width="100" height="100" alt="Profile picture for user Nik" title="Anonymous user" typeof="foaf:Image" /> </div> </article> <div class="comment-submitted"> <p class="commenter-name"> <span lang="" typeof="schema:Person" property="schema:name" datatype="">julou</span> </p> <p class="comment-time"> Thu, 08/25/2011 - 11:21 </p> </div> </footer> <div class="comment-text"> <div class="comment-arrow"></div> <h3><a href="/comment/26#comment-26" class="permalink" rel="bookmark" hreflang="en">Custom configuration</a></h3> <div class="content"> <div class="field field--name-comment-body field--type-text-long field--label-hidden field__item"><div class="tex2jax_process"><p>I just implemented custom configuration in the current dev version… so you can set it in the admin section.<br /> Enjoy!</p> </div></div> <drupal-render-placeholder callback="comment.lazy_builders:renderLinks" arguments="0=26&amp;1=default&amp;2=en&amp;3=" token="EmVUnj3z2YTfN-OcyU4E9A4MBsv14xGvLjouZVdNTnc"></drupal-render-placeholder> </div> </div> </article> <div class="indented"><a id="comment-27"></a> <article data-comment-user-id="1" class="js-comment comment"> <mark class="hidden" data-comment-timestamp="1314300840"></mark> <footer class="attribution"> <article typeof="schema:Person" about="/user/huahai"> <div class="field field--name-user-picture field--type-image field--label-hidden field__item"> <img src="/sites/default/files/styles/thumbnail/public/pictures/2017-11/huahai.jpg?itok=ZwjJWYAc" width="88" height="100" alt="Profile picture for user Huahai" typeof="foaf:Image" /> </div> </article> <div class="comment-submitted"> <p class="commenter-name"> <a title="View user profile." href="/user/huahai" lang="" about="/user/huahai" typeof="schema:Person" property="schema:name" datatype="">Huahai</a> </p> <p class="comment-time"> Thu, 08/25/2011 - 20:34 </p> </div> <p class="visually-hidden">In reply to <a href="/comment/26#comment-26" class="permalink" rel="bookmark" hreflang="en">Custom configuration</a> by <span lang="" typeof="schema:Person" property="schema:name" datatype="">julou</span></p> </footer> <div class="comment-text"> <div class="comment-arrow"></div> <h3><a href="/comment/27#comment-27" class="permalink" rel="bookmark" hreflang="en">It works</a></h3> <div class="content"> <div class="field field--name-comment-body field--type-text-long field--label-hidden field__item"><div class="tex2jax_process"><p>Hi Julou, I have removed my template changes and am using the current version of the module. As we can see, it works. Thank you very much <img src="/sites/all/libraries/tinymce/jscripts/tiny_mce/plugins/emotions/img/smiley-smile.gif" alt="Smile" title="Smile" border="0"></p> </div></div> <drupal-render-placeholder callback="comment.lazy_builders:renderLinks" arguments="0=27&amp;1=default&amp;2=en&amp;3=" token="otqyAq8w5Pd0NDlWnsqJTdnPUTbkZ3076qwkZ7AXGc8"></drupal-render-placeholder> </div> </div> </article> </div> <h2>Add new comment</h2> <drupal-render-placeholder callback="comment.lazy_builders:renderForm" arguments="0=node&amp;1=135&amp;2=comment_node_blog&amp;3=comment_node_blog" token="HoqMxjelTon9qsN6_9KIEFcn_IjO-NtziRBWWApkl3s"></drupal-render-placeholder> </section> <strong class="node_view"></strong> Mon, 18 Jul 2011 20:19:58 +0000 Huahai 135 at https://yyhh.org Reverse/Forward Search with Latex-Suite in Vim https://yyhh.org/blog/2007/11/reverse-forward-search-latex-suite-vim <span>Reverse/Forward Search with Latex-Suite in Vim</span> <span><a title="View user profile." href="/user/huahai" lang="" about="/user/huahai" typeof="schema:Person" property="schema:name" datatype="">Huahai</a></span> <span>Thu, 11/22/2007 - 17:19</span> <div class="field field--name-field-notebook field--type-entity-reference field--label-hidden field__items"> <div class="field__item"><div about="/notebook/vim" id="taxonomy-term-17" class="taxonomy-term vocabulary-notebook"> <a href="/notebook/vim"> <div class="field field--name-name field--type-string field--label-hidden field__item">Vim</div> </a> <div class="content"> </div> </div> </div> <div class="field__item"><div about="/notebook/linux" id="taxonomy-term-16" class="taxonomy-term vocabulary-notebook"> <a href="/notebook/linux"> <div class="field field--name-name field--type-string field--label-hidden field__item">Linux</div> </a> <div class="content"> </div> </div> </div> <div class="field__item"><div about="/notebook/latex" id="taxonomy-term-18" class="taxonomy-term vocabulary-notebook"> <a href="/notebook/latex"> <div class="field field--name-name field--type-string field--label-hidden field__item">LaTeX</div> </a> <div class="content"> </div> </div> </div> </div> <div class="field field--name-body field--type-text-with-summary field--label-hidden field__item"><div class="tex2jax_process"><p>When editing a long Latex document, it is beneficial to be able to point from current location in DVI back to Tex, and vice visa. This is what called reverse/forward search between DVI and Latex. With <a href="http://vim-latex.sourceforge.net/">Latex-Suite in Vim</a>, this functionality is already implemented, and there's no need to specify "\usepackage scrltx" in the Tex file. However, it's not fully configured by default. Forward search with "\ls" works, but inverse search by "Ctrl-Left click" in xdiv is not enabled. To turn it on, edit <i>~/.vim/ftplugin/tex/texrc</i>, change the line "TexLet g:Tex_UseEditorSettingInDVIViewer = 0" to "TexLet g:Tex_UseEditorSettingInDVIViewer = 1".</p> </div></div> <section> <h2>Add new comment</h2> <drupal-render-placeholder callback="comment.lazy_builders:renderForm" arguments="0=node&amp;1=60&amp;2=comment_node_blog&amp;3=comment_node_blog" token="rI8aai8OwEs1om8PIDJPJrPgdN5g2XSdPSAdvzWJxSI"></drupal-render-placeholder> </section> <strong class="node_view"></strong> Thu, 22 Nov 2007 17:19:37 +0000 Huahai 60 at https://yyhh.org