Main page Research activities Publications Talks MSc thesis projects Courses Mentoring Hobby and spare time Write me This site uses
Google Analytics
Last updated on
28 October 2023

The paper writer FAQ

What editor to use for writing papers ?
LaTeX is an optimal tool and, in my opinion, it is the best choice everytime the paper contents is essentially text or figures. Unfortunately, if the paper contains many mathematical formulas, it is very difficult to modify a paper a few weeks after it was written. In such cases, I would suggest using the LyX editor, which allows to write directly mathematical formulas in almost their final format, and with the same key sequences and shortcuts you would use in LaTeX.
Any troubles in using Emacs ?
Emacs is my preferred text editor for writing code, and also for writing documents in LaTeX. The keyboard shortcuts are somewhat incomprehensible to the beginner, but, once you learnt them, you will start appreciating the power of the tool. I wrote a mini-guide (HTML, PS, PDF) with the commands I use most frequently. If you use Emacs for writing the BibTeX database file for your articles, please consider that the Entry-Types menu voice allows to build an empty entry template with a simple mouse click.
How to replace a word in a set of text files ?
It is possible to use the Emacs tag-tables: first, create a tag-table within a file named TAGS with the command (from the shell) etags <file(s)> from inside the folder of interest; then, invoke the Emacs command M-x tags-query-replace with which you can specify a find and replace operation by using the regular expressions' language.
Alternatively, you can try using the Perl program replace.pl I wrote. As an example, the line
replace.pl -r s/section/Section/g *.tex
replaces all occurrences of the word section with the word Section in all your LaTeX sources. The command replace.pl -h provides full usage instructions.
Is it possible, in Lyx, to use the shorthand \eps instead of \varepsilon within formulas ?
Yes, with the following preliminary operations: copy the file /usr/share/lyx/symbols into the folder ~/.lyx/; find the line relative to varepsilon and duplicate it as in
      varepsilon         cmm          34 101 mathord  x
      eps                cmm          34 101 mathord  x
Then, within the .layout file that you are using, add the code segment
      Preamble
	\def\eps{\varepsilon}
      EndPreamble
At last, select the menu voice Edit->Reconfigure, then restart LyX.
How can I integrate a custom .bst file (as the ones provided by IEEE, ACM, etc...) into LyX ?
With the following operations:
  • find the LyX layout file which most resembles the LaTeX style you were given by the editor, then copy the relative .layout file, which is under the folder /usr/share/lyx/layouts, into ~/.lyx/layouts/myname.layout, where myname is the name of the new layout you are creating;
  • customize the just created layout file by substituting in the invocation of the macro DeclareLaTeXClass the name of the LaTeX style provided by the editor (the accuracy with which LyX will render on the screen the new style while you edit a document, not the final format of the PS/PDF document, depends on how much time you waste customizing such layout file, setting the right page structure, how counters and captions work, what fonts to use, what styles are available, etc...);
  • as the root user, install the new .sty|.cls LaTeX style file by copying it into /usr/share/texmf/tex/latex/, and the new .bst BibTeX style file by copying it into /usr/share/texmf/bibtex/, and launching, from the terminal, the command texhash;
  • at last, select the menu voice Edit->Reconfigure, then restart LyX.
How can I place a large figure on both columns of a twocolumn document ?
Simply by using the LaTeX environment
\begin{figure*} ... \end{figure*}
How do I format a text portion as wrong or deleted in LaTeX, i.e. how do I put a horizontal line at middle height on it ?
Just use the \sout macro (strikeout) from the ulem package, as in:
\usepackage{ulem}
%% ...
\sout{This is a deleted or uncorrect sentence.}
Alternatively, you can use the macro \st from the package soul, as in:
\usepackage{soul}
%% ...
\st{This is a deleted or uncorrect sentence.}

Main page Research activities Publications Talks MSc thesis projects Courses Mentoring Hobby and spare time Write me Last updated on
28 October 2023