* Re: Comma-protection of Org blocks
@ 2011-03-27 9:32 Rustom Mody
0 siblings, 0 replies; 2+ messages in thread
From: Rustom Mody @ 2011-03-27 9:32 UTC (permalink / raw)
To: emacs-orgmode
Achim Gratz wrote
> The question really is if org hasn't evolved to the point where it needs
> a more general quoting/escaping mechanism.
+1
However there's caveat:
Just run
zgrep '\\\\\\\\\\\\\\\\' *.el.gz
on your emacs' el.gz files and you will find that its not empty -- So
general and convenient are somewhat at odds here :-)
Which is why python has triple-quoted strings, raw strings and what not...
^ permalink raw reply [flat|nested] 2+ messages in thread
* orgmode BEAMER scaling image
@ 2011-03-24 16:35 Gilberto
2011-03-24 19:18 ` Eric S Fraga
0 siblings, 1 reply; 2+ messages in thread
From: Gilberto @ 2011-03-24 16:35 UTC (permalink / raw)
To: emacs-orgmode
[-- Attachment #1: Type: text/plain, Size: 469 bytes --]
In his org-mode beamer tutorial, Eric Fraga (very useful tutorial BTW, thanks) gives an example of using an image, and writes
> I have added an attribute to the image to tell LaTeX to scale the image to the full width of the column.
Can I add a similar attribute to my images without having to tweak the .tex file? In other words, can I directly do that in org beamer mode?
Gilberto Conde
ah.gilberto.c@gmail.com
___________________________________
[-- Attachment #2: Type: text/html, Size: 2189 bytes --]
^ permalink raw reply [flat|nested] 2+ messages in thread
* Re: orgmode BEAMER scaling image 2011-03-24 16:35 orgmode BEAMER scaling image Gilberto @ 2011-03-24 19:18 ` Eric S Fraga [not found] ` <4D8BB89A.70908@gmail.com> 0 siblings, 1 reply; 2+ messages in thread From: Eric S Fraga @ 2011-03-24 19:18 UTC (permalink / raw) To: Gilberto; +Cc: emacs-orgmode Gilberto <ah.gilberto.c@gmail.com> writes: > In his org-mode beamer tutorial, Eric Fraga (very useful tutorial BTW, > thanks) gives an example of using an image, and writes You're very welcome! > >> I have added an attribute to the image to tell LaTeX to scale the >> image to the full width of the column. > > > Can I add a similar attribute to my images without having to tweak the > .tex file? In other words, can I directly do that in org beamer mode? John Hendy has already answered but I guess you are implying that the tutorial on Worg is not clear about how that is done. The example code snippet has the #+ATTR_LATEX line in it. I guess I should be more explicit in the text? Thanks for highlighting this! -- : Eric S Fraga (GnuPG: 0xC89193D8FFFCF67D) in Emacs 24.0.50.1 : using Org-mode version 7.5 (release_7.5.113.g9010a.dirty) ^ permalink raw reply [flat|nested] 2+ messages in thread
[parent not found: <4D8BB89A.70908@gmail.com>]
[parent not found: <874o6rwjox.fsf@pinto.chemeng.ucl.ac.uk>]
[parent not found: <4D8CC930.9050201@gmail.com>]
* [bug] Problem with Worg (html?) publishing (was Re: orgmode BEAMER scaling image) [not found] ` <4D8CC930.9050201@gmail.com> @ 2011-03-25 19:24 ` Eric S Fraga 2011-03-25 21:00 ` Comma-protection of Org blocks (was: [bug] Problem with Worg (html?) publishing) Sébastien Vauban 0 siblings, 1 reply; 2+ messages in thread From: Eric S Fraga @ 2011-03-25 19:24 UTC (permalink / raw) To: Gilberto; +Cc: Emacs Org mode mailing list Gilberto <ah.gilberto.c@gmail.com> writes: > That should help, but the thing is that the >> |#+ATTR_LATEX| line > is missing from the example: >> *** A screenshot :BMCOL:B_example: >> :PROPERTIES: >> :BEAMER_col: 0.6 >> :BEAMER_env: example >> :END: >> [[file://../../images/org-beamer/a-simple-slide.png]] > It'd be great if you could add it. > I promise I'll check how to contribute to Worg so I can give a hand in > situtations like this. > > Gilberto Ah, this is a problem with the publishing of Worg as the original org file on Worg has the line. Thanks for noticing this. I have cc-ed the org list. For the list: In the org-beamer tutorial (Worg/org-tutorials/org-beamer/tutorial.org), I have the following: ,---- | | #+BEGIN_Example | ,** Two columns | | ,*** A block :B_ignoreheading:BMCOL: | :PROPERTIES: | :BEAMER_env: ignoreheading | :BEAMER_col: 0.4 | :END: | - this slide consists of two columns | - the first (left) column has no heading and consists of text | - the second (right) column has an image and is enclosed in an | @example@ block | | ,*** A screenshot :BMCOL:B_example: | :PROPERTIES: | :BEAMER_col: 0.6 | :BEAMER_env: example | :END: | , #+ATTR_LATEX: width=\textwidth | [[file://../../images/org-beamer/a-simple-slide.png]] | #+END_Example `---- Note the second last line of the example which sets the latex attribute for the following image. On export to HTML for publishing on the Worg website, this line has magically *disappeared*! The ',' is supposed to protect this line but instead it disappears. I have gone through the whole tutorial and this is the only line that has disappeared. My intuition is that the HTML export is ignoring all LATEX attribute lines (as it should) but that maybe the regex for is rather greedy? However, I have looked at the code but have not seen anywhere obvious where this happens -- all the regexs I found seem to be pinned at the start of the line with only whitespace allowed before the #+. I'll leave this for the exports methinks... -- : Eric S Fraga (GnuPG: 0xC89193D8FFFCF67D) in Emacs 24.0.50.1 : using Org-mode version 7.5 (release_7.5.115.g00134.dirty) ^ permalink raw reply [flat|nested] 2+ messages in thread
* Comma-protection of Org blocks (was: [bug] Problem with Worg (html?) publishing) 2011-03-25 19:24 ` [bug] Problem with Worg (html?) publishing (was Re: orgmode BEAMER scaling image) Eric S Fraga @ 2011-03-25 21:00 ` Sébastien Vauban 2011-03-26 8:49 ` Comma-protection of Org blocks Achim Gratz 0 siblings, 1 reply; 2+ messages in thread From: Sébastien Vauban @ 2011-03-25 21:00 UTC (permalink / raw) To: emacs-orgmode-mXXj517/zsQ Hi Eric (and Eric, and Dan, and ...), Eric S Fraga wrote: > In the org-beamer tutorial (Worg/org-tutorials/org-beamer/tutorial.org), > I have the following: > > ,---- > | > | #+BEGIN_Example > | ,** Two columns > | > | ,*** A block :B_ignoreheading:BMCOL: > | :PROPERTIES: > | :BEAMER_env: ignoreheading > | :BEAMER_col: 0.4 > | :END: > | - this slide consists of two columns > | - the first (left) column has no heading and consists of text > | - the second (right) column has an image and is enclosed in an > | @example@ block > | > | ,*** A screenshot :BMCOL:B_example: > | :PROPERTIES: > | :BEAMER_col: 0.6 > | :BEAMER_env: example > | :END: > | , #+ATTR_LATEX: width=\textwidth > | [[file://../../images/org-beamer/a-simple-slide.png]] > | #+END_Example > `---- > > Note the second last line of the example which sets the latex attribute > for the following image. On export to HTML for publishing on the Worg > website, this line has magically *disappeared*! The ',' is supposed to > protect this line but instead it disappears. This makes me think of a request I briefly discussed with Carsten and Bastien, the day of Fosdem. The "comma-protection" causes troubles when M-q comes into play. For the sake of clarity -- I hope --, an example (for my Isodoc letters in Org): * Body #+srcname: body #+begin_src org :results latex ,Ik ben het totaalbedrag van de omzet 2010 vergeten op te nemen. De ontbrekende ,gegeven voor mijn kleine onderneming is 0,00 EUR (nul euro). #+end_src * Composed letter :noexport: #+begin_src latex :noweb yes :tangle yes \documentclass[11pt]{isodoc} \begin{document} \letter[language=dutch,to={\firstname~\lastname\\\addressi\\\postcode~\town\\\country},openingcomma={,}]{% <<body()>> } \end{document} #+end_src The above "body" block is converted to LaTeX and its result is tangled into the Isodoc LaTeX letter (here, voluntary kept to an ultra-minimal). The prefix "," is not kept in the process, that's what is expected. But the trouble is if I press M-q, because I add words to the sentences directly in the whole Org buffer: pressing M-q will move all the leading "," everywhere in the text, and then they will be transported up to the TeX file. Not what I want. The above user mistake (pressing M-q, what puts the leading commas everywhere, letting them loose their initial meaning) -- is it really an error? -- would have had no impact (or much much less), would the prefix be a space, for example... Hence, questions: - would it be possible to replace the comma by something more neutral (maybe a space, or a non-breaking space for example) for HTML/LaTeX exports? - would it be possible to put the "protecting prefix" only when needed (automatic detection when TAB'ing), or let it be specified by the user? - is there maybe an alternative for the above Org/TeX problem (conversion + tangling)? Best regards, Seb -- Sébastien Vauban ^ permalink raw reply [flat|nested] 2+ messages in thread
* Re: Comma-protection of Org blocks 2011-03-25 21:00 ` Comma-protection of Org blocks (was: [bug] Problem with Worg (html?) publishing) Sébastien Vauban @ 2011-03-26 8:49 ` Achim Gratz 0 siblings, 0 replies; 2+ messages in thread From: Achim Gratz @ 2011-03-26 8:49 UTC (permalink / raw) To: emacs-orgmode Sébastien Vauban <wxhgmqzgwmuf@spammotel.com> writes: > Hence, questions: [...] The question really is if org hasn't evolved to the point where it needs a more general quoting/escaping mechanism. This might be one of the things to ponder during the upcoming exporter cleanup, but goes a bit beyond just exporting. Achim. -- +<[Q+ Matrix-12 WAVE#46+305 Neuron microQkb Andromeda XTk Blofeld]>+ SD adaptation for Waldorf microQ V2.22R2: http://Synth.Stromeko.net/Downloads.html#WaldorfSDada ^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2011-03-27 9:32 UTC | newest] Thread overview: 2+ messages (download: mbox.gz follow: Atom feed -- links below jump to the message on this page -- 2011-03-27 9:32 Comma-protection of Org blocks Rustom Mody -- strict thread matches above, loose matches on Subject: below -- 2011-03-24 16:35 orgmode BEAMER scaling image Gilberto 2011-03-24 19:18 ` Eric S Fraga [not found] ` <4D8BB89A.70908@gmail.com> [not found] ` <874o6rwjox.fsf@pinto.chemeng.ucl.ac.uk> [not found] ` <4D8CC930.9050201@gmail.com> 2011-03-25 19:24 ` [bug] Problem with Worg (html?) publishing (was Re: orgmode BEAMER scaling image) Eric S Fraga 2011-03-25 21:00 ` Comma-protection of Org blocks (was: [bug] Problem with Worg (html?) publishing) Sébastien Vauban 2011-03-26 8:49 ` Comma-protection of Org blocks Achim Gratz
Code repositories for project(s) associated with this public inbox https://git.savannah.gnu.org/cgit/emacs/org-mode.git This is a public inbox, see mirroring instructions for how to clone and mirror all data and code used for this inbox; as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).