From mboxrd@z Thu Jan 1 00:00:00 1970 From: John Hendy Subject: Re: Using orgmode to take "inline notes" for research Date: Tue, 12 Apr 2011 12:57:28 -0500 Message-ID: References: <80bp0iquxw.fsf@somewhere.org> <80lizkxy6j.fsf@somewhere.org> Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable Return-path: Received: from eggs.gnu.org ([140.186.70.92]:42402) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Q9hqE-0002u9-Ue for emacs-orgmode@gnu.org; Tue, 12 Apr 2011 13:57:32 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1Q9hqD-0007Es-Ib for emacs-orgmode@gnu.org; Tue, 12 Apr 2011 13:57:30 -0400 Received: from mail-bw0-f41.google.com ([209.85.214.41]:60835) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Q9hqD-0007EE-8J for emacs-orgmode@gnu.org; Tue, 12 Apr 2011 13:57:29 -0400 Received: by bwz17 with SMTP id 17so6543838bwz.0 for ; Tue, 12 Apr 2011 10:57:28 -0700 (PDT) In-Reply-To: List-Id: "General discussions about Org-mode." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org Sender: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org To: =?UTF-8?Q?S=C3=A9bastien_Vauban?= Cc: emacs-orgmode@gnu.org 2011/4/12 John Hendy : > 2011/4/12 John Hendy : >>> >>> Yes, you're right. You need the todonotes package. This is "standard" i= n my >>> private class, reason why I forgot about this link. >>> >>> Go and add it, you'll love it! >> >> Holy cow. I kind of ignored this as I didn't know what it did, then >> checked out todonotes and was blown away. This is amazing. >> >> ,--- >> | (latex "\\todo[inline]{\\textbf{\\textsf{%s %s}}\\linebreak{} %s}" >> | =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0'((unless (eq t= odo "") >> | =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0(= format "\\textsc{%s%s}" todo priority)) >> | =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0heading = content)) >> `--- >> >> A couple questions: >> - would you be able to even broadly tell me what the latex chunk is >> doing there? Is %s like the %s in python (and perhaps other >> programming languages)? I don't get where the third %s gets its value. >> In other words, it seems that one of them is the heading value and >> another is the content... but what does the third %s get it's value in >> the first line? >> --- Side note... maybe time for me to learn elisp? >> >> - I looked at the package and example and rather liked the side-page >> type for small little notes. Sooooo cool. But, alas, removing the >> '[inline]' gave me undefined control sequence errors. When I ran it >> from the .tex file directly, it kind of worked, but my little box was >> really smushed and off the page. I'm guessing that my desire for >> narrower page margins isn't helping (I have geometry setting hmargins >> to 2cm)? > > Confirmed: this does not play nicely with geometry. It's like the > package shifts things away from where tikz expects the text to be. As > I narrow the margins more and more, the lines that used to underline > the text stay the same length and just get farther and farther away > from actually underlining the text. Perhaps I'll just stick to inline > notes unless there's some way to tell todonotes the margin size? Sorry for the whiplash. This is *not* actually the case. todonotes plays fine with geometry, but since I was exporting directly from the .tex file, I needed to run pdflatex a few times until the lines re-found their home. Org-export must re-run a few times and take care of that. In any case, for future reference, this helps (I have this in my setupfile): ,--- | #+latex_header: \usepackage[text width=3DXcm]{todonotes} `--- This might be obvious to some (and is, now, to me since I realize it's using TikZ options), but I thought I'd add it for later-googlers' sakes. You can specify a width for the box to be exported and tailor it to your margins. Obviously, if your margins are narrower than your longest word, it won't work, regardless, and the text will spill over the todonote box. Also, I found a pretty cool post (here: http://jcl.posterous.com/latex-todonotes-and-margins) on temporarily making the page and margins bigger to accommodate the notes. For those using this just for notes, perhaps this isn't favorable if you want to print. But for pure markup... it's a pretty neat workaround -- just make your page as big as you need and add notes to your heart's content. I'll probably just stick to inline notes, but one other option is to shift the text to one side, for example like so: ,--- | #+LATEX_HEADER: \usepackage[left=3D1.5cm, right=3D3.5cm,vmargin=3D2.5cm]{= geometry} `--- So this gives you the equivalent of 2 x 2.5cm margins, but shifts it to one side so you can put notes on the right. Hope this helps someone down the road. Sebastien: my other questions re. how to interpret the code and inserting proper linebreaks are still of interest! Thanks! John > >> >> - Some of my notes are multi paragraphs, which I prefer non-indented >> and separated by a line break rather than no line break and indented. >> But when exported, multiple paragraphs just "stack up" with no line >> break. Can I add this to your format? >> >> >> Thanks again! What a neat package! >> >> >> John >> >>> >>> Best regards, >>> =C2=A0Seb >>> >>> -- >>> S=C3=A9bastien Vauban >>> >>> >>> >> >