[O] How to customize option templates?
Hey there, is it possible to customize the option templates one can insert via `C-c C-e #' ? E.g. for productively composing letters it would be nice to have some of the listed options to be set differently from the default. Regards -- Frederik
Re: [O] How to customize option templates?
I just looked at `org-export-define-derived-backend' and saw all the org-koma-letter-* options -- this will ease most of the pain ;-) But I did not yet figure out how to set options like LATEX_CLASS_OPTIONS or how to use German language and smart quotes when composing a letter. Thanks and regards -- Frederik
[O] Feature request: Buffer Toc
Hey there! I wondered if it's possible to have the possibility to display a table of contents of the current org buffer. IMHO the way RefTeX solves this issue is quite nice: You press C-c = to have a new window containing a toc of your sections, subsections etc. and your references/labels. When you select an item and press RET the toc window vanishes and your cursor is relocated at the corresponding section. (the toc buffer has some other cool features, just try it and display the help menu) This is of course not a must-have feature, but just something of which I thought it could be a nice-to-have feature in the future... Thanks for the great work! Org-mode really changed my work flow for university stuff. Regards -- Frederik
Re: [O] Question to the list about csquotes
Am 11.07.2011 15:14, schrieb Bastien: Hi Nick, Thomas and Frederik, I've just sent a patch for this question: it sticks to the solution suggested in this thread, with minor variations. Thanks all for working out this simple solution! It defines a new `org-export-latex-quotes' variable -- please see the docstring. The default behavior reproduces the current behavior, so no one should be hurt in the process. Thanks for any feedback, Do I have to apply the patch to the development version or is 7.6 just fine? Thanks Regards -- Frederik
[O] LaTeX export: Problem with clipped tables
Hi there! I experience some problems when exporting clipped tables to LaTeX: The text in the fields doesn't get properly expanded, the `=' is not removed. Imagine the following table in org-mode: | on the one hand | on the other = | |-+-| | 15| 15| | some long tex= | Lorem ipsum d= | Exporting to LaTeX gives me: \begin{center} \begin{tabular}{ll} on the one handon the other =nd \\ \hline some long tex=line in this fieldLorem ipsum d=or sit \\ \end{tabular} \end{center} Strangely enough, when copying the LaTeX source from my emacs buffer into Thunderbird, the `=' disappear, and the text is correct... I use version 7.6. Any hints? Regards. -- Frederik
Re: [O] LaTex export: How to use `csquotes' and `\enquote{}'
Am 08.07.2011 04:09, schrieb Nick Dokos: Thomas S. Dyet...@tsdye.com wrote: Hi Nick, Good point. How about three new variables, org-export-latex-open-double-quotes, org-export-latex-close-double-quotes, and org-export-latex-single-quote? The regexp stuff could stay as hard code and the user would only be able to mess up what actually ends up being exported. That's a pretty good idea: simple implementation, no extra options, set-and-forget and it only affects the latex exporter. Tom, you win the jackpot: you'll have the patch ready by tomorrow? Nick I agree with Nick - simple and clean. What would be the purpose of the variable `org-export-latex-single-quote'? If you intend to support \enquote*{, then perhaps there should be an additional variable for the single closing quote (which would be `}' again...) Then you'd have four variables: org-export-latex-open-double-quotes org-export-latex-close-double-quotes org-export-latex-open-single-quote org-export-latex-close-single-quote But perhaps I'm misguided... Regards. All the best, Tom =20 Nick Dokosnicholas.do...@hp.com writes: Responses to Frederik and Tom inline. Frederikfreak.f...@gmail.com writes: Why not use one option for babel and another for csquotes? I thought of something like this: #+OPTIONS: babel:english,ngerman csquotes:autostyle,german=3Dguillemets I did suggest different options, one controlling babel and the other controlling csquotes. The problem with the above is that it is very LaTeX-specific: the options and their values have no meaning outside of that. I think that we should strive to use more generic options that would at least be usable by other export engines. Or is there any other reason why one would like to specify language opti= ons? Sadly I don't have the skills to suggest a patch... I definitely see Nick's point: simplicity is one of the most important features of org-mode. So a possible decision not to support csquotes is absolutely understandable. I'll be very surprised if there is no support for csquotes within a couple of weeks (maybe within a couple of days :-) ) The question is what form will it take? Thomas S. Dyet...@tsdye.com wrote: I'm wondering if a simpler solution than Nick's might be to replace the lists at the end of this code snippet with a variable, say org-export-latex-quote-mechanism. Initially, the variable would be set to the second list. If the user wanted something different, then the user would be responsible for setting the variable to the different quoting mechanism, whether it be \enquote{ or something else. The user would also be responsible for making sure the LaTeX packages needed to support the quoting mechanism were loaded and functional. =20 (defun org-export-latex-quotation-marks () Export quotation marks depending on language conventions. (let* ((lang (plist-get org-export-latex-options-plist :language)) (quote-rpl (if (equal lang fr) '((\\(\\s-\\)\ =C2=AB~) (\\(\\S-\\)\ ~=C2=BB) (\\(\\s-\\)' `)) '((\\(\\s-\\|[[(]\\)\ ``) (\\(\\S-\\)\ '') (\\(\\s-\\|(\\)' `) =20 This might provide Org-mode the flexibility needed to support csquotes, but also leave open the possibility of supporting other packages, as well. =20 Maybe - this is the kind of mechanism that is used for org-export-latex-classes for example, so there is definitely precedent. OTOH, the lists above look like hen scratchings (or line noise if you prefer, or -- I'll get in trouble for this -- Perl code :-)), so it would be easy to get things wrong if you have to cut-and-paste-and-edit which I think one would have to do to customize it: it's OK to expect *one* developer to get it right, but it's not OK to expect 100 users to get it right. So it might be simpler to implement, but I'm not sure it might be simpler to use. I've supported using existing mechanisms to implement new behavior before and not disturbing the existing structure too much (e.g. the revtex stuff that Sebastian Hoffert was (is?) working on). But if it leads to e.g. an implementation that befuddles users, then you end up with a flood of questions on the ML. So it's a balancing act. BTW, you mention the possibility of supporting other packages. I didn't find anything useful in the TeX FAQ but if there are csquotes-like packages that people commonly (or perhaps uncommonly) use then a survey of their capabilities might indicate the best way to go. Nick --=20 Thomas S. Dye http://www.tsdye.com -- Frederik
Re: [O] LaTex export: How to use `csquotes' and `\enquote{}'
Am 06.07.2011 22:20, schrieb Nick Dokos: The problem is the usual exponential growth of possibilities and how you manage them: if you read the babel manual and the csquotes manual and all the options that you can have, your head starts spinning (well, *my* head starts spinning). I tend to think of all the possibilities and despair over covering them all, whereas org-mode tends to make simplifying assumptions that will cover90% of the cases (if the simplifying assumptions are good ones). I think we need such an assumption here. Here are some points to keep in mind while working on a patch: o csquotes.sty is part of the texlive-latex-extra package on Ubuntu (and probably something similar on other Linux distros and possibly MacOS X - hunoz about Windoz?) In the Windows-world MikTeX is quite common, as far as I know. I use MikTeX on Windows and it installs packages one includes directly from the net if they aren't already installed. IMHO the csquotes package becomes more and more important. For example biblatex, which will become the successor of BibTeX, relies on csquotes, when using a language other than English. o the (LaTeX) babel package and csquotes have their own (different) conventions for specifying languages and dialects. In some cases, a single language can have multiple options for how to quote things. The proposal below explicitly does *not* deal with these complications. My initial reaction to how one would use csquotes was to use the +OPTIONS line, something like this: #+OPTIONS: enquote:t language:fr The language option would trigger the inclusion of the babel package with the (correct) language option (e.g. en - english, de - ngerman, fr - french, etc.) The enquote part would trigger 1) the inclusion of the csquotes package (and since you specify it explicitly, it is your responsibility to make sure that it be installed on your system) and 2) the translation of foo to \enquote{foo}. Without it, foo goes to ``foo'' no matter what the language is set to. Why not use one option for babel and another for csquotes? I thought of something like this: #+OPTIONS: babel:english,ngerman csquotes:autostyle,german=guillemets Or is there any other reason why one would like to specify language options? Sadly I don't have the skills to suggest a patch... I definitely see Nick's point: simplicity is one of the most important features of org-mode. So a possible decision not to support csquotes is absolutely understandable. Regards -- Frederik
Re: [O] LaTex export: How to use `csquotes' and `\enquote{}'
Hi Tom! It looks more cumbersome than it is in practice. You can use C-c C-l to add the link and depending on the length of the link type name, it can be very close to the same number of keystrokes you'd need for \enquote{}. During normal LaTex editing I never type `\enquote{}'. Of course I type and AucTeX automatically inserts `\enquote{' at the beginning of a word and `}' at the end of a word, depending on whether `csquotes' is loaded or not. Apparently someone tried a simple hack: http://osdir.com/ml/emacs-orgmode-gnu/2010-01/msg00681.html When I find the time I will try this... Thanks Regards. -- Frederik
Re: [O] LaTex export: How to use `csquotes' and `\enquote{}'
Apparently someone tried a simple hack: http://osdir.com/ml/emacs-orgmode-gnu/2010-01/msg00681.html When I find the time I will try this... I've tried the hack and for me this works pretty well. It's static but this doesn't really matter as I always stick to `csquotes' I think it shouldn't be too difficult to implement a new variable/switch whether the standard behaviour or the one provided by the hack is going to be used. One would only have to insert an additional if-clause in the defun the hack alters. Regards -- Frederik
Re: [O] LaTex export: How to use `csquotes' and `\enquote{}'
Hey Tom! One way to use \enquote in your LaTeX export is described here: http://orgmode.org/worg/org-tutorials/org-latex-export.html#sec-10-3 [[latex:enquote][Das ist ein Test]] will export as \enquote{Das ist ein Test}. Thanks for your hint. But this is a rather cumbersome way to quote text... It would be handy to have directly converted to enquote - this should be possible, because org-mode is obviously able to distinguish whether to use `` or '' at the beginning and at end of a word, respectively. Regards. -- Frederik
[O] LaTex export: How to use `csquotes' and `\enquote{}'
Hi there! I just started using org-mode - what a fantastic piece of software! Now I wonder how to make use of one of the best LaTeX-packages out there: `csquotes'. I figured out how to include the package in the header by altering the corresponding variable, but I didn't find any hint how to make use of the `\enquote' command provided by `csquotes'. I don't want my quotes to be quoted like this: ``Das ist ein Test'' but like this: \enquote{Das ist ein Test} I searched the web and found some feature requests on this list concerning `csquotes' but the documentation and worg don't mention this topic - except for http://orgmode.org/worg/org-faq.html where `csquotes' is included in a source code listing, but there is no further explanation. Is there a way to use `csquotes'? Any hints would be appreciated - Thanks regards -- Frederik