I'm trying to type \digamma. In latex, this character is supported  in \usepackage{amssymb}. In Matlab, I can set the interpreter to be Latex as follows   Figure1=figure(1) set(Figure1,'defaulttextinterpreter','latex');    but the aforementioned character is not supported. Is there a solution for this problem?
123463
When using LaTeX as the interpreter to typeset labels in MATLAB it would be great to be able to include packages to customize appearance. Is this possible?  As of now I know no method to create non italic greek letters in the legends.
20108
I am writing a book using times font. It has MATLAB codes. I have used the listing package for generating matlab code in latex. For the remaining text I am using times package. But while trying to publish the book I am getting the error helvetica package not embedded. I do not want to use helvetica font as the publisher has a problem with that font. Can someone explain what is font embedding and how can I remove the Helvetica font.
22578
Browsing through a copy of Counterexamples in Analysis (Gelbaum  &amp; Olmsted), I'm quite enjoying the typeface used for 'script' letters (see links to examples below); visually it's somewhere between what I'd now call calligraphic and fraktur, and semantically it's used where now we'd use mathcal, mathfrak or mathbb.  I was therefore procrastinatiously looking for a LaTeX-usable font to include these characters, but couldn't seem to find any. I'm certain they're not unique to this text or publisher, so figured my lack of success was probably more to do with searching with the wrong keywords. If anyone has any ideas I'd be grateful.
23567
Is it impossible to insert the mathematical symbol \times when using the arabi package?  After compiling  A\times B   it becomes AB and the sign \times disappears   See the example below.  \documentclass{article} \usepackage[utf8]{inputenc} \usepackage[LFE,LAE,OT1]{fontenc} \usepackage[farsi,english,arabic]{babel}  \begin{document} \selectlanguage{farsi}  سلام    $A\times B$ \end{document}
49059
As far as I understand there are two ways to display LaTeX on the web:   The MathJax JavaScript library, which allows you to embed LaTeX directly within HTML tags, but such LaTeX is converted by MathJax to MathML, an XML format which browsers can understand, unlike LaTeX. The disadvantages of this approach is that MathJax support for LaTeX is limited (and perhaps it would be useful if someone could outline some of its most important limitations). Use a command-line tool to convert LaTeX to MathML (I've found , but wonder if there is a command line tool I can install on Linux or Windows or better on both). Apparently, this solution has fewer limitations. I would like to know what the best tools to use for this conversion are, and whether MathML has any limitations as far as the following go:    the MathML language's ability to encode everything that can be encoded with LaTeX syntax, and  any possible limitations due to incomplete browser support for MathML (judging from , Chrome support seems to be severaly limited compared to Firefox, but this also means that if a user of my site is not using Firefox, then they will not be able to see math properly, which is a real drawback!).    Furthermore, if there are any other approaches to displaying math on the web, without resorting to images and PDF files, then I would like to know about them, but I think the alternatives I mentioned are most likely the two and only most viable ones.
56612
I am using a sans font for my figures. Hence I also want the tick labels of the pgfplots to be in sans. The tick labels, however, are set in a math enviroment. So changing the text font does not change anythings here. I have seen a  here on tex.SE. The problem is that get many error messages like that:  ! LaTeX Error: Symbol font `um_fam1' not defined.  See the LaTeX manual or LaTeX Companion for explanation. Type  H &lt;return&gt;  for immediate help.  ...                                                l.23        \end{axis}   I think the problem is that a non-math font is used with unicode-math, which is not the intended use case for unicode-math. I really tried many ways to change the math font to sans, see for example , but the essence is that a sans math font is not possible.  Since it is not possible to use a sans math font, maybe it is possible to change the pgfplots to use not an mathematical enviroment. I'm asking here, if it is possible to patch pgfplots to use an non mathematical enviroment for the tick labels? I understand this enviromnent is needed for fractions or some log scales. But I actually don't use those. So I'm fine with a solution ignoring those cases. The only important characters are digits and commas.  % !TeX program = lualatex \documentclass{article}  \usepackage{siunitx} \sisetup{locale = DE}  \usepackage{unicode-math} \setmainfont[Ligatures=TeX, Numbers=OldStyle]{TeX Gyre Pagella} \setmathfont{TeX Gyre Pagella Math} % In reality I do not use Adventor but another sans font \setsansfont{TeX Gyre Adventor}  \usepackage{pgfplots} \pgfplotsset{compat=1.10} \SendSettingsToPgf  \begin{document}     \begin{tikzpicture}[font=\sffamily]         \begin{axis}[xlabel=x direction, ylabel=y direction, xmin=-1, xmax=1,domain=-1:1]             \addplot {x^2};         \end{axis}     \end{tikzpicture}      \textsf{1,2,3,4,5,6,7,8,9,0} \end{document}
62685
Which way of exporting Matlab graphics delivers the best result for inclusion in LaTeX? Is it possible to export scalable vector graphics, or even LaTeX graphics?
14255
In ordinary LaTeX, one can easily add new math alphabets by using \DeclareMathAlphabet. One is then able to use, say, cmsy, eus, and rsfs letters side-by-side. Unfortunately, there does not seem to be a similar mechanism in unicode-math, or at the very least \DeclareMathAlphabet doesn't do what it's supposed to do.  Question. How can I set up my own math alphabets in unicode-math?   Attempted workarounds  Since unicode-math has lots of math alphabets, one workaround might be to replace an unused alphabet with the desired one using \setmathfont[range=...-&gt;...]. This doesn't quite work right in my example:  \documentclass[12pt]{article} \usepackage{fontspec,xltxtra,xunicode} \defaultfontfeatures{Mapping=tex-text}  \usepackage{unicode-math}  \scrollmode  \setmathfont{xits-math.otf} \setmathfont[range={\mathscr,\mathbfscr},StylisticSet=0]{xits-math.otf} \setmathfont[range={\mathcal,\mathbfcal},StylisticSet=1]{xits-math.otf} \setmathfont[range={\mathtt-&gt;\mathcal}]{latinmodern-math.otf}  \begin{document} \[ \begin{array}{c} \mathcal{A B C D E F G H I J K L M N O P Q R S T U V W X Y Z} \\ \mathscr{A B C D E F G H I J K L M N O P Q R S T U V W X Y Z} \\ \mathtt{A B C D E F G H I J K L M N O P Q R S T U V W X Y Z} \end{array} \]   I suspect the problem is that the codepoints of the calligraphic letters in Unicode are not contiguous.   Using \mathversion seems to work better:  \documentclass[12pt]{article} \usepackage{fontspec,xltxtra,xunicode} \defaultfontfeatures{Mapping=tex-text}  \usepackage{unicode-math}  \setmathfont{xits-math.otf}  \setmathfont[version=eucal]{latinmodern-math.otf} \newcommand{\eucal}[1]{\mathchoice %   {\mbox{\mathversion{eucal}$\displaystyle\mathscr{#1}$}} %   {\mbox{\mathversion{eucal}$\mathscr{#1}$}} %   {\mbox{\mathversion{eucal}$\scriptstyle\mathscr{#1}$}} %   {\mbox{\mathversion{eucal}$\scriptscriptstyle\mathscr{#1}$}}}  \setmathfont[range={\mathcal,\mathbfcal},StylisticSet=1]{xits-math.otf}  \begin{document} \[ \begin{array}{c} \mathcal{A B C D E F G H I J K L M N O P Q R S T U V W X Y Z} \\ \mathscr{A B C D E F G H I J K L M N O P Q R S T U V W X Y Z} \\ \eucal{A B C D E F G H I J K L M N O P Q R S T U V W X Y Z} \end{array} \] \end{document}   But this feels very inefficient.
19668
I need the characters «» in my LaTeX document.  I'm writing in English though, and I don't want to use Babel.  I have the following hack but I'd like a better way:  \newcommand{\q}[1]{{% \font\larm = larm1000% \larm% \char 190}{#1}{% \font\larm = larm1000% \larm% \char 191}}
27324
I am attempting to document my MATLAB programming code in LaTeX. For  this, I use the mcode package, which defines the MATLAB lstlisting  environment. With the commands  \newcommand{\mfileMain}{main.m} \newcommand{\mfileMainFirstNumber}{\mfileMainFirstLine} \newcommand{\mfileMainFirstLine}{26} \newcommand{\mfileMainLastLine}{33} \lstinputlisting[firstnumber=\mfileMainFirstNumber,                  firstline=\mfileMainFirstLine,                  lastline=\mfileMainLastLine]{\mfileMain}   I set the firstnumber, firstline and lastline parameters and use  them to import a piece of MATLAB code into the LaTeX document with  \lstinputlisting. However, when I add some code before the  \mfileMainFirstLine, in this case 26, the code is shifted and the  documentation is ruined. To fix this, I would have to update the line  numbers.  I am trying to fix this issue by adding 'tracers' to my MATLAB  program. I use the commands  filename=['lstinputlisting_line_numbers_' mfilename '.txt']; fileID=fopen(filename,'w');   to create a text file in which I store the line numbers for which the  code is documented using the command  dbstack_eval=dbstack;fprintf(fileID,[num2str(dbstack_eval.line+1) '\n']);   . This results in a text file lstinputlisting_line_numbers_.txt with  content for instance like  53 62 75 91   in case I want to document four parts of the MATLAB program main.m.  What I want to do from here is simply use this line number data in the  \lstinputlisting commands. Perhaps it is possible to store the line  numbers in the \newcommands{}{}, or perhaps there is a better, more  elegant way of doing it. In this way, the line numbers would update  automatically in case I add new lines of code. Consequently, my LaTeX  document would still be okay, saving me a lot of time not having to  update the line numbers myself.  A minimum working example could look like the following. The LaTeX file  main.tex would have the content  \documentclass[a4paper]{article} \usepackage[framed,numbered]{mcode}  % Data for the 'lstinputlisting' environments. \newcommand{\mfileMain}{main.m} \newcommand{\mfileMainFirstNumberA}{\mfileMainFirstLineA} \newcommand{\mfileMainFirstLineA}{WHAT SHOULD I PUT HERE?} \newcommand{\mfileMainLastLineA}{WHAT SHOULD I PUT HERE?} \newcommand{\mfileMainFirstNumberB}{\mfileMainFirstLineB} \newcommand{\mfileMainFirstLineB}{WHAT SHOULD I PUT HERE?} \newcommand{\mfileMainLastLineB}{WHAT SHOULD I PUT HERE?}  \begin{document}     In the code     \lstinputlisting[firstnumber=\mfileMainFirstNumberA,                      firstline=\mfileMainFirstLineA,                      lastline=\mfileMainLastLineA]{\mfileMain}     we calculate the ....       And in the code     \lstinputlisting[firstnumber=\mfileMainFirstNumberB,                      firstline=\mfileMainFirstLineB,                      lastline=\mfileMainLastLineB]{\mfileMain}     we calculate the..... \end{document}   . The MATLAB file main.m would have the content  %% Line number output.  filename=['lstinputlisting_line_numbers_' mfilename '.txt']; fileID=fopen(filename,'w');  dbstack_eval=dbstack;fprintf(fileID,[num2str(dbstack_eval.line+1) '\n']);     %% Input to be specified by user.  alpha=10; % PDE parameter. x_s=0; % Starting coordinate. x_e=1; % End coordinate. N_n=1e2+1; % (N)umber of (n)odes. N_ip=2; % (N)umber of (i)ntegration (p)oints.  dbstack_eval=dbstack;fprintf(fileID,[num2str(dbstack_eval.line+1) '\n']);     fclose(fileID); % Close the file 'fileID'.
64234
A number of related questions have already been asked about this issue:       and even    But I'm still confused by the conflicting suggestions that have been given so far. So I'm trying again.  Which should be the preferred command to produce a displayed equation in my LaTeX documents?  So far the suggestions indicate that one should use \[ ... \], maybe \begin{equation*} ... \end{equation*}, or maybe even the gather* or align* environments from amsmath.  And one should definitely avoid using either $$...$$ or the eqnarray environment.  Now I have to say that, from a language perspective, I have a strong preference for the equation* environment because it is less cryptic than the \[ ... \] notation and it is  the most accurate.  So, is it fine to use equation*? Maybe only after loading amsmath? Or should the equation/equation* environment be redefined to something else so that spacing, package support, or whatever is improved?
52827
When I compilethis MWE:   \documentclass[a4paper,12pt]{article} \begin{document} Test $x_\mathit{in}$ \end{document}   ...it works perfectly with latex and pdflatex. If I try to use htlatex on it, it chokes:   ! Argument of \new:mfont has an extra }. &lt;inserted text&gt;                  \par  l.7 Test $x_\mathit{                     in}$   What am I doing wrong?   (BTW: if someone can point me to a comprehensive document about htlatex, please do... my google-fu is quite low today).   EDIT I discovered that if I write:   ...$x_{\mathit{in}}$    (with the extra set of braces) it works. But I am still wondering why...  This is standard (distribution-provided) full LaTeX installation in Ubuntu 14.04.
29776
No matter how I try to do it I always get the following error :      ! Package inputenc Error: Unicode char \u8:­ not set up for use with LaTeX.    I have tried using ­­­$^{\circ}$, \deg, \textdegree, pasting the ° symbol directly, to no avail.  Here is the header of my document, in case one of those could be causing the errors :  \usepackage[utf8]{inputenc} \usepackage[T1]{fontenc} \usepackage{lmodern} \usepackage[francais]{babel} %\FrenchItemizeSpacingfalse \frenchbsetup{CompactItemize=false} \usepackage{amsmath} \usepackage{amsfonts} \usepackage{amsthm}
109131
Whenever I am trying to use the subfigure or the algorithm2e package using \usepackage command, it is showing   LaTeX Error: Can be used only in preamble.    What is the problem and how to get rid of it. If there is any substitute for the two packages without using the above ones, kindly let me know.
51664
I need the ⱱ character (prefereably with the advanced diacritic underneath it) for a phonetics paper, but the tipa package doesn't seem to contain it.  I have at least one font with this character on my computer (Charis SIL).  How do I get the character into my LaTeX document?
15901
How to insert pipe symbol | in TeX (LaTeX)?  I have tried this sample with pdflatex tmp.tex  \documentclass{extarticle} \begin{document} \textpipe \end{document}   And it give undefined control sequence error  This is pdfTeX, Version 3.1415926-1.40.10 (TeX Live 2009/Debian) restricted \write18 enabled. entering extended mode (./tmp.tex LaTeX2e &lt;2009/09/24&gt; Babel &lt;v3.8l&gt; and hyphenation patterns for english, usenglishmax, dumylang, noh yphenation, loaded. (/usr/share/texmf-texlive/tex/latex/extsizes/extarticle.cls Document Class: extarticle 1996/10/08 v1.0 Non Standard LaTeX document class (/usr/share/texmf-texlive/tex/latex/base/size10.clo) (/usr/share/texmf-texlive/tex/latex/base/exscale.sty)) No file tmp.aux. ! Undefined control sequence. l.3 \textpipe
118876
I wanted to make a command that outputs a number in math mode. This is how my file looks like:  \documentclass{scrartcl}  %\usepackage{epsdice} %\newcommand{dice}[1]{\epsdice{#1}}  \newcommand{dice}[1]{\ensuremath{#1}}  \begin{document} Lorem ipsum... \end{document}   But when I compile this with XeTeX, I always get this error:  ! LaTeX Error: Missing \begin{document}.  See the LaTeX manual or LaTeX Companion for explanation. Type  H &lt;return&gt;  for immediate help.  ...                                                l.13 \newcommand{dice}[1]{\ensuremath{#1}}   I have not that much experience with TeX, I think the solution is quite easy.