LaTeX to TeXmacs: bibliographystyle?

I’m newby in TexMacs and try to understand it by converting my latex files to TexMacs. I convert latex file with revtex4-1 style to TexMacs. I use bibtex with \bibliographystyle{apsrev4-1}, but TexMacs does not use this style and use something like unsrt style. In the end of list references appears <bibliographystyle|apsrev4-1>. In the manual of TexMacs there is “The bibliography is inserted using Text → Automatic → Bibliography after which the user will be prompted for a bibliography style (plain, alpha, etc.) and a bibliography file (in BibTEX format).” But in my last version of TexMacs there is no this possibility at whole. How can be solved this problem?

First and foremost, seemingly `apsrev4-1` is not supported. Here is a list of supported styles: https://github.com/texmacs/texmacs/tree/master/TeXmacs/progs/bibtex
You can see that one needs to write more parsers for more styles.

When you click to the left of the first bibliographic item and press the “turn left” key until the status bar is shown as “bibliography before bib-list”, you can see that on the focus bar, there is an option called “Style” and you can click it to select the supported style that you want.

Thank you for help. I’m using tex already more then 20 years (now texstudio) and I see that texmacs is good program and I recommend it for my students who just start to learn latex. As for my opinion, it must be more oriented on the latex users. Many journals now have own style for text and style for bibliography. It is very difficult to write parsers for each style. I suppose that the problem is connected with that the texmacs uses its own internal format tm. I think that many problems maybe avoided if use tex source instead of tm format. This is realized in bakoma-tex. But it is not free and the project is dying.

Maybe you can help me with another problem? I use “slashed” package in tex source code to make slashed objects. But texmacs can not transform correctly it in its own format. In the texmacs I can make slashed objects by using Alt+n but it is better if texmacs could transform it by itself.

First, note that TeXmacs is not a frontend of TeX or its derivatives like LaTeX. Rather, it is designed, from the very beginning, to be an alternative to LaTeX. The typesetting is re-implemented independent of TeX engines. If somebody needs something analogous to a package in LaTeX, it is always necessary for one to implement something in TeXmacs. On the other hand, from the view point of programming, texmacs is quite different from tex. texmacs is pretty much similar to the scheme programming language, while tex is a macro programming language.

In practice, in order to send our drafts to journals, we can export to LaTeX, then edit according to the journal.

As for Feynman slash notation, it seems to me that TeXmacs does not support this natively. I tried to implement `slashed` as follows (to paste it, `Edit` -> `Paste from` -> `TeXmacs Scheme`):

``````(assign "slashed" (macro "sym" (superpose "/" (arg "sym"))))
``````

Then we can use it as follows:

``````(math (concat (slashed "a") "*" (slashed "b")))
``````

I did not implement `declareslashed`.

I understand well about the place of TexMacs. I’m a physicist and work with latex each day. In fact, for me, TexStudio is the good package. But I use tex since 1992 (it was EmTeX that time) and I see many difficulties which have newby, my students and friends. I need for these reasons a package which is wysiwyg and which can produce a good tex file. I found only 4 packages that are wysiwyg and that can produce tex file: TexMacs, Lyx, Swiftlatex, and BaKoMa. Lyx works bad (with tex file) comparing with TexMax. SwiftLatex is new package but works very very slow. BaKoMa is very good works with latex and wysiwyg. You can write to source code and as well as in compiled window. But it is not free and the project is dying. I see that in TeXMacs the new problem appears - we have to learn a new language - scheme.
If you have time, please explain me a little bit more your suggestion above. I made `Edit` -> `Paste from` -> `TeXmacs Scheme` and small window appears above with single word slashed. I copypast your

``````(assign "slashed" (macro "sym" (superpose "/" (arg "sym"))))
``````

in this window and enter. Then nothing happens. I do not understand how to use yours

``````(math (concat (slashed "a") "*" (slashed "b")))
``````

and how to implement `declareslashed` . The best way to understand programming language is to repeat code of that who knows.

Another problem appeared with figures. I used \includegraphics[width=4.5cm]{1} to include figure. When I export tm to tex \includegraphics{gv-new-1.pdf} appears but file gv-new-1.pdf did not produced. In manual is written that new files must appears.

Sorry, I did not notice. I understand now. When I made `Edit` -> `Paste from` -> `TeXmacs Scheme` , in this small window “slashed” appears because your definition is copied from buffer and slashed definition is used. All parts in text with <slashed|D> are changed to really slashed D. But it looks like operator \not{D} which is slashed wrong, the line is not in the meddle of letter but in the beginning. How to implement `declareslashed` ?

Ideally, it should be unnecessary for normal users to learn a new language which indicates that the GUI is not perfect enough. In TeXmacs, the previous pasted codes are not “coded”, but exported by texmacs.

I would like to refer to videos for basic usages of TeXmacs. The point is structured text editor / programming: even if we are programming, we have a structured, visualized point of view, rather than just a piece of code. I would like to recommend to watch them before studying macros.

For macros, unfortunately, there are not so many tutorials. There is a very simple screenshot introduction. However, it is somewhat out-dated.

For the macro for slashed scripts, what I did is the simplest: superposing a slash “/”. To achieve your goal, we need to do more.

I am not an experienced user of TeXmacs, so my codes are neither orthodox, nor optimal. Here is my attempt:

``````(assign "slash-sym" (macro "sym" (quasi (if (provides (merge "slash-" (arg "sym"))) (value (unquote (merge "slash-" (arg "sym")))) "/"))))
(assign "slashed" (macro "sym" (superpose (arg "sym") (slash-sym (arg "sym")))))
``````

Let me explain briefly how these macros work. `(slashed sym)` is the macro which superposes a slash on `sym`. By default, we don’t have any customization, so `(slashed "D")` will simply superpose a slash on D. The macro `slash-sym` generates a slash, which allows us to customize. For example, when `(slash-sym "D")` is called, it will first try to see whether there is an environmental variable `slash-D` is defined. If so, then it will use the value of this environmental, otherwise it will simply use “/”. In order customize, we add the following code:

``````(assign "slash-D" (concat (space "0.5spc") "/"))
``````

to define a variable `slash-D` with a preceding space of length 0.5. Now we try the examples `(math (concat (slashed "a") "*" (slashed "D")))`. This could be down by `Paste from TeXmacs Scheme`. Alternatively, we can press `\$`, then `\slashed`, then Enter, then `a`, then the right arrow key, then `*`, then `\slashed`, then Enter, then `D`. What is interesting is that, you see that after inputting `\slashed`, you see a slash generated, and when you press `D` or `a`, the slash is adjusting accordingly.

You are completely right. Thank you very much for explanation and thank you for video references. I see that TeXmacs is really power instrument and I’ll will try to use it to write my next paper. But what is terrible that there is no spell check on fly, but only spell check on total document. I think it will be realized in next version. Could you please reply me on my question in last message