Discussion:
Any LaTeXiT users here?
Athel Cornish-Bowden
2017-11-17 09:25:32 UTC
I haven't managed to find a LaTeXiT discussion here or anywhere else on
the web, so I'm wondering if there are any LaTeXiT users around.

I recently upgraded to 2.8.1, but the problem was the same in the much
earlier version I was using.

Specifically, if I type

\text{Some text}\\\text{A longer bit of text}

and then press the LaTeX it! button it sets it correctly, but
right-justified. That is text, but it treats \\ in the same way with
mathematical expressions, such as

y = a + bx\\y^2 = a^2 + 2 abx + b^2x^2

If I typeset these with TeXshop they come out left-justified (as I want).

Older versions of LaTeXiT allowed me to choose between Align, Display,
Inline and Text, but it didn't matter which I chose: the problem was
the same. 2.8.1 still has the four buttons, but it also has Auto, and
if it has decided that I want Auto all the others are greyed out.
--
athel
GT
2017-11-17 16:13:16 UTC
Put
\usepackage[fleqn]{amsmath}
in the template
Athel Cornish-Bowden
2017-11-17 17:09:33 UTC
Post by GT
Put
\usepackage[fleqn]{amsmath}
in the template
Thanks, but unfortunately it doesn't work: the result is exactly the same.

\usepackage{amsmath}

(it's part of the default) without [fleqn]. Adding [fleqn] didn't
change anything.
--
athel
Peter Flynn
2017-11-19 21:59:09 UTC
Post by Athel Cornish-Bowden
Put
\usepackage[fleqn]{amsmath}
in the template
Thanks, but unfortunately it doesn't work: the result is exactly the same.
\usepackage{amsmath}
(it's part of the default) without [fleqn]. Adding [fleqn] didn't change
anything.
I haven't tried it, but from what I can see, it's aimed at math users on
Macs, so it may have a number of built-in preconceptions which may not
be evident.

What happens if you add \par before your example and \par after it, eg

\par\text{Some text}\\\text{A longer bit of text}\par

///Peter
Athel Cornish-Bowden
2017-11-20 07:53:16 UTC
Post by Athel Cornish-Bowden
Put
\usepackage[fleqn]{amsmath}
in the template
Thanks, but unfortunately it doesn't work: the result is exactly the same.
\usepackage{amsmath}
(it's part of the default) without [fleqn]. Adding [fleqn] didn't
change anything.
I haven't tried it, but from what I can see, it's aimed at math users on Macs,
Its purpose is to allow you to typeset little snippets of LaTeX output
in drawing or presentation programs. I use it for both of those,
especially Keynote. To take a real example, rather than an invented
one, I wanted to insert

\text{The claimed precision of }$\Delta S^\ddag$\\
\text{is }$\pm 10\%$

in a Keynote document. Using TeXShop to do this would no doubt be
possible, but a bit of overkill. LaTeXiT takes care of all the
\begin{document} etc., and has a default preamble (that can be
modified). Finally, the output can be transferred to another
application with a simple drag and drop.
so it may have a number of built-in preconceptions which may not be evident.
What happens if you add \par before your example and \par after it, eg
\par\text{Some text}\\\text{A longer bit of text}\par
Unfortunately that makes no difference. However, yesterday I found a
solution that does work, to enclose the snippet between
\begin{flushleft} and \end{flushleft}.
--
athel
Peter Flynn
2017-11-20 22:08:14 UTC
On 20/11/17 07:53, Athel Cornish-Bowden wrote:
[...]
Post by Athel Cornish-Bowden
Its purpose is to allow you to typeset little snippets of LaTeX output
in drawing or presentation programs. I use it for both of those,
especially Keynote.
Very useful.
Post by Athel Cornish-Bowden
\par\text{Some text}\\\text{A longer bit of text}\par
Unfortunately that makes no difference. However, yesterday I found a
solution that does work, to enclose the snippet between
\begin{flushleft} and \end{flushleft}.
That was going to be my next suggestion, as the default in LaTeX is
justified (which for short lines effectively means ranged-left). But
your use of \text (which I don't know) implies that you are actually
working in math mode, which means all bets on normal behaviour are off.

But I'm willing to bet that LaTeXIt is *not* setting them flush right.
My money is on the accidental alignment that at the start of a
paragraph, "Some text" will be (by default) indented, whereas the
premature linebreak of the double-backslash makes "A longer bit of text"
start at the left-hand margin. So if we get out of math mode:

\documentclass{article}
\begin{document}
Some text\\A longer bit of text
\end{document}

This *almost* looks centred. I think what you really need is just to
prefix the first phrase with \noindent

///Peter
Athel Cornish-Bowden
2017-11-21 07:44:44 UTC
Post by Peter Flynn
[...]
Post by Athel Cornish-Bowden
Its purpose is to allow you to typeset little snippets of LaTeX output
in drawing or presentation programs. I use it for both of those,
especially Keynote.
Very useful.
Post by Athel Cornish-Bowden
\par\text{Some text}\\\text{A longer bit of text}\par
Unfortunately that makes no difference. However, yesterday I found a
solution that does work, to enclose the snippet between
\begin{flushleft} and \end{flushleft}.
That was going to be my next suggestion, as the default in LaTeX is
justified (which for short lines effectively means ranged-left). But
your use of \text (which I don't know) implies that you are actually
working in math mode, which means all bets on normal behaviour are off.
My example wasn't well thought out. In real practice I would never use
LaTeXiT for setting pure text, but usually either mathematics or text
with some mathematical expressions. I think it was a misguided attempt
to make the example simpler. A more realistic one would be

\begin{flushleft}
\text{The claimed precision of }$\Delta S^\ddag$\\
\text{is }$\pm 10\%$
\end{flushleft}

This was a label in a figure where I wanted the insertion to have a
limited width.
Post by Peter Flynn
But I'm willing to bet that LaTeXIt is *not* setting them flush right.
My money is on the accidental alignment that at the start of a
paragraph, "Some text" will be (by default) indented, whereas the
premature linebreak of the double-backslash makes "A longer bit of
\documentclass{article}
\begin{document}
Some text\\A longer bit of text
\end{document}
This *almost* looks centred. I think what you really need is just to
prefix the first phrase with \noindent
///Peter
--
athel
Ulrike Fischer
2017-11-20 09:26:28 UTC
Post by Athel Cornish-Bowden
I haven't managed to find a LaTeXiT discussion here or anywhere else on
the web, so I'm wondering if there are any LaTeXiT users around.
I recently upgraded to 2.8.1, but the problem was the same in the much
earlier version I was using.
Specifically, if I type
\text{Some text}\\\text{A longer bit of text}
and then press the LaTeX it! button it sets it correctly, but
right-justified. That is text, but it treats \\ in the same way with
mathematical expressions, such as
y = a + bx\\y^2 = a^2 + 2 abx + b^2x^2
If I typeset these with TeXshop they come out left-justified (as I want).
Disclaimer: I don't have LaTteXiT and not mac so I'm guessing.

According the description LaTteXiT is for math, so trying to use to
display arbitrary text is a bit misusing it.

Beside this: imho LaTteXiT uses around the snippets one of the
multiline math environments of amsmath -- probably align* (at least
with the align option). So you could try to add "&" before the lines
to get to the left align part of a align:

\documentclass[12pt]{article}
\usepackage{amsmath}
\begin{document}
\begin{align*}
& \text{Some text}\\
& \text{A longer bit of text}
\end{align*}

\end{document}
--
Ulrike Fischer
http://www.troubleshooting-tex.de/
quark67
2017-11-21 02:57:49 UTC
Post by Athel Cornish-Bowden
\text{Some text}\\\text{A longer bit of text}
You can use this :

% start of code
Some text

A longer bit of text

$E=mc^2$

$F=ma$
% end of code

with the "Text" setting.

You can see the actual source code with the "LaTeX > Display last log"
menu (after pressing in LaTeX it!" button). As you have French email
address, it's « LaTeX > Afficher le dernier rapport d'exécution ».

If you want use the "Align" setting, all you type in the window is put
in a "align*" environment. What is a "align*" environment? It's an
environment wich display multiple unnumered equations, with horizontal
alignment (by default on an equal sign). Each line is split (at & sign)
into aligned column (right aligned against "&" in the first column, left
aligned in the second column, right aligned in the third column, and so
on). (Thanks to Guide to LaTeX, Kopka & Daly, for this short
explanation)

So, if you would use the "Align" setting, all you need is to add "&"
before each line so \text{...} is in second column, and then left
aligned.

% start of code
& \text{Some text}\\ & \text{A longer bit of text}
% end of code

With "LaTeX > Display last log" menu, you'll see this source (extract) :

...preamble...
\begin{document}\begin{align*}& \text{Some text}\\ & \text{A longer bit
of text}
\end{document}

You can fully customize LaTeXit as your need (read the help and the
homepage of the software).
Athel Cornish-Bowden
2017-11-21 08:06:45 UTC
Post by quark67
Post by Athel Cornish-Bowden
\text{Some text}\\\text{A longer bit of text}
% start of code
Some text
A longer bit of text
$E=mc^2$
$F=ma$
% end of code
with the "Text" setting.
You can see the actual source code with the "LaTeX > Display last log"
menu (after pressing in LaTeX it!" button). As you have French email
address, it's « LaTeX > Afficher le dernier rapport d'exécution ».
Thanks for this. I've never needed to look under the hood, so I've
never previously used "Display last log". In fact I've never used any
of the menu options at the top of the screen, but there are others that
could be useful. LaTeXiT is so well conceived that the compose window
and its buttons do just about everything.

Yes, I'm physically located in France (if I say "Marseille" you'll be
checking that your wallet is still there), but I run LaTeXiT (and most
other software) in English.
Post by quark67
If you want use the "Align" setting, all you type in the window is put
in a "align*" environment. What is a "align*" environment? It's an
environment wich display multiple unnumered equations, with horizontal
alignment (by default on an equal sign). Each line is split (at & sign)
into aligned column (right aligned against "&" in the first column, left
aligned in the second column, right aligned in the third column, and so
on). (Thanks to Guide to LaTeX, Kopka & Daly, for this short
explanation)
So, if you would use the "Align" setting, all you need is to add "&"
before each line so \text{...} is in second column, and then left
aligned.
% start of code
& \text{Some text}\\ & \text{A longer bit of text}
% end of code
...preamble...
\begin{document}\begin{align*}& \text{Some text}\\ & \text{A longer bit
of text}
\end{document}
You can fully customize LaTeXit as your need (read the help and the
homepage of the software).
I've done all that! However, I didn't find what I wanted to know. Too
stupid, or too old, perhaps.
--
athel