TeXtalk: an interview with Aditya

2012-08-16 by . 0 comments

Welcome to the TeXtalk! We have a very special guest for today: our friend Aditya Mahajan, one of the most active members of TeX.sx, 18k+ rep, 91+ badges (including the ConTeXt badge), 310+ answers so far, and our resident ConTeXt expert. Get ready for this awesome interview!

more »

Filed under Interviews

Maintaining a balance

2012-08-10 by . 2 comments

Keeping the TeX-sx site working well is a balancing act. We want good quality content, and that means there is housekeeping to do: voting, editing questions and answers, looking for duplicates and adding comments. At the same time, it’s important that users are not put off by being told for example that their question has been asked before. On the main StackOverflow blog, there’s a post about how they’ve approached this: it’s raised quite a lot of comment. Each StackExchange site has its own approach to these issues, and so I thought I’d look at what the TeX-sx approach seems to be.

A key aim is to make the site accessible to new users, whether they are new TeX users or not. That means giving people some leeway when they ask questions or post answers: very rapidly closing is not normally the best plan. Many TeX questions are focussed on single documents, and teasing out the required detail is something that the questioner often needs some guidance with (they are often under pressure to get things done!). Of course, there is still a need to keep on top of material which needs improving. That’s one of the reasons for the Answer the Unanswered sessions: it lets us keep on top of questions where improvements were needed and did not happen.

It’s a similar story with voting: in general, we’ve tried to avoid downvotes. Voting on TeX-sx is hopefully about being positive: good questions and answers get upvotes, and less good ones don’t. Some really poor material might deserve a score of minus one, but beyond that there’s no value in downvoting.

Editing material is something that needs a bit of care: every question and answer has someone’s name on it, even if it’s been edited. Again, the feeling has been to keep a balance between the needs of readers (to have well presented material) and of original authors (to have their efforts respected). That’s led to some questions, but in the round I think we’ve not done badly.

So what’s the message? Remember that there are many different site users, with many different requirements. We want good content, but we also want a welcoming site where new users feel they can contribute.

Filed under TeX.sx

TeXtalk: an interview with PLK

2012-08-06 by . 0 comments

Welcome to the TeXtalk! We have a very special guest for today: our friend Philip Kime, also known as PLK, our biber/biblatex expert. He’s the project leader of the biblatex task force, together with Audrey and Joseph Wright, and a great Perl programmer. Get ready for this awesome interview!

more »

Filed under Interviews

TeX and GNU Emacs: A simpleton’s journey

About four months ago, I asked this question on TeX-sx. Over the previous ten years, I had looked at GNU Emacs, as a programming editor, three or four times, and, each time, given up because I thought the learning and implementation curves too challenging.

But this time, encouraged by the helpful answers to my question, I decided to invest some time in learning Emacs and tweaking it to do what I wanted. And now, four months later, I’m really pleased with the journey so far.

Background

I’m a Windows 7 user, using TeX Live and Emacs 23.3 for Windows. As a specialised software developer, my main TeX products are proposals and design documentation (though I also use it for all my ‘domestic text processing’ tasks). I generally manage documentation source, and everything else in a project, with Git.

Editing documents with Emacs

Plain Emacs out-of-the-box does a wonderful job, but for TeX editing you need a bit more: AucTeX, which provides many useful tools for TeX editing, including a component, RefTeX, which presents you with an intelligent TOC right there in your editor, allowing you to navigate (across multiple input files, of course), and to create index entries, labels, and cross-references very easily. AucTeX also has an outlining component which allows you to fold up your section hierarchy.

Just to whet the appetite, here’s a screen shot of a (fully unfolded) piece of a RefTeX toc:

As well as using Emacs for TeX editing, for notes and brainstorms I can heartily recommend org-mode, which is (much more than) an outliner, with facilities for To-Do items and table manipulation, as well as the usual structural organising.

It took some time to get Emacs tailored exactly to my liking. It’s a bit like typography in that respect; there are always opportunities for ‘just one more tweak’, and a lot of self-control is needed. But you should expect to do some customization, perhaps with help from SO or TeX.se.

Things I have not been able to do

The main reason for these, I think, is that my perception of the effort and irritation needed to get x working exceeds the effort and irritation of ignoring it or inventing a work-around. Here are the principal ones:

  • Unicode support from the keyboard: I occasionally work in multiple languages, including Welsh and Turkish, which are not catered for by ISO-8859-1. I have a customised Windows keyboard layout which generates the right Unicode characters, but Emacs, despite hours of cutting and pasting tentative solutions from the Internet, still insists on shoehorning them into ISO-8859-1: ŵ becomes w, ğ becomes g, and so on. I’ll live with it.
  • I haven’t tried to get Emacs to run LaTeX and produce a preview for me — I use Texworks for that, editing a dummy file which simply points to my master document file. One day…
  • I can’t seem to get references to labels in other files of the same book to work. One day…
  • Doing anything to the *toc* (refreshing, for example) always seems to split the screen. Just grin and bear it.

Summing up

Emacs is a fantastic editing system, and I’m gradually moving all my editing over to it from Notepad++ (something I never imagined doing). I confess to feeling a bit dizzy with all the new key combinations (I sometimes try to close other things with Ctrl-X Ctrl-C), but I’m really overjoyed at having made the move. I know Emacs isn’t for everyone, but if you’re not completely satisfied with your current editor, you really should consider it.

Filed under Editors, Workflow

A new open font: Adobe Source Sans Pro

2012-08-03 by . 6 comments

Using TeX is about more than just the TeX document itself: fonts are a big part of producing high quality documents. One of the issues facing all fans of typography is the availability of fonts. Many professionally-produced offerings are expensive, and have licenses which are restrictive. Of course, there are some notable exceptions, with a number of excellent ‘free’ (as in speech) fonts available. Probably most notable to TeX users in the latter category are those from the Latin Modern/TeX Gyre Project.

Probably the biggest single player in pushing free font development is Google, but their focus is of course more on web technologies than typesetting. There’s now another notable entry in the open source font arena: Adobe. They have just released Source Sans Pro, which as you’ll guess from the name is a sanserif font. Currently, there are no small caps and no Greek or Cyrillic, but it does have old-style and table numerals, and superscript letters: check out the full coverage. (There’s no math support either, but we’ll let them off as that is seriously hard work.) The blog entry announcing the font suggests that there will be a matching monospaced variant in time.

As a demo of the new font, and to show off some TeX, Brent Longborough has put together a reproduction of the front page of Tschichold‘s Elementare Typographie using Source Sans Pro for XeLaTeX. This exploits the LaTeX3 coffins concept, and even takes accounts of side bearings using some code from TeX-sx. As the aim here is to show off the font, first we’ll see the result

then the code

% !TEX TS-program = XeLaTeX
\documentclass{article}
\usepackage[a4paper,margin=1pt]{geometry}
\usepackage{fontspec,xcoffins,xcolor,xparse}
\setsansfont{Source Sans Pro}
\pagestyle{empty}
\NewDocumentCommand{\kright}{m}{%
  \leavevmode
  #1%
  \kern-\XeTeXglyphbounds3 %
  \the\XeTeXcharglyph`#1 %
}
\NewDocumentCommand{\kleft}{m}{%
  \leavevmode
  \kern-\XeTeXglyphbounds1 %
  \the\XeTeXcharglyph`#1 %
  #1%
}
\pagestyle{empty}
\NewCoffin \result
\NewCoffin \aaa
\NewCoffin \bbb
\NewCoffin \ccc
\NewCoffin \ddd
\NewCoffin \eee
\NewCoffin \fff
\NewCoffin \rulei 
\NewCoffin \ruleii
\NewCoffin \ruleiii 
\begin{document}
\SetHorizontalCoffin \result {}
\SetHorizontalCoffin \aaa
  {\fontsize{52}{50}\sffamily\bfseries \kleft{m}itteilunge\kright{n}}
\SetHorizontalCoffin \bbb
  {\fontsize{52}{50}\sffamily\bfseries \kleft{t}ypographisch\kright{e}}
\SetHorizontalCoffin \ccc
  {\fontsize{12}{10}\sffamily 
                      \quad zeitschrift des bildungsverbandes der
                      deutschen buchdrucker leipzig 
                     \textbullet{} oktoberheft 1925}
\SetHorizontalCoffin \ddd {\fontsize{28}{20}\sffamily sonderheft}
\SetVerticalCoffin \eee {180pt}
                 {\raggedleft\fontsize{31}{31}\sffamily\bfseries 
                      elementare\\
                      typographie}
\SetVerticalCoffin \fff {140pt}
                 {\raggedright \fontsize{13}{14}\sffamily\bfseries 
                       natan altman \\
                       otto baumberger \\
                       herbert mayer \\
                       max burchartz \\
                       el lissitzky \\
                       ladislaus moholy-nagy \\
                       moln\'ar f.~farkas \\
                       johannes molzahn \\
                       kurt schwitters \\
                       mart stam \\
                       ivan tschichold}
% ------------------------------------------     
\RotateCoffin \bbb {90}
\RotateCoffin \ccc {270}
% ------------------------------------------     
\SetHorizontalCoffin \rulei  {\color{red}\rule{6.5in}{1pc}}
\SetHorizontalCoffin \ruleii {\color{red}\rule{1pc}{23.5cm}}
\SetHorizontalCoffin \ruleiii{\color{black}\rule{10pt}{152pt}}
% ------------------------------------------         
\JoinCoffins \result                \aaa 
\JoinCoffins \result[\aaa-t,\aaa-r] \rulei   [b,r](0pt,2mm)
\JoinCoffins \result[\aaa-b,\aaa-l] \bbb     [B,r](0pt,0pt)
\JoinCoffins \result[\bbb-t,\bbb-r] \ruleii  [t,r](-2mm,0pt)
\JoinCoffins \result[\aaa-B,\aaa-r] \ccc     [B,l](66pt,14pc)
\JoinCoffins \result[\bbb-l,\ccc-B] \fff     [t,r](-2mm,0pt)
\JoinCoffins \result[\fff-b,\fff-r] \ruleiii [b,l](2mm,0pt)
\JoinCoffins \result[\ccc-r,\fff-l] \eee     [B,r]
\JoinCoffins \result[\eee-T,\eee-r] \ddd     [B,r](0pt,4pc)
% ------------------------------------------     
\noindent\TypesetCoffin \result
% ------------------------------------------     
\end{document}

I think you’ll agree it’s a useful addition to the open source font library.

Filed under Uncategorized

To the victor, the potatoes

2012-06-30 by . 0 comments

I remember when I wrote my first application. I was young and inexperienced – an unskilled programmer trying to learn the ways of the Force. The code – ah the code! – was a real mess. But hey, the application was up and running. And I was happy to make things work.

At some point, I got interested in opensource. It was way stronger than me. But how would I embrace the cause? I’m not a perfectionist, but I knew my code – at that moment – was bad, and I was afraid of being ridiculed because of it. Reluctantly, I took the first step and published my first code in the wild.

Get ready for the most random quote ever posted in our community blog. It’s from a Pokémon game: “You’re a rookie trainer, aren’t you? I can tell! That’s OK! Everyone is a rookie at some point!” Truer words were never spoken.

We only gain experience with time. Time helps us write better code. More than that: time helps us be better people.

No man is an island. Living in a very competitive world, we sometimes forget about our neighbour. The daily routine sometimes makes us close our eyes to others. We can’t let that happen to us. Helping other people in their journey – even a simple “good morning, have a nice day!” – frees us from the indifference and apathy of a typical cold-blooded human. And – believe me! – makes us better people.

The title for this blog post might be a little strange. It’s a famous passage from Quincas Borba, a novel by the Brazilian novelist Joaquim Maria Machado de Assis. Machado de Assis is surely amongst the great writers of all time. When I was a kid, we had to read at least one of his books for a literature class. And I picked that one. The full passage is as follows, a jewel of the Machadian literature:

Imagine a field of potatoes and two starving tribes. There are only enough potatoes to feed one of the tribes, who in that way will get the strength to cross the mountain and reach the other slope, where there are potatoes in abundance. But, if the two tribes peacefully divide up the potatoes from the field, they won’t derive sufficient nourishment and will die of starvation. Peace, in this case, is destruction; war is preservation. One of the tribes will exterminate the other and collect the spoils. This explains the joy of victory, anthems, cheers, public recompense, and all the other results of warlike action. If the nature of war were different, those demonstrations would never take place, for the real reason that man only commemorates and loves what he finds pleasant and advantageous, and for the reasonable motive that no person can canonize an action that actually destroys him. To the conquered, hate or compassion; to the victor, the potatoes.

In the novel, Quincas Borba is a philosopher who created a theory called Humanitism, which could be roughly summarized as the survival of the fittest. It’s a satire for both Comte’s Positivism and Darwin’s Natural Selection, a way of exposing the inhuman and unethical character of the survival of the fittest when applied to men.

I’ve been thinking of this question for a long time: should we share the potatoes? No.

We have something far more valuable to share than a mere potatoes: our knowledge. Sharing what we know gives everybody the chance of surviving. A community built with knowledge and valuing everyone in particular is healthier than a bunch of crumbs.

It’s been a privilege to be part of our TeX community. Everybody is welcome. And we try our best to make people feel that way. From a TeX newbie to an experienced TeXnician, everybody can help, either asking or answering questions. My great friend egreg brilliantly said that “without problems to solve the knowledge doesn’t improve”.

If you have any questions, please ask! Don’t be afraid. And if you can contribute to a question, either by answering it or even adding a comment, please do it. Everybody benefits from our actions, especially our community.

Help us make our community even better. Ask questions, write comments and answers, give advices, upload packages to CTAN, fork repositories, join a project, chat with other members. To the victor, the potatoes. To the wise, the community.

Filed under Advocacy, TeX.sx

Our first 100k+ user

2012-06-27 by . 7 comments

We have another great milestone in our beloved TeX community: our very first user to break the 100k barrier! Who? I’ll give you a hint:

more »

Filed under TeX.sx

TeXtalk: an interview with Andrew Stacey

2012-06-20 by . 0 comments

Welcome to the TeXtalk! We have a very special guest for today: our friend Andrew Stacey, a well-known member of our community, trusted user, 40k+ rep, 274 badges, and one of the resident TikZ experts. Get ready for this great interview! From this episode on, we are using the new interview format as discussed in our meta site. Hope you guys like it! :)

more »

Filed under Interviews

Representing TeX.SX in TeX and LaTeX Contests

Contests are a nice way of pursuing our TeX passion. We have an enjoyable competition, show our TeX skills and learn something new, while producing our contribution, and by seeing the results of other fellow TeXnicians. We already had a contest on TeX.SX, celebrating the first birthday of our site.

Contests are also a way to reach out to TeX users who did not visit our site yet: if such a contest happens somewhere else, and if we go there and show our skills.

Currently there’s one running on LaTeX-Community.org. LaTeX users are invited to write a small article, the best articles will be rewarded with a prize. Packt Publishing has sponsored two copies of the gnuplot Cookbook written by Lee Phillips for the winners. Matching the subject of the book, the topic of the contest is LaTeX and graphics.

The contest will close June 20th. So, there are some days left. Even small articles just like blog posts are very welcome. I would appreciate if some of our fellow TeX.SX users would join the competition. I know, we have very capable TeXnicians here on the site, also regarding the contest topic.

For more details about the competition and for a contact, have a look at the LaTeX Contest announcement.

Filed under Contests, LaTeX

The Hitch-Hiker’s Guide to LaTeX3

2012-05-23 by . 1 comments

Introduction

As with the original Hitch-Hiker’s Guide, this blog post won’t actually be all that useful to someone wanting to truly explore LaTeX3. It’s more of a “What I did on my holidays” kind of guide. I’ve recently had my first go at doing some coding with LaTeX3 and I thought it might be interesting to record my experiences.

The main site has certainly made me more aware of the LaTeX3 project. Familiarity, in this case, has not bred contempt but rather it has meant that LaTeX3 has seeped into my consciousness so that I’ve become vaguely familiar with it without ever actually having to think about it. Before this current experience then I had had a bit of exposure to LaTeX3 through making a few adaptations to the (most excellent) unicode-math package, but that was very definitely a case of “Monkey see, Monkey not really have a clue what he’s doing so it’s a million to one chance but it might just work.”. To really get to grips with something new, I need a problem to work on. Finally, along came a problem that I wanted to solve in TeX but which was very definitely a regular programming problem. So the prospect of doing it in ordinary TeX was too daunting to contemplate. For this problem, learning LaTeX3 seemed the lesser of two evils.

more »

Filed under LaTeX3