Re: [Orgmode] [BEAMER] make text fit in a slide
Hi Andrea, I use the following line to allow frame breaks #+BIND: org-beamer-frame-default-options "[allowframebreaks]" On Thu, Jan 20, 2011 at 6:51 AM, Andrea Crotti wrote: > Would it be possible with some trick to automatically make the font > resize when the frame doesn't fit in the slide? > > Or maybe would that be possible otherwise to split the slide in two > parts automatically? > > I always wondered how to do it but never really found out. > And how do I in general could have a section of text in a smaller font? > > > ___ > Emacs-orgmode mailing list > Please use `Reply All' to send replies to the list. > Emacs-orgmode@gnu.org > http://lists.gnu.org/mailman/listinfo/emacs-orgmode > -- Kind regards, Tian Qiu ___ Emacs-orgmode mailing list Please use `Reply All' to send replies to the list. Emacs-orgmode@gnu.org http://lists.gnu.org/mailman/listinfo/emacs-orgmode
Re: [Orgmode] How to reset timestamp format?
You can try (setq system-time-locale "C") On Tue, Jan 12, 2010 at 6:45 PM, Water Lin wrote: > > I am using Chinese system so if I insert timestamp by C-c . > > I will get timestamp about weekday in Chinese character. I want to use > English to express weekday, How can I set the language for timestamp? > > Thanks > > Water Lin > > -- > Water Lin's notes and pencils: http://en.waterlin.org > Email: water...@ymail.com > __ > Do You Yahoo!? > Tired of spam? Yahoo! Mail has the best spam protection around > http://mail.yahoo.com > > > > ___ > Emacs-orgmode mailing list > Please use `Reply All' to send replies to the list. > Emacs-orgmode@gnu.org > http://lists.gnu.org/mailman/listinfo/emacs-orgmode > -- Kind regards, Tian Qiu ___ Emacs-orgmode mailing list Please use `Reply All' to send replies to the list. Emacs-orgmode@gnu.org http://lists.gnu.org/mailman/listinfo/emacs-orgmode
Bug: [Orgmode] bug in latex export [6.34b]
Remember to cover the basics, that is, what you expected to happen and what in fact did happen. You don't know how to make a good report? See http://orgmode.org/manual/Feedback.html#Feedback Your bug report will be posted to the Org-mode mailing list. I exported the following example test.org to latex, the content between \begin{multicols}{2} and \end{multicols} hadn't been replaced with latex code. -test.org #-*- mode: org; coding: utf-8 -*- #+LATEX_HEADER: \usepackage{multicol} * title \begin{multicols}{2} ** subtitle 1. first 2. second \end{multicols} -end of test.org I got the following result -test.tex % Created 2010-01-15 Fri 13:51 \documentclass[11pt]{article} \usepackage[utf8]{inputenc} \usepackage[T1]{fontenc} \usepackage{graphicx} \usepackage{longtable} \usepackage{float} \usepackage{wrapfig} \usepackage{soul} \usepackage{amssymb} \usepackage{hyperref} \usepackage{multicol} \title{test} \author{} \date{15 January 2010} \begin{document} \maketitle \setcounter{tocdepth}{3} \tableofcontents \vspace*{1cm} \section{title} \label{sec-1} \begin{multicols}{2} ** subtitle 1. first 2. second \end{multicols} \end{document} -end of test.tex Emacs : GNU Emacs 23.1.90.1 (i386-mingw-nt5.1.2600) of 2009-12-16 on BREPNB Package: Org-mode version 6.34b current state: == (setq org-log-done t org-agenda-skip-scheduled-if-deadline-is-shown t org-export-latex-after-initial-vars-hook '(org-beamer-after-initial-vars) org-special-ctrl-a/e t org-agenda-files '("~/org/todo.org" "~/org/refile.org") org-startup-truncated nil org-agenda-skip-timestamp-if-done t org-after-todo-state-change-hook '(org-clock-out-if-current) org-agenda-text-search-extra-files '(agenda-archives) org-special-ctrl-k t org-export-latex-format-toc-function 'org-export-latex-format-toc-default org-agenda-skip-scheduled-if-done t org-latex-to-pdf-process '("xelatex -interaction nonstopmode %s" "xelatex -interaction nonstopmode %s") org-export-preprocess-hook '(org-export-blocks-preprocess org-export-bibtex-preprocess) org-agenda-diary-file "~/org/todo.org" org-tab-first-hook '(org-hide-block-toggle-maybe) org-src-mode-hook '(org-src-mode-configure-edit-buffer) org-confirm-shell-link-function 'yes-or-no-p org-export-first-hook '(org-beamer-initialize-open-trackers) org-clock-sound "d:/sound/Ringtone.mp3" org-todo-keywords '((sequence "TODO(t)" "WAIT(w@/!)" "FUTURE(f)" "|" "DONE(d!/!)" "NOTE(n@)" "CANCELED(c@/!)")) org-agenda-before-write-hook '(org-agenda-add-entry-text) org-default-notes-file "refile.org" org-directory "~/org/" org-cycle-hook '(org-cycle-hide-archived-subtrees org-cycle-hide-drawers org-cycle-show-empty-lines org-optimize-window-after-visibility-change) org-export-preprocess-before-normalizing-links-hook '(org-remove-file-link-modifiers) org-use-speed-commands t org-mode-hook '(turn-on-org-cdlatex (lambda nil (org-add-hook (quote change-major-mode-hook) (quote org-show-block-all) (quote append) (quote local))) (lambda nil (visual-line-mode 1) (auto-complete-mode 1) (auto-complete-mode-maybe))) org-agenda-ndays 1 org-refile-targets '((org-agenda-files :level . 1) (nil :level . 1)) org-confirm-elisp-link-function 'yes-or-no-p org-fast-tag-selection-single-key 'expert org-agenda-skip-deadline-if-done t org-deadline-string "DUE:" org-occur-hook '(org-first-headline-recenter) org-from-is-user-regexp nil org-export-preprocess-before-selecting-backend-code-hook '(org-beamer-select-beamer-code) org-remember-templates '(("todo" 116 "* TODO %?\n%U\n%a" nil bottom nil) ("note" 110 "* NOTE %?\n%U\n%a" "~/org/todo.archive" "Notes" nil) ("diary" 100 "* %t %?" "~/org/todo.org" date-tree) ("appointment" 97 "* %^T %^{Event} - %^{Place}\n%?\n%U" nil bottom nil)) org-export-latex-final-hook '(org-beamer-amend-header org-beamer-fix-toc org-beamer-auto-fragile-frames org-beamer-place-default-actions-for-lists) ) -- Kind regards, Tian Qiu ___ Emacs-orgmode mailing list Please use `Reply All' to send replies to the list. Emacs-orgmode@gnu.org http://lists.gnu.org/mailman/listinfo/emacs-orgmode
Re: [O] sitemap seems to cache old #+TITLE
Hi Louis, After modifying #+TITLE, you should press C-c C-c to tell orgmode the title part has been changed. On Fri, Mar 18, 2011 at 12:58 PM, wrote: > > At one point in the recent past I had a file org.org with > #+TITLE: LBM TCH KB Org > > Eventually I changed it to be > #+TITLE: KBorg > > no matter what I do, the generated sitemap pick up the old title. > > Is this cached somewhere? and how do I get it to change? > > Thanks in advance, > > Louis > > -- Kind regards, Tian Qiu
[Orgmode] show clock-out time in org-agenda-log-mode
I'm not sure whether this has been proposed. When I use org-agenda-mode with org-agenda-log-mode, the clock-out time isn't shown after the clock-in time. Is it possible to show the clock-out time like 11:00-12:00? -- Kind regards, Tian Qiu ___ Emacs-orgmode mailing list Remember: use `Reply All' to send replies to the list. Emacs-orgmode@gnu.org http://lists.gnu.org/mailman/listinfo/emacs-orgmode
Re: [Orgmode] show clock-out time in org-agenda-log-mode
On Tue, Jun 17, 2008 at 12:16 AM, Carsten Dominik <[EMAIL PROTECTED]> wrote: > Hi Tian, > On Jun 16, 2008, at 2:13 PM, [EMAIL PROTECTED] wrote: > > I'm not sure whether this has been proposed. > > When I use org-agenda-mode with org-agenda-log-mode, the clock-out > time isn't shown after the clock-in time. Is it possible to show the > clock-out time like 11:00-12:00? > > yes, I have wanted to do this for a long time, last time I tried I failed > to get this right. Thanks for triggering me again, I believe this time > around it works. > - Carsten > That will be great, thanks. And I also think this is a better way to find `unclock-out' items when reviewing. ___ Emacs-orgmode mailing list Remember: use `Reply All' to send replies to the list. Emacs-orgmode@gnu.org http://lists.gnu.org/mailman/listinfo/emacs-orgmode
[Orgmode] clocksum bug in agenda-view with log-mode on
I'm using 6.05 currently. I've found a problem with the clocksum function in agenda-view with log-mode. The following org file has two tasks with clock-time events: #+COLUMNS: %25ITEM(Task) %CLOCKSUM * TODO task1 :CLOCK: CLOCK: [2008-06-21 Sat 15:37]--[2008-06-21 Sat 16:37] => 1:00 CLOCK: [2008-06-22 Sun 19:37]--[2008-06-22 Sun 20:37] => 1:00 :END: * TODO task2 :CLOCK: CLOCK: [2008-06-22 Sun 18:00]--[2008-06-22 Sun 19:00] => 1:00 CLOCK: [2008-06-22 Sun 21:00]--[2008-06-22 Sun 22:00] => 1:00 :END: In the Agenda-View, the clocksum include more clock-time event for calculation, and it doesn't limit the calculation to the specific day in agenda-view. It shows like this: Task| CLOC | Day-agenda (W25): Sunday 22 June 2008 | 6:00 | TODO task2 | 2:00 | TODO task1 | 2:00 | TODO task2 | 2:00 | -- Kind regards, Tian Qiu ___ Emacs-orgmode mailing list Remember: use `Reply All' to send replies to the list. Emacs-orgmode@gnu.org http://lists.gnu.org/mailman/listinfo/emacs-orgmode
Re: [Orgmode] clocksum bug in agenda-view with log-mode on
Hi Carsten, Press `R' in the agenda is even better, thank you. BTW, after I posted this message, I tried to use Dynamic blocks and found `yesterday' doesn't work in #+BEGIN: clocktable :maxlevel 2 :scope file :block yesterday I had to use `today-1' to get it work. On Sun, Jun 22, 2008 at 10:08 PM, Carsten Dominik <[EMAIL PROTECTED]> wrote: > > Hi Tian, > > yes, this is known and documented in, item 3. > > http://orgmode.org/manual/Agenda-column-view.html#Agenda-column-view > > In column view, the clocksum of an entry is treated as a single property > that is > displayed by the agenda, without limiting the time shown to the agenda time > range. > > - Carsten > > On Jun 22, 2008, at 4:00 PM, [EMAIL PROTECTED] wrote: > >> I'm using 6.05 currently. >> >> I've found a problem with the clocksum function in agenda-view with >> log-mode. The following org file has two tasks with clock-time events: >> >> #+COLUMNS: %25ITEM(Task) %CLOCKSUM >> * TODO task1 >> :CLOCK: >> CLOCK: [2008-06-21 Sat 15:37]--[2008-06-21 Sat 16:37] => 1:00 >> CLOCK: [2008-06-22 Sun 19:37]--[2008-06-22 Sun 20:37] => 1:00 >> :END: >> * TODO task2 >> :CLOCK: >> CLOCK: [2008-06-22 Sun 18:00]--[2008-06-22 Sun 19:00] => 1:00 >> CLOCK: [2008-06-22 Sun 21:00]--[2008-06-22 Sun 22:00] => 1:00 >> :END: >> >> In the Agenda-View, the clocksum include more clock-time event for >> calculation, and it doesn't limit the calculation to the specific day in >> agenda-view. It shows like this: >> >> Task| CLOC | >> Day-agenda (W25): >> Sunday 22 June 2008 | 6:00 | >> TODO task2 | 2:00 | >> TODO task1 | 2:00 | >> TODO task2 | 2:00 | >> >> >> -- >> Kind regards, >> >> Tian Qiu >> >> >> ___ >> Emacs-orgmode mailing list >> Remember: use `Reply All' to send replies to the list. >> Emacs-orgmode@gnu.org >> http://lists.gnu.org/mailman/listinfo/emacs-orgmode > > -- Kind regards, Tian Qiu ___ Emacs-orgmode mailing list Remember: use `Reply All' to send replies to the list. Emacs-orgmode@gnu.org http://lists.gnu.org/mailman/listinfo/emacs-orgmode
[Orgmode] Bug with clock-out note left out of :CLOCK: drawer
Hi, I use `#+STARTUP: lognoteclock-out' to take notes when clock-out. When I clock-out for the first time, the note is layout just under the clock-out record. When I clock-in and clock-out the same item for the second time, the first note is left out of `:CLOCK:' drawer. -- Kind regards, Tian Qiu ___ Emacs-orgmode mailing list Remember: use `Reply All' to send replies to the list. Emacs-orgmode@gnu.org http://lists.gnu.org/mailman/listinfo/emacs-orgmode
Re: [Orgmode] feature request: face lock for important thing.
On Sat, Nov 22, 2008 at 8:27 PM, anhnmncb <[EMAIL PROTECTED]> wrote: > Sometimes I need to bold some item so it's more notiable, for example: > > * I need them to achieve it. > - a table which contents some important *items*. > > Here, I need to bold the items so when I see the list, "items" will be > more noticiable. Which version are you using? I'm using 6.13, which supports such feature. ___ Emacs-orgmode mailing list Remember: use `Reply All' to send replies to the list. Emacs-orgmode@gnu.org http://lists.gnu.org/mailman/listinfo/emacs-orgmode
[Orgmode] Bug - using Plain lists and Checkboxes in the same level
The file content is something like below example #+BEGIN_BLOCKQUOTE 1. a - [ ] b #+END_BLOCKQUOTE If I press Alt-Enter at the end of first line, I get #+BEGIN_BLOCKQUOTE 1. a 2. 3. [ ] b #+END_BLOCKQUOTE It seems that plain lists can not be mixed with checkboxes in the same level. The org-version is 6.13a. -- Kind regards, Tian Qiu ___ Emacs-orgmode mailing list Remember: use `Reply All' to send replies to the list. Emacs-orgmode@gnu.org http://lists.gnu.org/mailman/listinfo/emacs-orgmode
[O] #+CALL get the first row of output table lost when using latex export
Hi, I encounter a problem when I use #+CALL to create a table with latex export. The problem is that the first row of the table is missing, if the table is created with #+CALL. My Emacs version is GNU Emacs 24.4.3 (x86_64-apple-darwin13.4.0, Carbon Version 157 AppKit 1265.21) of 2014-11-04 on Atago.local. The Org-mode version is: 8.2.10 from orgmode.org homepage. I start emacs -q -l emacs.minimal, where emacs.minimal is #+BEGIN_EXAMPLE (add-to-list 'load-path (expand-file-name "~/myconfig/org-8.2.10/lisp")) (add-to-list 'auto-mode-alist '("\\.\\(org\\ |org_archive\\|txt\\)$" . org-mode)) (add-to-list 'load-path (expand-file-name "~/myconfig/org-8.2.10/contrib/lisp")) (org-babel-do-load-languages 'org-babel-load-languages '((python . t) (latex . t))) #+END_EXAMPLE The minimal table example is #+BEGIN_EXAMPLE #+NAME: t1 #+BEGIN_SRC python :exports results return [['A'],None,[2]] #+END_SRC #+CAPTION: T1 #+RESULTS: t1 #+NAME: t2 #+CALL: t1() :exports results #+CAPTION: T2 #+RESULTS: t2 #+END_EXAMPLE The latex output of Table T1 is: #+BEGIN_EXAMPLE \begin{table}[htb] \caption{T1} \centering \begin{tabular}{r} A\\ \hline 2\\ \end{tabular} \end{table} #+END_EXAMPLE The latex output of Table T2 is: #+BEGIN_EXAMPLE \begin{table}[htb] \caption{T2} \centering \begin{tabular}{r} 2\\ \end{tabular} \end{table} #+END_EXAMPLE Compare with the latex output of the two tables, the first row and the \hline in the first table is missing in the second one. Kind regards, Tian Qiu
Re: [O] #+CALL get the first row of output table lost when using latex export
Thank you, Charles. And =:colnames yes= does work here. But the results are the same when I evaluate t1 and t2 with `org-babel-execute-maybe'. When I take another try, new problem seems to occur. The test file is: #+BEGIN_EXAMPLE #+NAME: t1 #+BEGIN_SRC python :exports results return [['A'],None,[2],None,[3]] #+END_SRC #+CAPTION: T1 #+RESULTS: t1 #+NAME: t2 #+CALL: t1() :exports results #+CAPTION: T2 #+RESULTS: t2 #+END_EXAMPLE The results of `org-babel-execute-maybe' on t1 and t2 are identical: #+BEGIN_SRC org | A | |---| | 2 | |---| | 3 | #+END_SRC The relevant part of the latex output is: #+BEGIN_SRC latex \begin{table}[htb] \caption{T1} \centering \begin{tabular}{r} A\\ \hline 2\\ \hline 3\\ \end{tabular} \end{table} \begin{table}[htb] \caption{T2} \centering \begin{tabular}{r} A\\ 2\\ 3\\ \end{tabular} \end{table} #+END_SRC Both \hlines in Table T2 are missing. Kind regards, Tian Qiu On Sun, Nov 16, 2014 at 1:37 PM, Charles Berry wrote: > gmail.com> writes: > >> >> Hi, >> >> I encounter a problem when I use #+CALL to create a table with latex >> export. The problem is that the first row of the table is missing, if >> the table is created with #+CALL. >> > [deleted - setup info] > >> The minimal table example is >> >> #+BEGIN_EXAMPLE >> #+NAME: t1 >> #+BEGIN_SRC python :exports results >> return [['A'],None,[2]] >> #+END_SRC >> >> #+CAPTION: T1 >> #+RESULTS: t1 >> >> #+NAME: t2 >> #+CALL: t1() :exports results >> >> #+CAPTION: T2 >> #+RESULTS: t2 >> #+END_EXAMPLE >> > > This is not a latex issue per se. If you evaluate t2 with > > `org-babel-execute-maybe' > > the same thing will happen. > > org-babel-execute:python does its own formatting. #+CALL: OTOH passes > the results to babel. > > The workaround is to use > > #+CALL: t1() :colnames yes > > HTH, > > Chuck > > >
Re: [O] #+CALL get the first row of output table lost when using latex export
#+NAME: t2 #+CALL: t1() :exports results :hlines yes will give the right latex output, thank you! Kind regards, Tian Qiu On Mon, Nov 17, 2014 at 11:08 AM, Charles C. Berry wrote: > On Mon, 17 Nov 2014, iem...@gmail.com wrote: > >> Thank you, Charles. And =:colnames yes= does work here. But the >> results are the same when I evaluate t1 and t2 with >> `org-babel-execute-maybe'. >> >> When I take another try, new problem seems to occur. >> >> The test file is: >> #+BEGIN_EXAMPLE >> #+NAME: t1 >> #+BEGIN_SRC python :exports results >> return [['A'],None,[2],None,[3]] >> #+END_SRC >> >> #+CAPTION: T1 >> #+RESULTS: t1 >> >> #+NAME: t2 >> #+CALL: t1() :exports results >> >> #+CAPTION: T2 >> #+RESULTS: t2 >> #+END_EXAMPLE >> >> The results of `org-babel-execute-maybe' on t1 and t2 are identical: >> #+BEGIN_SRC org >> | A | >> |---| >> | 2 | >> |---| >> | 3 | >> #+END_SRC > > > Not in my world (unless you add `:hlines'). > > , > | #+NAME: t1 > | #+BEGIN_SRC python :exports results > | return [['A'],None,[2],None,[3]] > | #+END_SRC > | > | #+CAPTION: T1 > | #+RESULTS: t1 > | | A | > | |---| > | | 2 | > | |---| > | | 3 | > | > | #+NAME: t2 > | #+CALL: t1() :exports results > | > | #+CAPTION: T2 > | #+RESULTS: t2 > | | A | > | | 2 | > | | 3 | > ` > > > ob-python.el seems to be doing its own thing here. > > What you see in the second instance is the usual Babel output for a table. > > In my view this is a bug in ob-python.el. > > See: (info "(org) hlines") for the proper idiom. > > HTH, > > Chuck
[O] Something wrong with the src_python babel execution
Hi, I'm using GNU Emacs 24.4.4 (x86_64-apple-darwin13.4.0, Carbon Version 157 AppKit 1265.21) with Org-mode version 8.2.10 (8.2.10-29-g89a0ac-elpaplus). Example file: --8<---cut here---start->8--- #+BEGIN_SRC python :session test :exports none a = 0.55 #+END_SRC The result is src_python[:session test :results raw]{'${:.1f}$'.format(a)}. --8<---cut here---end--->8--- This used to execute without any problem. Now the related latex export is: --8<---cut here---start->8--- The result is \$'.format(a)\}. --8<---cut here---end--->8--- And there are the outputs in the *test* session: --8<---cut here---start->8--- >>> '${:.1f '${:.1f File "", line 1 '${:.1f ^ SyntaxError: EOL while scanning string literal --8<---cut here---end--->8--- Yours faithfully, Tian Qiu
Re: [O] Capture abort: (user-error Can't preview LaTeX fragment in a non-file buffer)
On Wed, Sep 30, 2015 at 3:22 PM, Fanpeng Kong wrote: > Hi all, > > I tried to setup my org-mode according to Bernt Hansen’s wonderful > documentation: > > http://doc.norang.ca/org-mode.html#Capture > > But later I found I got problem with Org Capture as in Section 6. when I > typed C-c c, an error message "Capture abort: (user-error Can't preview > LaTeX fragment in a non-file buffer)” occured. After lots of search on the > web I still can not solve it. I am wondering is there anyone can help me > out? Thanks in advance! Maybe you should type C-c C-c to finish the capture. > Things I have tried: > 1. Test Latex preview in org file: > http://orgmode.org/worg/org-tutorials/org-latex-preview.html > Both “dvipng” and “imagemagick” setup methods work fine, I can preview Latex > formula in .org file. > > 2. Use the method described here: > http://orgmode.org/cgit.cgi/org-mode.git/commit/?id=168c5584f5a41c4c0890f4caa89fc11cff021c4e > I replace my “org-mode” package with the one in the link which is supposed > to solve the problem, however, I still got the same error message. > > Versions of some packages I am using: > 1. Emacs: GNU Emacs 24.4.1 (x86_64-apple-darwin13.4.0, NS > apple-appkit-1265.21) of 2014-10-21 on builder10-9.porkrind.org > 2. AucTeX: 11.88.8 > 3. org-mode: Org-mode version 8.3.1 (8.3.1-146-gfd8a18-elpa @ > /Users/xiaok/.emacs.d/elpa/org-20150928/) > > Cheers, > Fanpeng > > > > > > > > -- Yours faithfully, Tian Qiu
Re: [O] Resolving conflicts with ediff and folding
I have the following lisp code can do the trick: (add-hook 'ediff-quit-hook (lambda () (cond ((eq major-mode 'org-mode) (visible-mode 0) -- Tian Qiu On Tue, Apr 28, 2015 at 5:43 PM Sebastien Vauban wrote: > J. David Boyd wrote: > > "Charles C. Berry" writes: > >> On Tue, 21 Apr 2015, Suvayu Ali wrote: > >>> > >>> Something that has been bugging me for many years now, everytime > >>> I resolve conflicts in Org files with ediff, it's a pain. All the > >>> buffers keep folding the outlines, hiding the conflicts. I keep > >>> going to the buffers manually (which can be somewhat of a pain in > >>> a text terminal), and unfolding them manually. But of course the > >>> PROPERTY drawers, LOGBOOKs, and other DRAWERs are still folded! > >>> > >>> And then after I have jumped through hoops, and resolved the > >>> conflicts, I realise I could have just switched to text-mode before > >>> invoking ediff! > >>> > >>> Is there a way where I don't have to remember to switch the major > >>> mode before invoking ediff[1]? Or maybe an ediff experience where > >>> the buffers are forced to unhide text. I guess it should be > >>> possible to just temporarily remove all overlays or invisible > >>> properties. > >>> > >>> Any thoughts, ideas? > >> > >> Did you see this thread: > >> http://lists.gnu.org/archive/html/emacs-orgmode/2013-04/msg00400.html > >> ?? > > > > That't what I was going to say. I added that to my setup long ago, > > and it has been working fine since then. I don't ediff all that > > often, but when I do it certainly helps. > > The only (tiny) problem is that the `truncate-lines' and `visible-mode' > settings stay in the buffer after the Ediff session -- while one would > love to get back to the original settings of the buffer.c > > Best regards, > Seb > > -- > Sebastien Vauban > >
Re: [O] indentation error in python source block
On Fri, Nov 9, 2018 at 11:52 AM Seb wrote: > > Hello, > > I believe I've hit a strange bug. Given this file: > > ------ > #+STARTUP: content indent hideblocks > #+PROPERTY: header-args :tangle yes > #+PROPERTY: header-args:python :session *Python* > > #+NAME: python_init > #+BEGIN_SRC python :results silent :exports none > import matplotlib as mpl > mpl.use("Agg") > import matplotlib.pyplot as plt > import numpy as np > import pandas as pd > #+END_SRC > > #+NAME: test > #+BEGIN_SRC python :results file :exports results > beg = ["2017-07-13 15:27:31", "2017-07-13 15:28:24"] > beg = pd.to_datetime(beg) > end = ["2017-07-13 15:28:03", "2017-07-13 15:28:57"] > end = pd.to_datetime(end) > pos = np.arange(1, 3).tolist() > experiment = pd.DataFrame(dict(index=np.arange(1, 3), >beg=beg, end=end, pos=pos)) > # Mid points > experiment["mid"] = (experiment["beg"] + > (experiment["end"] - experiment["beg"]) / 2) > fig, axs = plt.subplots(3, 1, sharex=True) > # Shade experiment periods > for idx, row in experiment.iterrows(): > for ax in axs: > ax.axvspan(row["beg"], row["end"], facecolor="0.5") How about adding an empty line here? > axs[0].annotate(row["pos"], (row["mid"], 1), ha="center", > xycoords=("data", "axes fraction")) > # TEMPORARY: limit to experiment periods > axs[0].set_xlim(experiment["beg"].iloc[0], > experiment["end"].iloc[-1]) > fig.tight_layout() > fig.savefig("junk.png", bbox_inches="tight") > plt.close() > "junk.png" > #+END_SRC > --- --- > > Problem is in the second source block. With point on the #+BEGIN line, > hitting C-c to execute the block yields indentation errors in the > Python process (first one): > > --- --- > >>> experiment["end"].iloc[-1]) > File "", line 1 > axs[0].annotate(row["pos"], (row["mid"], 1), ha="center", > ^ > IndentationError: unexpected indent > --- --- > > Tangling the file and running the Python script shows no error at all. > Executing the source block from the dedicated buffer via C-c ' > (`org-edit-special') also runs without errors. What is going on? > > Thanks, > -- > Seb > > -- Yours faithfully, Tian Qiu
Re: [O] column in table fails to align for China's characters
Hello, On Fri, Jun 15, 2018 at 1:52 PM Van L wrote: > > > Thanks, > > > Table alignment assumes you are using a fixed-width font, which > > may or may not be possible with chinese characters. > > there is no monospaced font for combining parts of Unicode? > You can try https://github.com/tumashu/cnfonts to align columns in the table. -- Yours faithfully, Tian Qiu
Re: Hyphen after LaTeX fragments
Hi, You can write \(n\)-dimensional space. On Wed, Mar 15, 2023, 02:18 Yuchen Guo wrote: > Sometimes I encounter such texts: > >One of the useful features of a basis $B$ in an $n$-dimensional space > > When entered as-is in Org mode and exported to LaTeX, the string > "$n$-dimensional" is exported as plain text, as > > One of the useful features of a basis \(B\) in an \$n\$-dimensional space > > However, in cases such as "$n$;" and "$n$.", they are correctly exported > as "\(n\);" and "\(n\).". > > Are there any option to treat hypen the same as semicolon or full stop > in LaTeX exports? > > -- > Yuchen Guo > >