I want to convert decimal number to integer in latex program with Visual Tex IDE. I found this function \pgfmathparse{ceil(2.7)} which requires installing the package pgfmath and pgfkeys. And after conversion I need to add two numbers. I tried using \numexpr (for integers) and \dimexpr (for decimals). But both functions simply concatenate those two values.   I don't know how to install packages in Visual Tex. Could someone suggest me how to install a package in Visual TeX. Or Could someone suggest me if there is any other function in calc package through which I can get ceil.  \documentclass{article}% \usepackage{calc}% \begin{document}% \newcommand{\addnum}[2] {%   \def\numa{#1}   \def\numb{#2}   \def\deca{#3}   \def\decb{#4}   Int Sum is \numexpr\numa+\numb\relax   Dec Sum is \dimexpr\deca+\decb\relax }%% \addnum{10}{20}{30.45}{55.63}% \end{document}%    It gives below output:     Int Sum is 10+20   Dec Sum is 30.45+55.63   This program works in MiKTeX. But I want it to work on Visual Tex IDE. I set the output mode as PDF.
121185
I am using VTEX (visual Tex). When I run this program, it shows a error message that is    ! Undefined control sequence. \convertto #1#2-&gt;\strip@pt \dimexpr                                      #2*65536/\number \dimexpr 1#1 ?   But this program runs in LaTeX successfully.  How can I solve this error?  \documentclass{article}  \makeatletter \def\convertto#1#2{\strip@pt\dimexpr #2*65536/\number\dimexpr 1#1} \makeatother  \begin{document} \newdimen\mylength \mylength=1in \convertto{cm}{\the\mylength}cm \end{document}      Output: 2.54 cm
25767
I want to render math formulas in my Java GUI application. I am looking for a library made for computer use, not web use, which can render TeX. I have already tried jLatexMath, but it's very slow when I use it in my application. If there are any other/better, could you point me in the right direction?
22589
Is there any tool that can convert Latex documents to HTML documents, so that all math is presented with ?  (Obviously, it is fairly easy to hack together a quick Perl script that is able to do a crude conversion, but I am interested in a bit more robust solutions — at least it should get all cross-references right automatically.)
123047
Is there any way to compile a .tex to pdf without having to install latex.  Is there any python package for this ?  Or even better is there any small stand-alone portable software for this.  Thanks a lot
51448
Solution found  Use of \usepackage{textcomp} allows for \textdegree macro, thanks to @Mico.    I use TeXmaker as an editor and I use Mendeley to generate my .bib file. One entry has a degree symbol in the title. Mendeley encodes into UTF-8 and I therefore use   \usepackage[utf8]{inputenc}   however the degree symbols do not seem to work. I have also tried including  \usepackage[T1]{fontenc}   as per some suggestions on the stackexchange and the error changes from OT1 to T1.  How can I get the degree symbol to work? Thanks.    Edit - MWE (which causes the error):  \documentclass[a4paper,12pt]{article}  % Text and Maths \usepackage[utf8]{inputenc}                                 % Input accented characters from keyboard input   %References and page interlinking  \usepackage[numbers,sort&amp;compress,super]{natbib}        % References - [numbers,sort&amp;compress,super] \bibliographystyle{unsrt}                                   % BibStyle - unsrt keeps 1,2,3 instead of 2,1,3 (?)  \usepackage[final]{hyperref}                                    % adds hyper links inside the generated pdf file \hypersetup{ colorlinks=true,                                                    % false: boxed links; true: colored links linkcolor=blue,                                                     % color of internal links citecolor=blue,                                                     % color of links to bibliography filecolor=magenta,                                              % color of file links urlcolor=blue                                                       % colour of url link } \usepackage{cleveref}                                               % Clever ref - loaded AFTER hyperref!  \begin{document}  test \citep{Zimmermann2009}  \bibliography{/Users/me/Documents/library.bib} \end{document}   .bib entry, error caused by degree symbol in title, I believe.  @article{Zimmermann2009, abstract = {An unusual variety of magnetic, magnetoelectric and ferrotoroidic properties was observed in the lithium-orthophosphates LiMPO(4) with M = Fe, Co, Ni by optical second harmonic generation. In spite of a largely similar magnetic and crystallographic structure the compounds exhibit pronounced differences in the topology of antiferromagnetic 180A degrees domains. In LiCoPO(4) the antiferromagnetic domains coexist with ferrotoroidic, i.e., magnetic vortex domains. For LiNiPO(4) it was shown that the weak ferrimagnetic moment of the LiMPO(4) compounds along the spin direction is rigidly coupled to the AFM order parameter so that the sign of the magnetoelectric effect is reversed by a magnetic field only. Further effects of a static magnetic field on the system are discussed.}, author = {Zimmermann, A. S. and {Van Aken}, B. B. and Schmid, H. and Rivera, J. P. and Li, J. and Vaknin, D. and Fiebig, M.}, doi = {10.1140/epjb/e2009-00223-3}, file = {:Users/matt/Documents/Mendeley Desktop/Zimmermann et al. - 2009 - Anisotropy of antiferromagnetic 180° domains in magnetoelectric LiMPO 4 (M = Fe, Co, Ni).pdf:pdf}, isbn = {1434-6028}, issn = {14346028}, journal = {European Physical Journal B}, number = {3}, pages = {355--360}, title = {{Anisotropy of antiferromagnetic 180° domains in magnetoelectric LiMPO 4 (M = Fe, Co, Ni)}}, volume = {71}, year = {2009} }
68691
Problem description  I have a LaTeX project that relies on both, \usepackage{pgfplots} and \usepackage{forest}.  Since upgrading to TeX Live 2016, the presence of the pgfplots package breaks compilation if the document contains a \begin{forest} environment that has the folder option enabled.  The error message suggests this is because pgfplots wants to use the FPU, but the folder option in the forest environment relies on a Mod operation that is not (yet) implemented in the FPU:     ! Package PGF Math Error: Sorry, the operation 'Mod' has not yet been implemented in the floating point unit.   Because I require both packages in my project, I would like to find a solution for this problem. I suspect that deactivating the FPU via \pgfkeys{/pgf/fpu=false} might be an option, but I'm not sure how I would apply this to the MWE below.  Minimal Working Example  Save the following MWE to main.tex and compile with pdflatex main. Then, uncomment the line marked TODO and try to recompile (which will fail).  \documentclass{standalone}  % NOTE: [edges] option required to enable 'folder' option in % 'forest' environment below. \usepackage[edges]{forest}%  % TODO: Uncomment the line below to break compilation %\usepackage{pgfplots}%  \begin{document}  \begin{forest}%   for tree={folder}% NOTE: Problem only occurs with this option enabled   [foo%     [bla]%     [moo]%   ]% \end{forest}%  \end{document}
47016
I am writing some documentation for a LaTeX package, in which I am going to be including some example LaTeX code.  What is the best way to typeset that code?  I know I could just use verbatim, but it would be nice to get syntax highlighting.  I realize that this is a duplicate of , in which the consensus was to use the  package.  The problem with listings is that it seems to only have a driver for TeX, not LaTeX.  For example, when I typeset something like this:  \begin{lstlisting}[language=TeX,                    keywordstyle=\bfseries,                    identifierstyle=\itseries,                    stringstyle=\ttfamily] \begin{minipage}{\hsize}   This is a test! \end{minipage} \end{lstlisting}   it results in something like this:     \begin{minipage}{\hsize}   &nbsp;&nbsp;This is a test!   \end{center}   which is obviously messed up.  Is there a LaTeX-specific driver for listings?  If not, is there another package that does syntax highlighting for LaTeX code?
55487
I want to create a pie chart in LaTeX. Do you know a package which manages that? I tried datatool which uses tikz as backend but seems to be unusable due to mysterious floating point errors.
16683
I want to install a package (specifically xlop). I'm using TeXLive on Ubuntu, and I don't really know my way around LaTeX.  Can apt-get install or something similar be used?
103740
I'm trying to visualize some data with TikZ datavisualization library. Given foo.tex  \documentclass{article} \usepackage{tikz} \usetikzlibrary{datavisualization}  \begin{document} \begin{tikzpicture}   \datavisualization [ scientific axes, visualize as scatter ] data [ read from file=foo.dat ]; \end{tikzpicture} \end{document}   and foo.dat:  x, y 1, 2 3, 4 5, 6   It fails with the following error (repeated multiple times):  ! Package PGF Math Error: Sorry, an internal routine of the floating point unit got an ill-formatted floating point number `'. The unreadable part was near ''..  See the PGF Math package documentation for explanation. Type  H &lt;return&gt;  for immediate help.  ...                                                l.7 ... scatter ] data [ read from file=foo.dat ];   If I'd rather include data from foo.dat inline the document compiles normally.  What am I missing and how can I fix the problem?  I'm running TeXLive 2014 on Windows 7. All files use Unix line ending.  EDIT: I've removed all commas in my data file and explicitly set separator to \space, now it works.  One more quertion: TikZ documentation says:     /pgf/data/separator=&lt;character&gt; (no default, initially ,)   What does this mean? What is the difference between initial value and default value?
17855
I'm trying to get siunitx working. For some reason I keep getting this error:  ! Missing = inserted for \ifnum. &lt;to be read again&gt;                     - l.3 \begin           {document}^^M   I have tried a minimal document to make sure it is not some kind of compatibility issue. And I get that same error in the most minimal document possible.  I'm using pdfLaTeX to compile, and have tried both from TeXWorks and from bash. I'm using TeXLive, if that matters. I have also tried reinstalling siunitx, l3packages, and l3kernel. There was an issue with l3kernel before this, due to an apparently old version. But all three packages are now up to date. I've also reinstalled expl3 while trying to debug the original issue.  My minimal document is:  \documentclass{article} \usepackage{siunitx} \begin{document} \end{document}   The output I get is:  This is pdfTeX, Version 3.14159265-2.6-1.40.16 (TeX Live 2015/Debian) (preloaded format=pdflatex) restricted \write18 enabled. entering extended mode (./untitled-2.tex LaTeX2e &lt;2016/02/01&gt; Babel &lt;3.9q&gt; and hyphenation patterns for 81 language(s) loaded. (/usr/share/texlive/texmf-dist/tex/latex/base/article.cls Document Class: article 2014/09/29 v1.4h Standard LaTeX document class (/usr/share/texlive/texmf-dist/tex/latex/base/size10.clo)) (/home/&lt;name&gt;/texmf/tex/latex/siunitx/siunitx.sty (/home/&lt;name&gt;/texmf/tex/latex/l3kernel/expl3.sty (/home/&lt;name&gt;/texmf/tex/latex/l3kernel/expl3-code.tex) (/home/&lt;name&gt;/texmf/tex/latex/l3kernel/l3pdfmode.def)) (/home/&lt;name&gt;/texmf/tex/latex/l3packages/xparse/xparse.sty) (/usr/share/texlive/texmf-dist/tex/latex/amsmath/amstext.sty (/usr/share/texlive/texmf-dist/tex/latex/amsmath/amsgen.sty)) (/usr/share/texlive/texmf-dist/tex/latex/tools/array.sty) (/home/&lt;name&gt;/texmf/tex/latex/l3packages/l3keys2e/l3keys2e.sty) (/usr/share/texlive/texmf-dist/tex/latex/beamer/translator/translator.sty (/usr/share/texlive/texmf-dist/tex/latex/graphics/keyval.sty) (/usr/share/texlive/texmf-dist/tex/latex/beamer/translator/translator-language- mappings.tex))) ! Missing = inserted for \ifnum. &lt;to be read again&gt;                    - l.3 \begin          {document}^^M ?   Does anyone have any idea what might be going wrong here?
100769
I want to typeset some LaTeX source code by listings. I've tried this:  \documentclass{article} \usepackage{listings} \usepackage{xcolor} \lstset{     delim = [s][\ttfamily\color{orange}]{$}{$} } \begin{document} \begin{lstlisting} \documentclass{article} \usepackage{amsmath} \begin{document} $E = mc^2$ \end{document} \end{lstlisting} \end{document}     The equation turns orange. However, the two dollar signs are also highlighted as orange. If I just want contents in the two dollar signs turns orange, what should I do?
71984
The following image illustrates what am looking for:    Essentially I want the numbering to occur as shown above but using the multicol and enumitem package. But when I try it by using the following code:  \documentclass{article} \usepackage{amsmath,amssymb} \usepackage{enumitem,multicol} \begin{document} \begin{enumerate} \item Evaluate each of the following if $x$ is a non-zero real number.     \begin{multicols}{2}     \begin{enumerate}[itemsep=1cm]% The item sep is my choice here.     \item $\dfrac{|x|}{x}$     \item $\dfrac{x}{|x|}$     \item $\dfrac{|-x|}{-x}$     \item $|x|-|-x|$     \end{enumerate}      \end{multicols} \end{enumerate} \end{document}   I get:    Essentially, I want the (b) to be where the (c) is. I know this has been done but I can't seem to find it.
16405
In LaTeX2e,how can I sum two values and assign them to other variable?  I want to compute something like:   var=\textwidth - 1cm    And if both were constants:   var=1+1
109820
Can anyone help please? I need to know how to make the sum of value S(n) = 0+1+2+3+4...+(n-1)+n (example: 0+1+2+3 = 6 , 0+1+2+3+4+5+6+7 = 28 and so on) on Latex
97583
I know the calc package can perform infix-notation arithmetic in LaTeX... but I want more!  I'd like to perform (not necessarily infix-notation) linear-algebra operations  such as scalar multiplication, matrix addition and product in LaTeX, and then print the result in an array or in some matrix environment from amsmath.  Why would I want to do that in LaTeX directly? Why do I not simply use some linear-algebra software, such as Matlab, Mathematica, etc.?  Well, suppose I want to walk my readers through a detailed linear-algebra calculation with many numerical examples. Of course, I could perform all the steps manually first and then hardcode the result of each step in my input file. However, this approach   is prone to errors (LaTeX' arrays are not very user-friendly to typeset), lacks maintainability (I may decide to change the data in my example, which means I have to modify everything that follows).   Hence my question: Is there a way of easily performing linear-algebra operations in LaTeX?    Ideally, I would like to   mimick Matlab's syntax for defining matrices (using commas as column separators and semicolons as end-of-row characters), performing operations on them, extracting sub matrices, etc.. The syntax could be something like the following:  \let\A{1,2,3;4,5,6} \let\b{1;0;0} \let\c\matrixprod{\A,\b} \let\d\submatrix{\c}{(2,1)}  have a command that typesets a "matrix object" in an array or matrix environment, e.g.  \typesetmatrix[bmatrix]{A}  be able to perform operations on matrices of arbitrary--albeit relatively small--dimensions (edit: not just 2x2 and 3x3 as in the calculator package).   Is that currently possible with some package? If not, I'm considering rolling up my sleeves and implementing something, but this would probably prove quite difficult, and I would like to avoid reinventing the wheel :)    Edit about other operations that would be useful:   diag (extraction of the diagonal of a square matrix) trace  determinant norm(s) condition number(s) inverse   Even more advanced matrix operations that would be awesome, but probably tough to implement:   eigenvalues &amp; eigenvectors, QR, least squares etc. SVD, other common matrix factorisations.
90111
I want to create a table from a CSV file in LaTex. I am able to do it with numbers  but creating table for strings such as abbrevions does not work. What is the problem?  MVE  This example fires error &quot;Package PGF Math Error: Could not parse input '...' as a floating point number, sorry.&quot; \documentclass{standalone} \usepackage{pgfplotstable,filecontents} \pgfplotsset{compat=1.9}% supress warning  \begin{filecontents*}{test.csv} Abbreviation, Description ACG, Azeri Chirag Guneshli bcm, Billion cubic meters BTC, Baku Tbilisi Ceyhan CIA, Central Intelligence Agency Btu, British thermal unit CAC, Central Asia Center EU, European Union LNG, Liquified Natural Gas NATO, North Atlantic Treaty Organization OMV, Österreichische Mineralölverwaltung \end{filecontents*}  \begin{document} \pgfplotstabletypeset[col sep=comma, columns={Abbreviation,Description}]{test.csv} \end{document}