Monday, November 12, 2018

Marking changes in edited pdf

latexdiff, a Perl script coming with TeXLive, is just great. Once you have the original.tex and the edited.tex both compiling well, one can generate a diff.tex with all the differences marked in customizable colors. There is an error if one uses hyperref and has changes within the \section etc. commands, however.

A workaround is excluding those commands from the parsing operation:

latexdiff --exclude-texcmd="section,subsection,subsubsection" original.tex edited.tex > diff.tex

Thursday, October 25, 2018

bugs on ubuntu 18.04

Dropbox icon not showing, resolved thusly:

killall indicator-application-service

sudo apt remove indicator-application

Wednesday, October 24, 2018

Installing tex on ubuntu 18.04 over the internet

Removing texlive:

sudo apt-get purge texlive-*
sudo apt-get autoremove
sudo apt-get autoclean
 
According to tug (https://www.tug.org/texlive/quickinstall.html):

First, just to be sure, 
rm -rf /usr/local/texlive/2018
rm -rf ~/.texlive2018
 
Then, download the installer (a Perl script) from here:
 
https://www.tug.org/texlive/acquire-netinstall.html
 
Then extract, move to the extracted directory, and run the installer. 
 
 
 
 
 
 



Tuesday, October 23, 2018

glossary

To use the glossaries package.

\makeglossaries in preamble, which requires xindy.

\printglossaries where the glossary needs to be printed.

run in terminal:

makeindex -s myDoc.ist -o myDoc.gls myDoc.glo (M-x shell to run in emacs)

Monday, September 10, 2018

From odt to tex

To export from odt to latex, using Libreoffice (5.0., etc) I tried the various options available in the Libreoffice extension writer2latex:
  • ultraclean
  • clean
  • default
  • custom
 Custom was crashing, though it seems the best in view of larger projects. It allows customization of preamble, including the possibility of using weird packages and user-defined commands.

Default was working out of the box, with some ballast useless for my purpose (textrm).

Ultraclean was working, but did not mark key formatting such as italics.

Clean was the best option.

In all cases, there is a window control with some settings related to language, bibtex, etc., that need to be fine tuned. There also xe(la)tex is available. Altogether, awesome extension!

Libreoffice crashes in Ubuntu

LibreOffice (Writer) was crashing on Ubuntu 16.04. At first I thought it was the writer2latex extension I recently enabled. Then I thought I had a buggy outdated version.

I removed the extension, and I updated to 6, following this lead.

Still it was crashing. It's a bug. This workaround seems the only way to fix it. In Libreoffice > Tools > Options > Libreoffice > Advanced, disable "Use a Java runtime environment".

However, the problem is that one cannot enable the extension writer2latex, and I suppose other extensions too, without a java runtime environment. For now, the only solution to get both Libreoffice and the extension working might be to downgrade to a previous version of Ubuntu.

Upgrading to 18.04 did not help, same problem on the Lenovo laptop. But it somehow works on the Dell XPS. SO THERE IS SOME HOPE!

Friday, March 17, 2017

Namespace in xml to xml

I want to transform my xml into tei xml via xslt.

My xml has no namespace. The output (i.e., tei xml) needs to be in the tei namespace.

If in the xsl file I have xmlns:tei="http://www.tei-c.org/ns/1.0" in the xsl:stylesheet declaration, I get the element in the output, while I want

This can be achieved either by having an explicit in the xsl template, or by having xmlns="http://www.tei-c.org/ns/1.0" instead of xmlns:tei="http://www.tei-c.org/ns/1.0" in the xsl:stylesheet element. However,
in both cases the child of in  the output, i.e., , will now have xmlns="", an empty namespace.

No solution so far.