mailing-list for TeXmacs Users

Text archives Help


Re: \usepackage with TikZ in session


Chronological Thread 
  • From: Massimiliano Gubinelli <address@hidden>
  • To: Alexandre Danescu <address@hidden>
  • Cc: Frank <address@hidden>, texmacs-users <address@hidden>, marc lalaude-labayle <address@hidden>
  • Subject: Re: \usepackage with TikZ in session
  • Date: Sun, 8 Nov 2020 23:26:30 +0100

I've stolen this example and put it in the blog, just to try out to add some material. I hope you do not mind Alexandre.

Best 
Max



On 8. Nov 2020, at 20:56, marc lalaude-labayle <address@hidden> wrote:

Thank you Alexandre

Le dim. 8 nov. 2020 à 20:37, Alexandre Danescu <address@hidden> a écrit :

Hi Marc,

Try this example in a TikZ session :

===

documentclass[tikz]{standalone}
\usepackage{tikz-3dplot}

\begin{document}
\tdplotsetmaincoords{60}{120}

\begin{tikzpicture}[scale=3,tdplot_main_coords,axis/.style={->,blue,thick},
vector/.style={-stealth,red,very thick},vector guide/.style={dashed,red,thick}]

%standard tikz coordinate definition using x, y, z coords
\coordinate (O) at (0,0,0);

%tikz-3dplot coordinate definition using r, theta, phi coords
\tdplotsetcoord{P}{.8}{55}{60}

%draw axes
\draw[axis] (0,0,0) -- (1,0,0) node[anchor=north east]{$x$};
\draw[axis] (0,0,0) -- (0,1,0) node[anchor=north west]{$y$};
\draw[axis] (0,0,0) -- (0,0,1) node[anchor=south]{$z$};

%draw a vector from O to P
\draw[vector] (O) -- (P);

%draw guide lines to components
\draw[vector guide] (O) -- (Pxy);
\draw[vector guide] (Pxy) -- (P);

\end{tikzpicture}

\end{document}

=====

Best regards,

Alexandre

Le 08/11/2020 à 20:26, marc lalaude-labayle a écrit :
Thank you for your replies.

I chose french language and don't have access to the full Help files. Can I change the help files in order to get the english ones without changing all the settings to english ? I couldn't find the tikz example you spoke about for example.

Marc

Le dim. 8 nov. 2020 à 16:00, Massimiliano Gubinelli <address@hidden> a écrit :
Dear Frank, the graph plugin can be used also to process full pdf files, so you regain all the freedom you need. Please check the Help. Just use the %latex or %pdflatex declaration at the start. 

In Sect. 4 of the Help you see a quite complex example with TikZ.

Best
mg


On 8. Nov 2020, at 15:09, Frank <address@hidden> wrote:

That does not seem to be quite customizable, in my opinion. You see that the preamble is hard-coded in the Python plugin, and I don't see any way to modify it from the .tm file. For even as easy as adding a \usepackage, I can only modify that Python code on my computer, which restricts the portability of document.

Best,
Frank

于 November 8, 2020 1:35:08 PM UTC, Massimiliano Gubinelli <address@hidden> 写到:
Btw, you want also to give a look to the "Graph" plugin which is a
generic interface to plenty of graphing plugins, including latex and
tikz. In the Graph plugin Help you find also some more information on
"Foldable" tags.

Max



On 8. Nov 2020, at 14:21, marc lalaude-labayle
<address@hidden> wrote:

Hi.

Thank you Massimilano : I didn't know that there was any help page
for the add-ons directly within TeXmacs.

I ordered the jolly book and hope to convince my institutions to buy
one too, and I think I'll find the answer to my following question in
it. But, I'll ask it now. I'd like to display the picture that Tikz
gives (for example) but don't want to see the code and the tikz prompt
in the .tm (or in fine .pdf exported) document. Nonetheless, I'd like
to edit the figure if changes are needed. Does anyone know how one can
achieve this ?

Best regards.

Marc



Le dim. 8 nov. 2020 à 13:40, Massimiliano Gubinelli
<address@hidden <mailto:address@hidden>> a écrit :
Just insert a full valid tex document with header and preamble if you
need further customization. See the examples in the help.

Best
mg


On 8. Nov 2020, at 12:29, <address@hidden
<mailto:address@hidden>> <address@hidden
<mailto:address@hidden>> wrote:

Hello,

The TikZ session in TeXmacs work well with a script like

\uselibrary{...}
\begin{tikzpicture}
...
\end{tikzpicture}

but the use of additional packages, like

\usepackage{3dplots}
\begin{tikzpicture}
...
\end{tikzpicture}

gives an error message "\usepackage can olny be used in the
preamble".

Does anybody know how to include \usepackage in the preamble (or
the exact
location of the preamble...) or how to overcome this issue ?

Best wishes,

Alexandre


-- 
使用 K-9 Mail 发送自我的Android设备。





Archive powered by MHonArc 2.6.19.

Top of page