An interesting problem with the combination of circumstances in the title has cropped up today. A minimal sample like this exhibits the problem:
\documentclass[a4paper]{article}
\usepackage{polyglossia}
\setdefaultlanguage{french}
\begin{document}
\verb|00:11:43:D4:86:A0|
\end{document}
This code produces:
whereas it correctly should look like this:
A bug about this has been reported, for now work around it with:
\newenvironment{\mverbatim}{\makeatletter \nofrench@punctuation\begin{verbatim}\makeatother}{\end{verbatim}\makeatletter\french@punctuation\makeatother}
The \verb is a little trickier, i'll think about that for a while. It probably boils down to copying the def from latex.ltx and adding an aftergroup or similar.
For now
\makeatletter\nofrench@punctuation
\verb|00:11:43:D4:86:A0|
\french@punctuation\makeatother
does the trick.
Wednesday, September 26, 2012
Wednesday, September 19, 2012
Widebar too wide
The following post shows a rather complicated solution to the problem of widebar being a little ugly that has naged for a while. Link
http://freebieber.org/ Please someone let me vote for this bill. Justin Bieber or any other cover singer on Youtube banned from the internet, what's not to like? How could one possibly oppose this. The only thing missing would be modems executing the owner if they were used to dial into aol.
Sunday, September 16, 2012
Umlaute not working in lualatex/making unicode work
This is a problem, that has confused us about a year ago. Lualatex claims to have the inputlanguage set to utf8, still i couldn't enter umlaute äüöß into the document. They were always eaten up or so it seems.
What really confused me was, that it worked as soon as i used \usepackage[utf8]{luainputenc}. It also started working without the inputenc if i set the fontenc to T1. This seemed to make no sense at all.
What usually happens is: if you enter a char into the document that char is converted to unicode (conceptually, i don't think it's literally done that way), and then replaced by the glyph corresponding to that point in the output.
This isn't quite so with some chars, umlauts being one example. They are often constructed as an accent (the ") on top of the normal char, so both packages activate a mechanism that replaces these by composited chars, ä by \"{a} for example. This magic is all done by fontenc and inputenc loads fontenc! If fontenc isn't loaded in some way, the character is output unchanged and the font doesn't have that symbol, so it omits it!
If the font happens to sport the symbol, → comes to mind, then it may or may not look different, because it isn't made up of several parts. If you want the best of both worlds you could either
What really confused me was, that it worked as soon as i used \usepackage[utf8]{luainputenc}. It also started working without the inputenc if i set the fontenc to T1. This seemed to make no sense at all.
What usually happens is: if you enter a char into the document that char is converted to unicode (conceptually, i don't think it's literally done that way), and then replaced by the glyph corresponding to that point in the output.
This isn't quite so with some chars, umlauts being one example. They are often constructed as an accent (the ") on top of the normal char, so both packages activate a mechanism that replaces these by composited chars, ä by \"{a} for example. This magic is all done by fontenc and inputenc loads fontenc! If fontenc isn't loaded in some way, the character is output unchanged and the font doesn't have that symbol, so it omits it!
If the font happens to sport the symbol, → comes to mind, then it may or may not look different, because it isn't made up of several parts. If you want the best of both worlds you could either
- use the ucs package which requires knowing the code point
- use DeclareUnicodeCharacter{<unicode>}{<replacement>} which of course requires knowing the code point as well
- make it active and redefine it.
\catcode`\→=13
\let→{\rightarrow}
lsof replacement for windows
I must admit, i sorely miss lsof. This is sorely aggravated by the moronic way in which locks prevent you from working under windows. You can't delete or move folders with open file handles under them or files that are opened. This is not a problem most of the time, but when texing this can be a pain. Finding out what to close in order to be able to rename a folder can be challenging.
While i would love a
lsof <file>
under linux, this isn't an option. There are replacements like process hacker but I just found out about
openfiles /query <file>
Since this saves me from installing yet another tool, this is cool. :) You probably will have to enable the list keeping first, it's off by default. So in a root shell enter
/openfiles /local on
and reboot (yes reboot, no kidding).
For the network aspect
lsof -i
showing you opened connections and sockets, use
netstat /B
(maybe some other switch as well, there are plenty)
While i would love a
lsof <file>
under linux, this isn't an option. There are replacements like process hacker but I just found out about
openfiles /query <file>
Since this saves me from installing yet another tool, this is cool. :) You probably will have to enable the list keeping first, it's off by default. So in a root shell enter
/openfiles /local on
and reboot (yes reboot, no kidding).
For the network aspect
lsof -i
showing you opened connections and sockets, use
netstat /B
(maybe some other switch as well, there are plenty)
mswin.vim and ctrl-v
I started using vim under windows and the remapping of some keys, most importantly ctrl-v doing pasting instead of vertical selection had me going up the wall.
If you, like me, think the default is moronic, do
:e $MYVIMRC
and comment out the line that reads
source $VIMRUNTIME/mswin.vim
If you, like me, think the default is moronic, do
:e $MYVIMRC
and comment out the line that reads
source $VIMRUNTIME/mswin.vim
Tuesday, September 11, 2012
Always on Top
Always on Top was always something i missed under windows. There are a couple of dedicated tools for this, some of which sport a weird interface. Turns out you can get the same result with autohotkey (beginning to love this tool, even though the configuration is a little clumsy).
Anyway the snippet to make it work with ctrl-alt-t is
^!t::
WinGet, currentWindow, ID, A
WinSet, AlwaysOnTop, Toggle, ahk_id %currentWindow%
Anyway the snippet to make it work with ctrl-alt-t is
^!t::
WinGet, currentWindow, ID, A
WinSet, AlwaysOnTop, Toggle, ahk_id %currentWindow%
Subscribe to:
Posts (Atom)

