by

Where communities thrive

• Join over 1.5M+ people
• Join over 100K+ communities
• Free without limits
• Create your own community
Activity
Szabolcs Horvát
@szhorvat
Finally, try SetOptions[MaTeX, "BasePreamble" -> {"\\usepackage{amsmath,amssymb}"}], so that \usepackage{lmodern} would be removed from the base preamble.
5taras
@5taras
\documentclass{article}
\usepackage[utf8]{inputenc}
\usepackage[T2A]{fontenc}
\begin{document}
ЛаТеХ
\end{document}
i dont know how to attach dvi here
or pdf
5taras
@5taras
ubuntu 18.04 Texlive 2017
thanks for the answer
Szabolcs Horvát
@szhorvat
@5taras Can you try MaTeX["\\text{ЛаТеХ}", "Preamble" -> {"\\usepackage[T2A]{fontenc}"}]?
Make sure MaTeX is configured to use pdflatex and not pdfxelatex
5taras
@5taras
thanks a lot. It helped
yode
@Juddd
@szhorvat It's seem the MaTeX don't take effect on x^2 here?
A = {{Cos[4], Sin[4]}, {Sin[4], -Cos[4]}}; MaTeX[PromptForm["A^2", MatrixForm[A]]]
Any method can get what I expected?
Szabolcs Horvát
@szhorvat
If the input to MaTeX is not a string, it uses TeXForm to get TeX code. I hope this makes it clear what is happening.
You have a complicated expression with a string buried in it. That string is not going to be extracted to be interpreted as TeX ...
GautamDasguptaCU
@GautamDasguptaCU
Where do I place my.sty in Mac OS 10.14.5 so as to be able to use: SetOptions[MaTeX, "Preamble" -> {"\usepackage{my}"}]
Szabolcs Horvát
@szhorvat
It must be made globally accessible to LaTeX. I hope this helps: https://en.wikibooks.org/wiki/LaTeX/Installing_Extra_Packages I have limited internet access for a while and can’t respond easily.
GautamDasguptaCU
@GautamDasguptaCU
Where can I place my.sty for MaTeX to find, is the directory hidden in Mac Osx 10.14?
Szabolcs Horvát
@szhorvat
Did you read the articles I linked to?
1337 h4x0rg
@1337H4x0rg_twitter
Hello
Can anyone help me with an issue I ran into?
Szabolcs Horvát
@szhorvat
Describe the problem.
jcherranz
@jcherranz
Hello everyone. Could anyone share an example of both (x and y) Ticks using Latin Modern Font?
I can only see examples where "x" Ticks are numbers in Latin Modern but "y" Ticks are still in Mathematica font. Thank you in advance.
@szhorvat If you could send one example it would be great! and thanks very much for your fantastic work
Szabolcs Horvát
@szhorvat

I can only see examples where "x" Ticks are numbers in Latin Modern but "y" Ticks are still in Mathematica font. Thank you in advance.

@jcherranz The documentation has multiple such examples. Did you check them?

jcherranz
@jcherranz
Yes, and all of them give examples of how to change "x" Ticks while leaving "y" Ticks unchanged. I've tried to do it my self but haven't been able to. @szhorvat
Szabolcs Horvát
@szhorvat
I’m not sure what you mean. There are countless examples. Use the documentation center and search for MaTeX.
jcherranz
@jcherranz
Yes I 've seen those, but it only seems to work when de "x" and "y" Range are the same
Szabolcs Horvát
@szhorvat
That’s not true. Look at the second one.
Also, look up the syntax for FrameTicks for the first one.
You simply need to specify the bottom and right edge separately instead of using a pure function to do them together.
jcherranz
@jcherranz
But in the second example, both x and y go from -1 to 1
Szabolcs Horvát
@szhorvat
Yes, that’s right. But they don’t need to. In the second example, MaTeX is not used at all for frame ticks. The font was simply set to Latin Modern.
You’ll find the second one in the “Typesetting with MaTeX” tutorial page.
It’ll just work regardless of the range.
This is the recommended method for ticks: just install the appropriate font and use it.
I only recommend doing the ticks with MaTeX when this would make a real difference in the quality (e.g. the fractions in the first example look better with MaTeX than with plain Mathematica + font change—but it is rare to have such fractions in ticks)
jcherranz
@jcherranz
Okey, thank you very much!
I'm trying with an histogram but I still can't do it...
Szabolcs Horvát
@szhorvat
@jcherranz I’m a bit busy now, but if you create an almost-working toy example and post it here, I’ll try to fix it for you later.
jcherranz
@jcherranz
Okey thank you very much!
jcherranz
@jcherranz
Histogram[wReturns, Automatic, "PDF", PlotRange -> All, Frame -> True,
FrameLabel -> MaTeX[{"r_{t}", "PDF"}, ContentPadding -> False],
PlotLabel -> MaTeX@"Histograma~de~retornos",
BaseStyle -> {FontFamily -> "Latin Modern Roman"},
FrameStyle -> BlackFrame]
@szhorvat
Szabolcs Horvát
@szhorvat
@jcherranz It works fine for me
Needs["MaTeX"]

wReturns = RandomReal[1, 1000];

Histogram[wReturns, Automatic, "PDF", PlotRange -> All, Frame -> True,
FrameLabel -> {MaTeX["r_{t}", ContentPadding -> False], "PDF"},
PlotLabel -> MaTeX@"\\text{Histograma de retornos}",
BaseStyle -> {FontFamily -> "Latin Modern Roman"},
FrameStyle -> BlackFrame]`