emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
* scaling the text in the results block of some code chunk when exported using LaTeX
@ 2013-03-18 23:44 shripad sinari
  2013-03-19  0:26 ` Jay Kerns
  2013-03-19  0:57 ` Eric Abrahamsen
  0 siblings, 2 replies; 16+ messages in thread
From: shripad sinari @ 2013-03-18 23:44 UTC (permalink / raw)
  To: emacs-orgmode

[-- Attachment #1: Type: text/plain, Size: 1108 bytes --]

Hello all,
Is there a way to scale the text in the latex export of a results block
produced by a code chunk?

Here is the code chunk i am trying to evaluate and export:

#+BEGIN_SRC R :session :exports results :results output org replace :tangle
yes
  print(list.files(recursive = T, pattern = "*.xls*"))
#+END_SRC

This prints a list of filenames that are quite long. I need to preserve
them as is. Here is the results block:

#+END_SRC

#+Results:
#+BEGIN_SRC org
[1] "20130304 Some Spreadsheet/20130215 XXXXXXXXXXX_CB edited for sample
classification.xls"
[2] "20130304 Some Spreadsheet/20130215 XXXXXXXXXXX_CB edited for sample
classification.xls"
[4] "20130304 Some Spreadsheets/20130215 XXXXXXXXXXXXXXXX samples results
final.xlsx"
[5] "20130304 Some Spreadsheets/20130215 XXXXXXXXXXXXXXXX results
final_formatted.xlsx"
[6] "20130304 Some Spreadsheets/20130304 XXXXXXXXXXXXXXXX samples results
121109_Rep Aliqs Highlighted.xlsx"

#+END_SRC

Is there a way for me to define the scaling of the text within the results
block when this is exported  using latex?

Thank you and regards,

Shripad
Tucson, AZ

[-- Attachment #2: Type: text/html, Size: 1577 bytes --]

^ permalink raw reply	[flat|nested] 16+ messages in thread

* Re: scaling the text in the results block of some code chunk when exported using LaTeX
  2013-03-18 23:44 scaling the text in the results block of some code chunk when exported using LaTeX shripad sinari
@ 2013-03-19  0:26 ` Jay Kerns
  2013-03-19  1:07   ` Thomas S. Dye
  2013-03-19  0:57 ` Eric Abrahamsen
  1 sibling, 1 reply; 16+ messages in thread
From: Jay Kerns @ 2013-03-19  0:26 UTC (permalink / raw)
  To: shripad sinari; +Cc: emacs-orgmode

Hello Shripad,

On Mon, Mar 18, 2013 at 7:44 PM, shripad sinari
<shripad.sinari@gmail.com> wrote:

[snip]

> Is there a way for me to define the scaling of the text within the results
> block when this is exported  using latex?

[snip]


I don't know of a way to scale /within/ the code block, but does
this work instead?

#+NAME: foo
#+BEGIN_SRC R :session :exports results :results output org replace :tangle yes
print(list.files(recursive = T, pattern = "*.xls*"))
#+END_SRC

\scriptsize
#+RESULTS: foo
#+BEGIN_SRC org
[1] "20130304 Some Spreadsheet/20130215 XXXXXXXXXXX_CB edited for
sample classification.xls"
[2] "20130304 Some Spreadsheet/20130215 XXXXXXXXXXX_CB edited for
sample classification.xls"
[4] "20130304 Some Spreadsheets/20130215 XXXXXXXXXXXXXXXX samples
results final.xlsx"
[5] "20130304 Some Spreadsheets/20130215 XXXXXXXXXXXXXXXX results
final_formatted.xlsx"
[6] "20130304 Some Spreadsheets/20130304 XXXXXXXXXXXXXXXX samples
results 121109_Rep Aliqs Highlighted.xlsx"
#+END_SRC
\normalsize

I learned just yesterday that the 'naming code blocks' trick is very
handy for things like this.  Here is halfway through the thread where
this was discussed:

http://lists.gnu.org/archive/html/emacs-orgmode/2013-03/msg01268.html

See also John Hendy's comments later in the thread.

I hope this helps,

-- 
Jay

^ permalink raw reply	[flat|nested] 16+ messages in thread

* Re: scaling the text in the results block of some code chunk when exported using LaTeX
  2013-03-18 23:44 scaling the text in the results block of some code chunk when exported using LaTeX shripad sinari
  2013-03-19  0:26 ` Jay Kerns
@ 2013-03-19  0:57 ` Eric Abrahamsen
       [not found]   ` <CAA_SOTZwUcdvt4tbQTV5PLWxSE=C6vZ0k+bBEshHXG8FkFaK0g@mail.gmail.com>
  1 sibling, 1 reply; 16+ messages in thread
From: Eric Abrahamsen @ 2013-03-19  0:57 UTC (permalink / raw)
  To: emacs-orgmode

shripad sinari <shripad.sinari@gmail.com> writes:

> Hello all,
> Is there a way to scale the text in the latex export of a results
> block produced by a code chunk?
>
> Here is the code chunk i am trying to evaluate and export:
>
> #+BEGIN_SRC R :session :exports results :results output org replace :
> tangle yes
> print(list.files(recursive = T, pattern = "*.xls*"))
> #+END_SRC
>
> This prints a list of filenames that are quite long. I need to
> preserve them as is. Here is the results block:
>
> #+END_SRC
>
> #+Results:
> #+BEGIN_SRC org
> [1] "20130304 Some Spreadsheet/20130215 XXXXXXXXXXX_CB edited for
> sample classification.xls"
> [2] "20130304 Some Spreadsheet/20130215 XXXXXXXXXXX_CB edited for
> sample classification.xls"
> [4] "20130304 Some Spreadsheets/20130215 XXXXXXXXXXXXXXXX samples
> results final.xlsx"
> [5] "20130304 Some Spreadsheets/20130215 XXXXXXXXXXXXXXXX results
> final_formatted.xlsx"
> [6] "20130304 Some Spreadsheets/20130304 XXXXXXXXXXXXXXXX samples
> results 121109_Rep Aliqs Highlighted.xlsx"
>
> #+END_SRC
>
> Is there a way for me to define the scaling of the text within the
> results block when this is exported using latex?

Jay mentioned how to repeatably wrap the results in latex markup; I'd
look into the \resizebox in the graphicsx package to make sure the block
of filenames fits the page. Something like:

#+LATEX: \resizebox{\textwidth}{!}{%
#+RESULTS: foo
#+BEGIN_SRC org
etc...
#+END_SRC
#+LATEX: }

Untested, but something like that ought to work...

E

^ permalink raw reply	[flat|nested] 16+ messages in thread

* Re: scaling the text in the results block of some code chunk when exported using LaTeX
  2013-03-19  0:26 ` Jay Kerns
@ 2013-03-19  1:07   ` Thomas S. Dye
  2013-03-19  2:08     ` shripad sinari
  0 siblings, 1 reply; 16+ messages in thread
From: Thomas S. Dye @ 2013-03-19  1:07 UTC (permalink / raw)
  To: Jay Kerns; +Cc: shripad sinari, emacs-orgmode

Jay Kerns <gjkernsysu@gmail.com> writes:

> I don't know of a way to scale /within/ the code block, but does
> this work instead?
>
#+NAME: foo
#+BEGIN_SRC R :session :exports results :results output org replace :tangle yes
 cat("\\scriptsize")
 print(list.files(recursive = T, pattern = "*.xls*"))
 cat("\\normalsize")
#+END_SRC

hth,
Tom

-- 
Thomas S. Dye
http://www.tsdye.com

^ permalink raw reply	[flat|nested] 16+ messages in thread

* Re: scaling the text in the results block of some code chunk when exported using LaTeX
  2013-03-19  1:07   ` Thomas S. Dye
@ 2013-03-19  2:08     ` shripad sinari
  0 siblings, 0 replies; 16+ messages in thread
From: shripad sinari @ 2013-03-19  2:08 UTC (permalink / raw)
  To: Thomas S. Dye; +Cc: emacs-orgmode, Jay Kerns

[-- Attachment #1: Type: text/plain, Size: 638 bytes --]

Thanks you all for the suggestions! Let me try out the suggestions and I
will report back on what worked.
Thanks again!
Shripad.

Shripad
Tucson, AZ


On Mon, Mar 18, 2013 at 6:07 PM, Thomas S. Dye <tsd@tsdye.com> wrote:

> Jay Kerns <gjkernsysu@gmail.com> writes:
>
> > I don't know of a way to scale /within/ the code block, but does
> > this work instead?
> >
> #+NAME: foo
> #+BEGIN_SRC R :session :exports results :results output org replace
> :tangle yes
>  cat("\\scriptsize")
>  print(list.files(recursive = T, pattern = "*.xls*"))
>  cat("\\normalsize")
> #+END_SRC
>
> hth,
> Tom
>
> --
> Thomas S. Dye
> http://www.tsdye.com
>

[-- Attachment #2: Type: text/html, Size: 1323 bytes --]

^ permalink raw reply	[flat|nested] 16+ messages in thread

* Re: scaling the text in the results block of some code chunk when exported using LaTeX
       [not found]         ` <87obdcverf.fsf@ericabrahamsen.net>
@ 2013-04-18  2:46           ` shripad sinari
  2013-04-18  3:13             ` John Hendy
  0 siblings, 1 reply; 16+ messages in thread
From: shripad sinari @ 2013-04-18  2:46 UTC (permalink / raw)
  To: Orgmode Mailing List

[-- Attachment #1: Type: text/plain, Size: 5287 bytes --]

Hello all,
A quick update. Only the named block solution from Jay Kerns currently
works. I have tried out variants of other proposed solutions here but none
worked.
Thanks for your help and sorry for the delay in getting back on this one.
Shripad.

Shripad
Tucson, AZ

Shripad
Tucson, AZ


On Wed, Apr 17, 2013 at 5:55 PM, Eric Abrahamsen <eric@ericabrahamsen.net>wrote:

> You only sent this to me! :)
>
> On 04/18/13 01:24 AM, shripad sinari wrote:
> > Hello all,
> > A quick update. Only the named block solution from Jay Kerns currently
> > works. I have tried out variants of other proposed solutions here but
> > none worked.
> > Thanks for your help and sorry for the delay in getting back on this
> > one.
> > Shripad.
> >
> > Shripad
> > Tucson, AZ
> >
> > On Wed, Mar 20, 2013 at 6:49 PM, Eric Abrahamsen
> > <eric@ericabrahamsen.net> wrote:
> >
> >     Hi Shripad,
> >
> >     My solution still requires named code blocks! That's the only way
> >     you
> >     can make sure the results are put where you want them: between
> >     certain
> >     Latex fragments.
> >
> >     I'm not quite understanding what's going wrong with what you
> >     pasted
> >     below -- do you mean that all the file names are prepended with
> >     ":"? In
> >     that case, try using "raw" instead of "verbatim" as a value for
> >     the
> >     :results key.
> >
> >     Good luck!
> >
> >     E
> >
> >
> >
> >     On 03/20/13 05:25 AM, shripad sinari wrote:
> >     > Hello Eric,
> >     > I am experimenting with your solution and I like it better than
> >     named
> >     > code blocks because it does not interfere with HTML or MD
> >     export.
> >     > However it is not working. Is there something like this that can
> >     be
> >     > done that you know of and how?
> >     >
> >     > #+RESULTS: Files
> >     > #+BEGIN_LaTeX \resizebox{\textwidth}{!}{%
> >     > [1] "Clinical spreadsheet_20130215 diabetes1212-v7_OT edited for
> >     > sample classification.xls"
> >     > [2] "Data spreadsheet_031813 Diabetes study samples set
> >     corrected_ALL
> >     > assays to date_OT.xlsx"
> >     > }
> >     > #+END_LaTeX
> >     >
> >     > because you solution currently produces this output.
> >     >
> >     > here is my code, I have tried the various arguments to the
> >     ":results"
> >     > plist as well:
> >     >
> >     > #+NAME: Files
> >     > #+BEGIN_SRC R :session :exports results :results value verbatim
> >     > replace :tangle yes
> >     > print(list.files(recursive = T, pattern = "*.xls*"))
> >     > #+END_SRC
> >     >
> >     > #+LATEX: \resizebox{\textwidth}{!}{%
> >     > #+RESULTS: Files
> >     > : Clinical spreadsheet_20130215 diabetes1212-v7_OT edited for
> >     sample
> >     > classification.xls
> >     > : Data spreadsheet_031813 Diabetes study samples set
> >     corrected_ALL
> >     > assays to date_OT.xlsx
> >     >
> >     > #+Latex: }
> >     >
> >     > Thanks for your help.
> >     >
> >     > Shripad
> >     > Tucson, AZ
> >     >
> >     > On Mon, Mar 18, 2013 at 5:57 PM, Eric Abrahamsen
> >     > <eric@ericabrahamsen.net> wrote:
> >     >
> >     >
> >     > shripad sinari <shripad.sinari@gmail.com> writes:
> >     >
> >     > > Hello all,
> >     > > Is there a way to scale the text in the latex export of a
> >     > results
> >     > > block produced by a code chunk?
> >     > >
> >     > > Here is the code chunk i am trying to evaluate and export:
> >     > >
> >     > > #+BEGIN_SRC R :session :exports results :results output org
> >     > replace :
> >     > > tangle yes
> >     > > print(list.files(recursive = T, pattern = "*.xls*"))
> >     > > #+END_SRC
> >     > >
> >     > > This prints a list of filenames that are quite long. I need to
> >     > > preserve them as is. Here is the results block:
> >     > >
> >     > > #+END_SRC
> >     > >
> >     > > #+Results:
> >     > > #+BEGIN_SRC org
> >     > > [1] "20130304 Some Spreadsheet/20130215 XXXXXXXXXXX_CB edited
> >     > for
> >     > > sample classification.xls"
> >     > > [2] "20130304 Some Spreadsheet/20130215 XXXXXXXXXXX_CB edited
> >     > for
> >     > > sample classification.xls"
> >     > > [4] "20130304 Some Spreadsheets/20130215 XXXXXXXXXXXXXXXX
> >     > samples
> >     > > results final.xlsx"
> >     > > [5] "20130304 Some Spreadsheets/20130215 XXXXXXXXXXXXXXXX
> >     > results
> >     > > final_formatted.xlsx"
> >     > > [6] "20130304 Some Spreadsheets/20130304 XXXXXXXXXXXXXXXX
> >     > samples
> >     > > results 121109_Rep Aliqs Highlighted.xlsx"
> >     > >
> >     > > #+END_SRC
> >     > >
> >     > > Is there a way for me to define the scaling of the text within
> >     > the
> >     > > results block when this is exported using latex?
> >     >
> >     >
> >     > Jay mentioned how to repeatably wrap the results in latex
> >     markup;
> >     > I'd
> >     > look into the \resizebox in the graphicsx package to make sure
> >     the
> >     > block
> >     > of filenames fits the page. Something like:
> >     >
> >     > #+LATEX: \resizebox{\textwidth}{!}{%
> >     > #+RESULTS: foo
> >     > #+BEGIN_SRC org
> >     > etc...
> >     > #+END_SRC
> >     > #+LATEX: }
> >     >
> >     > Untested, but something like that ought to work...
> >     >
> >     > E
> >     >
> >     >
> >
>

[-- Attachment #2: Type: text/html, Size: 7603 bytes --]

^ permalink raw reply	[flat|nested] 16+ messages in thread

* Re: scaling the text in the results block of some code chunk when exported using LaTeX
  2013-04-18  2:46           ` shripad sinari
@ 2013-04-18  3:13             ` John Hendy
  2013-04-18  3:43               ` shripad sinari
  2013-04-18  3:50               ` Eric Schulte
  0 siblings, 2 replies; 16+ messages in thread
From: John Hendy @ 2013-04-18  3:13 UTC (permalink / raw)
  To: shripad sinari; +Cc: Orgmode Mailing List

On Wed, Apr 17, 2013 at 9:46 PM, shripad sinari
<shripad.sinari@gmail.com> wrote:
> Hello all,
> A quick update. Only the named block solution from Jay Kerns currently
> works. I have tried out variants of other proposed solutions here but none
> worked.
> Thanks for your help and sorry for the delay in getting back on this one.
> Shripad.
>

I didn't really follow this thread, but I resize things a decent
amount, but not with \resizebox. It's true that you need named source
blocks so that after the first C-c C-c on the babel block, you can add
options and still have it recognized as the results container for that
particular block. Something like this:

#+name: test
#+begin_src R :exports results :results output :wrap latex

a <- 1:10
a

#+end_src

#+latex: \LARGE
#+RESULTS: test
#+BEGIN_latex
 [1]  1  2  3  4  5  6  7  8  9 10
#+END_latex
#+latex: \normalsize

I don't actually use the above that much, but tend to size plots
appropriately with something like the following, which is essentially
the same principle (how to pass latex options to the results of code
block results while having Org still recognize where to put updated
results):

#+begin_center
#+attr_latex: :width 8cm
#+RESULTS: test
[[file.pdf]]
#+end_center

Just thought I'd add another option...

John


> Shripad
> Tucson, AZ
>
> Shripad
> Tucson, AZ
>

^ permalink raw reply	[flat|nested] 16+ messages in thread

* Re: scaling the text in the results block of some code chunk when exported using LaTeX
  2013-04-18  3:13             ` John Hendy
@ 2013-04-18  3:43               ` shripad sinari
  2013-04-18  3:53                 ` John Hendy
  2013-04-18  3:50               ` Eric Schulte
  1 sibling, 1 reply; 16+ messages in thread
From: shripad sinari @ 2013-04-18  3:43 UTC (permalink / raw)
  To: John Hendy; +Cc: Orgmode Mailing List

[-- Attachment #1: Type: text/plain, Size: 1779 bytes --]

Hello John,
I have tried this with text but it does not seem to resize the text. Infact
what gets resized is the "#+RESULTS: test" and the rest of the stuff after
that to the #+end_center. It might work for images but does not for text.
Regards,
Shripad.

Shripad
Tucson, AZ


On Wed, Apr 17, 2013 at 8:13 PM, John Hendy <jw.hendy@gmail.com> wrote:

> On Wed, Apr 17, 2013 at 9:46 PM, shripad sinari
> <shripad.sinari@gmail.com> wrote:
> > Hello all,
> > A quick update. Only the named block solution from Jay Kerns currently
> > works. I have tried out variants of other proposed solutions here but
> none
> > worked.
> > Thanks for your help and sorry for the delay in getting back on this one.
> > Shripad.
> >
>
> I didn't really follow this thread, but I resize things a decent
> amount, but not with \resizebox. It's true that you need named source
> blocks so that after the first C-c C-c on the babel block, you can add
> options and still have it recognized as the results container for that
> particular block. Something like this:
>
> #+name: test
> #+begin_src R :exports results :results output :wrap latex
>
> a <- 1:10
> a
>
> #+end_src
>
> #+latex: \LARGE
> #+RESULTS: test
> #+BEGIN_latex
>  [1] 1 2 3 4 5 6 7 8 9 10
> #+END_latex
> #+latex: \normalsize
>
> I don't actually use the above that much, but tend to size plots
> appropriately with something like the following, which is essentially
> the same principle (how to pass latex options to the results of code
> block results while having Org still recognize where to put updated
> results):
>
> #+begin_center
> #+attr_latex: :width 8cm
> #+RESULTS: test
> [[file.pdf]]
> #+end_center
>
> Just thought I'd add another option...
>
> John
>
>
> > Shripad
> > Tucson, AZ
> >
> > Shripad
> > Tucson, AZ
> >
>

[-- Attachment #2: Type: text/html, Size: 2729 bytes --]

^ permalink raw reply	[flat|nested] 16+ messages in thread

* Re: scaling the text in the results block of some code chunk when exported using LaTeX
  2013-04-18  3:13             ` John Hendy
  2013-04-18  3:43               ` shripad sinari
@ 2013-04-18  3:50               ` Eric Schulte
  1 sibling, 0 replies; 16+ messages in thread
From: Eric Schulte @ 2013-04-18  3:50 UTC (permalink / raw)
  To: John Hendy; +Cc: shripad sinari, Orgmode Mailing List

>> Hello all,
>> A quick update. Only the named block solution from Jay Kerns currently
>> works. I have tried out variants of other proposed solutions here but none
>> worked.

One option I used recently was to resize *all* verbatim blocks using the
fancyvrb package.  The following export filter converts all "verbatim"
environments to "Verbatim" environments.

    (defun org-latex-filter-fancyvrb (text backend info)
      "Convert begin/end{verbatim} to begin/end{Verbatim}.
    Allows use of the fancyvrb latex package."
      (when (org-export-derived-backend-p backend 'latex)
        (replace-regexp-in-string
         "\\\\\\(begin\\|end\\){verbatim}"
         "\\\\\\1{Verbatim}"
         text)))

    (add-to-list 'org-export-filter-final-output-functions
                 'org-latex-filter-fancyvrb)

Then adding the following to the top of your file will change the font
size for these blocks.

    \usepackage{fancyvrb}
    \fvset{fontsize=\scriptsize}

Hope this helps,

-- 
Eric Schulte
http://cs.unm.edu/~eschulte

^ permalink raw reply	[flat|nested] 16+ messages in thread

* Re: scaling the text in the results block of some code chunk when exported using LaTeX
  2013-04-18  3:43               ` shripad sinari
@ 2013-04-18  3:53                 ` John Hendy
  2013-04-18  3:57                   ` shripad sinari
  0 siblings, 1 reply; 16+ messages in thread
From: John Hendy @ 2013-04-18  3:53 UTC (permalink / raw)
  To: shripad sinari; +Cc: Orgmode Mailing List

[-- Attachment #1: Type: text/plain, Size: 2236 bytes --]

On Wed, Apr 17, 2013 at 10:43 PM, shripad sinari
<shripad.sinari@gmail.com> wrote:
> Hello John,
> I have tried this with text but it does not seem to resize the text. Infact
> what gets resized is the "#+RESULTS: test" and the rest of the stuff after
> that to the #+end_center. It might work for images but does not for text.

You must have a setup or installation issue. See the attached .org and
resultant .pdf for me.

What's in your #+options line (or setupfile)? I'm wondering if you
don't have something like =tex:t= or =LaTeX:t= which might be required
to pass the commands through?


Best regards,
John


> Regards,
> Shripad.
>
> Shripad
> Tucson, AZ
>
>
> On Wed, Apr 17, 2013 at 8:13 PM, John Hendy <jw.hendy@gmail.com> wrote:
>>
>> On Wed, Apr 17, 2013 at 9:46 PM, shripad sinari
>> <shripad.sinari@gmail.com> wrote:
>> > Hello all,
>> > A quick update. Only the named block solution from Jay Kerns currently
>> > works. I have tried out variants of other proposed solutions here but
>> > none
>> > worked.
>> > Thanks for your help and sorry for the delay in getting back on this
>> > one.
>> > Shripad.
>> >
>>
>> I didn't really follow this thread, but I resize things a decent
>> amount, but not with \resizebox. It's true that you need named source
>> blocks so that after the first C-c C-c on the babel block, you can add
>> options and still have it recognized as the results container for that
>> particular block. Something like this:
>>
>> #+name: test
>> #+begin_src R :exports results :results output :wrap latex
>>
>> a <- 1:10
>> a
>>
>> #+end_src
>>
>> #+latex: \LARGE
>> #+RESULTS: test
>> #+BEGIN_latex
>>  [1] 1 2 3 4 5 6 7 8 9 10
>> #+END_latex
>> #+latex: \normalsize
>>
>> I don't actually use the above that much, but tend to size plots
>> appropriately with something like the following, which is essentially
>> the same principle (how to pass latex options to the results of code
>> block results while having Org still recognize where to put updated
>> results):
>>
>> #+begin_center
>> #+attr_latex: :width 8cm
>> #+RESULTS: test
>> [[file.pdf]]
>> #+end_center
>>
>> Just thought I'd add another option...
>>
>> John
>>
>>
>> > Shripad
>> > Tucson, AZ
>> >
>> > Shripad
>> > Tucson, AZ
>> >
>
>

[-- Attachment #2: test.org --]
[-- Type: application/octet-stream, Size: 666 bytes --]

#+options: tex:t ^:t LaTeX:t

* Normal

#+name: normal
#+begin_src R :exports results :results output :wrap latex

a <- 1:10
a

#+end_src

#+RESULTS: normal
#+BEGIN_latex
 [1]  1  2  3  4  5  6  7  8  9 10
#+END_latex




* LARGE

#+name: LARGE
#+begin_src R :exports results :results output :wrap latex

a <- 1:10
a

#+end_src

#+latex: \LARGE
#+RESULTS: LARGE
#+BEGIN_latex
 [1]  1  2  3  4  5  6  7  8  9 10
#+END_latex
#+latex: \normalsize



* Tiny

#+name: tiny
#+begin_src R :exports results :results output :wrap latex

a <- 1:10
a

#+end_src

#+latex: \tiny
#+RESULTS: tiny
#+BEGIN_latex
 [1]  1  2  3  4  5  6  7  8  9 10
#+END_latex
#+latex: \normalsize


[-- Attachment #3: test.pdf --]
[-- Type: application/pdf, Size: 82804 bytes --]

^ permalink raw reply	[flat|nested] 16+ messages in thread

* Re: scaling the text in the results block of some code chunk when exported using LaTeX
  2013-04-18  3:53                 ` John Hendy
@ 2013-04-18  3:57                   ` shripad sinari
  2013-04-18  4:12                     ` shripad sinari
  2013-04-18  4:18                     ` John Hendy
  0 siblings, 2 replies; 16+ messages in thread
From: shripad sinari @ 2013-04-18  3:57 UTC (permalink / raw)
  To: John Hendy; +Cc: Orgmode Mailing List


[-- Attachment #1.1: Type: text/plain, Size: 2670 bytes --]

Hello John,
I am able to get your test.org to do size change but not my test file.
Please find it attached herewith. I am sure it is setup issue now.
Thanks,
Shripad.

Shripad
Tucson, AZ


On Wed, Apr 17, 2013 at 8:53 PM, John Hendy <jw.hendy@gmail.com> wrote:

> On Wed, Apr 17, 2013 at 10:43 PM, shripad sinari
> <shripad.sinari@gmail.com> wrote:
> > Hello John,
> > I have tried this with text but it does not seem to resize the text.
> Infact
> > what gets resized is the "#+RESULTS: test" and the rest of the stuff
> after
> > that to the #+end_center. It might work for images but does not for text.
>
> You must have a setup or installation issue. See the attached .org and
> resultant .pdf for me.
>
> What's in your #+options line (or setupfile)? I'm wondering if you
> don't have something like =tex:t= or =LaTeX:t= which might be required
> to pass the commands through?
>
>
> Best regards,
> John
>
>
> > Regards,
> > Shripad.
> >
> > Shripad
> > Tucson, AZ
> >
> >
> > On Wed, Apr 17, 2013 at 8:13 PM, John Hendy <jw.hendy@gmail.com> wrote:
> >>
> >> On Wed, Apr 17, 2013 at 9:46 PM, shripad sinari
> >> <shripad.sinari@gmail.com> wrote:
> >> > Hello all,
> >> > A quick update. Only the named block solution from Jay Kerns currently
> >> > works. I have tried out variants of other proposed solutions here but
> >> > none
> >> > worked.
> >> > Thanks for your help and sorry for the delay in getting back on this
> >> > one.
> >> > Shripad.
> >> >
> >>
> >> I didn't really follow this thread, but I resize things a decent
> >> amount, but not with \resizebox. It's true that you need named source
> >> blocks so that after the first C-c C-c on the babel block, you can add
> >> options and still have it recognized as the results container for that
> >> particular block. Something like this:
> >>
> >> #+name: test
> >> #+begin_src R :exports results :results output :wrap latex
> >>
> >> a <- 1:10
> >> a
> >>
> >> #+end_src
> >>
> >> #+latex: \LARGE
> >> #+RESULTS: test
> >> #+BEGIN_latex
> >>  [1] 1 2 3 4 5 6 7 8 9 10
> >> #+END_latex
> >> #+latex: \normalsize
> >>
> >> I don't actually use the above that much, but tend to size plots
> >> appropriately with something like the following, which is essentially
> >> the same principle (how to pass latex options to the results of code
> >> block results while having Org still recognize where to put updated
> >> results):
> >>
> >> #+begin_center
> >> #+attr_latex: :width 8cm
> >> #+RESULTS: test
> >> [[file.pdf]]
> >> #+end_center
> >>
> >> Just thought I'd add another option...
> >>
> >> John
> >>
> >>
> >> > Shripad
> >> > Tucson, AZ
> >> >
> >> > Shripad
> >> > Tucson, AZ
> >> >
> >
> >
>

[-- Attachment #1.2: Type: text/html, Size: 4146 bytes --]

[-- Attachment #2: t2.org --]
[-- Type: application/octet-stream, Size: 1125 bytes --]

#+TITLE:     *scratch*
#+AUTHOR:    Shripad Sinari
#+DATE:      2013-04-17 Wed
#+DESCRIPTION:
#+KEYWORDS:
#+LANGUAGE:  en
#+OPTIONS:   H:6 num:t toc:t \n:nil @:t ::t |:t ^:t -:t f:t *:t <:t
#+OPTIONS:   TeX:t LaTeX:t skip:nil d:nil todo:t pri:nil tags:not-in-toc
#+INFOJS_OPT: view:nil toc:nil ltoc:t mouse:underline buttons:0 path:http://orgmode.org/org-info.js
#+EXPORT_SELECT_TAGS: export
#+EXPORT_EXCLUDE_TAGS: noexport
#+LINK_UP:
#+LINK_HOME:
#+XSLT:


#+NAME: test1
#+BEGIN_SRC R :results output latex :exports results
  list.files(recursive=F)
#+END_SRC

#+BEGIN_CENTER
#+ATTR_LATEX: :width 20cm
#+RESULTS: test1
#+BEGIN_LaTeX
 [1] "Desktop"             "Documents"           "Downloads"
 [4] "Dropbox"             "Library"             "Mail"
 [7] "Movies"              "Music"               "MyDropBox"
[10] "News"                "Pictures"            "Public"
[13] "local"               "m.org"               "org"
[16] "org.ics"             "orgmode-accessories" "projects"
[19] "t2.html"             "t2.org"              "t2.pdf"
[22] "t2.tex"              "tools"               "worg"
#+END_LaTeX
#+END_CENTER


^ permalink raw reply	[flat|nested] 16+ messages in thread

* Re: scaling the text in the results block of some code chunk when exported using LaTeX
  2013-04-18  3:57                   ` shripad sinari
@ 2013-04-18  4:12                     ` shripad sinari
  2013-04-18  4:18                     ` John Hendy
  1 sibling, 0 replies; 16+ messages in thread
From: shripad sinari @ 2013-04-18  4:12 UTC (permalink / raw)
  To: John Hendy; +Cc: Orgmode Mailing List

[-- Attachment #1: Type: text/plain, Size: 4506 bytes --]

Hello John,
I think I figured out what the issue is. Whenever I have the code chunks
outside a headline for example:

### This does not work ###

#+TITLE:     *scratch*
#+AUTHOR:    Shripad Sinari
#+DATE:      2013-04-17 Wed
#+DESCRIPTION:
#+KEYWORDS:
#+LANGUAGE:  en
#+OPTIONS:   H:6 num:t toc:t \n:nil @:t ::t |:t ^:t -:t f:t *:t <:t
#+OPTIONS:   TeX:t LaTeX:t skip:nil d:nil todo:t pri:nil tags:not-in-toc
#+INFOJS_OPT: view:nil toc:nil ltoc:t mouse:underline buttons:0 path:
http://orgmode.org/org-info.js
#+EXPORT_SELECT_TAGS: export
#+EXPORT_EXCLUDE_TAGS: noexport
#+LINK_UP:
#+LINK_HOME:
#+XSLT:


#+NAME: test1
#+BEGIN_SRC R :results output latex :exports results
  a <- 1:10
  a
#+END_SRC


#+LATEX: \tiny
#+RESULTS: test1
#+LATEX: \normalsize

############################

However just placing the code chunks under a headline works:

#### The following works ####
#+TITLE:     *scratch*
#+AUTHOR:    Shripad Sinari
#+DATE:      2013-04-17 Wed
#+DESCRIPTION:
#+KEYWORDS:
#+LANGUAGE:  en
#+OPTIONS:   H:6 num:t toc:t \n:nil @:t ::t |:t ^:t -:t f:t *:t <:t
#+OPTIONS:   TeX:t LaTeX:t skip:nil d:nil todo:t pri:nil tags:not-in-toc
#+INFOJS_OPT: view:nil toc:nil ltoc:t mouse:underline buttons:0 path:
http://orgmode.org/org-info.js
#+EXPORT_SELECT_TAGS: export
#+EXPORT_EXCLUDE_TAGS: noexport
#+LINK_UP:
#+LINK_HOME:
#+XSLT:

* N1

#+NAME: test1
#+BEGIN_SRC R :results output latex :exports results
  a <- 1:10
  a
#+END_SRC


#+LATEX: \tiny
#+RESULTS: test1
#+LATEX: \normalsize

##############################################

Note the headline =* N1= is the only change between the two codes.
Regards,

Shripad
Tucson, AZ


On Wed, Apr 17, 2013 at 8:57 PM, shripad sinari <shripad.sinari@gmail.com>wrote:

> Hello John,
> I am able to get your test.org to do size change but not my test file.
> Please find it attached herewith. I am sure it is setup issue now.
> Thanks,
> Shripad.
>
> Shripad
> Tucson, AZ
>
>
> On Wed, Apr 17, 2013 at 8:53 PM, John Hendy <jw.hendy@gmail.com> wrote:
>
>> On Wed, Apr 17, 2013 at 10:43 PM, shripad sinari
>> <shripad.sinari@gmail.com> wrote:
>> > Hello John,
>> > I have tried this with text but it does not seem to resize the text.
>> Infact
>> > what gets resized is the "#+RESULTS: test" and the rest of the stuff
>> after
>> > that to the #+end_center. It might work for images but does not for
>> text.
>>
>> You must have a setup or installation issue. See the attached .org and
>> resultant .pdf for me.
>>
>> What's in your #+options line (or setupfile)? I'm wondering if you
>> don't have something like =tex:t= or =LaTeX:t= which might be required
>> to pass the commands through?
>>
>>
>> Best regards,
>> John
>>
>>
>> > Regards,
>> > Shripad.
>> >
>> > Shripad
>> > Tucson, AZ
>> >
>> >
>> > On Wed, Apr 17, 2013 at 8:13 PM, John Hendy <jw.hendy@gmail.com> wrote:
>> >>
>> >> On Wed, Apr 17, 2013 at 9:46 PM, shripad sinari
>> >> <shripad.sinari@gmail.com> wrote:
>> >> > Hello all,
>> >> > A quick update. Only the named block solution from Jay Kerns
>> currently
>> >> > works. I have tried out variants of other proposed solutions here but
>> >> > none
>> >> > worked.
>> >> > Thanks for your help and sorry for the delay in getting back on this
>> >> > one.
>> >> > Shripad.
>> >> >
>> >>
>> >> I didn't really follow this thread, but I resize things a decent
>> >> amount, but not with \resizebox. It's true that you need named source
>> >> blocks so that after the first C-c C-c on the babel block, you can add
>> >> options and still have it recognized as the results container for that
>> >> particular block. Something like this:
>> >>
>> >> #+name: test
>> >> #+begin_src R :exports results :results output :wrap latex
>> >>
>> >> a <- 1:10
>> >> a
>> >>
>> >> #+end_src
>> >>
>> >> #+latex: \LARGE
>> >> #+RESULTS: test
>> >> #+BEGIN_latex
>> >>  [1] 1 2 3 4 5 6 7 8 9 10
>> >> #+END_latex
>> >> #+latex: \normalsize
>> >>
>> >> I don't actually use the above that much, but tend to size plots
>> >> appropriately with something like the following, which is essentially
>> >> the same principle (how to pass latex options to the results of code
>> >> block results while having Org still recognize where to put updated
>> >> results):
>> >>
>> >> #+begin_center
>> >> #+attr_latex: :width 8cm
>> >> #+RESULTS: test
>> >> [[file.pdf]]
>> >> #+end_center
>> >>
>> >> Just thought I'd add another option...
>> >>
>> >> John
>> >>
>> >>
>> >> > Shripad
>> >> > Tucson, AZ
>> >> >
>> >> > Shripad
>> >> > Tucson, AZ
>> >> >
>> >
>> >
>>
>
>

[-- Attachment #2: Type: text/html, Size: 7248 bytes --]

^ permalink raw reply	[flat|nested] 16+ messages in thread

* Re: scaling the text in the results block of some code chunk when exported using LaTeX
  2013-04-18  3:57                   ` shripad sinari
  2013-04-18  4:12                     ` shripad sinari
@ 2013-04-18  4:18                     ` John Hendy
  2013-04-18  4:20                       ` shripad sinari
  1 sibling, 1 reply; 16+ messages in thread
From: John Hendy @ 2013-04-18  4:18 UTC (permalink / raw)
  To: shripad sinari; +Cc: Orgmode Mailing List

On Wed, Apr 17, 2013 at 10:57 PM, shripad sinari
<shripad.sinari@gmail.com> wrote:
> Hello John,
> I am able to get your test.org to do size change but not my test file.
> Please find it attached herewith. I am sure it is setup issue now.
> Thanks,
> Shripad.
>

I may have confused you. Your file contains text results, but you have:

#+BEGIN_CENTER
#+ATTR_LATEX: :width 20cm
#+RESULTS: test1
#+BEGIN_LaTeX

You need:

#+BEGIN_CENTER
#+LATEX: \LARGE
#+RESULTS: test1
#+BEGIN_LaTeX

Best regards,
John

> Shripad
> Tucson, AZ
>
>
> On Wed, Apr 17, 2013 at 8:53 PM, John Hendy <jw.hendy@gmail.com> wrote:
>>
>> On Wed, Apr 17, 2013 at 10:43 PM, shripad sinari
>> <shripad.sinari@gmail.com> wrote:
>> > Hello John,
>> > I have tried this with text but it does not seem to resize the text.
>> > Infact
>> > what gets resized is the "#+RESULTS: test" and the rest of the stuff
>> > after
>> > that to the #+end_center. It might work for images but does not for
>> > text.
>>
>> You must have a setup or installation issue. See the attached .org and
>> resultant .pdf for me.
>>
>> What's in your #+options line (or setupfile)? I'm wondering if you
>> don't have something like =tex:t= or =LaTeX:t= which might be required
>> to pass the commands through?
>>
>>
>> Best regards,
>> John
>>
>>
>> > Regards,
>> > Shripad.
>> >
>> > Shripad
>> > Tucson, AZ
>> >
>> >
>> > On Wed, Apr 17, 2013 at 8:13 PM, John Hendy <jw.hendy@gmail.com> wrote:
>> >>
>> >> On Wed, Apr 17, 2013 at 9:46 PM, shripad sinari
>> >> <shripad.sinari@gmail.com> wrote:
>> >> > Hello all,
>> >> > A quick update. Only the named block solution from Jay Kerns
>> >> > currently
>> >> > works. I have tried out variants of other proposed solutions here but
>> >> > none
>> >> > worked.
>> >> > Thanks for your help and sorry for the delay in getting back on this
>> >> > one.
>> >> > Shripad.
>> >> >
>> >>
>> >> I didn't really follow this thread, but I resize things a decent
>> >> amount, but not with \resizebox. It's true that you need named source
>> >> blocks so that after the first C-c C-c on the babel block, you can add
>> >> options and still have it recognized as the results container for that
>> >> particular block. Something like this:
>> >>
>> >> #+name: test
>> >> #+begin_src R :exports results :results output :wrap latex
>> >>
>> >> a <- 1:10
>> >> a
>> >>
>> >> #+end_src
>> >>
>> >> #+latex: \LARGE
>> >> #+RESULTS: test
>> >> #+BEGIN_latex
>> >>  [1] 1 2 3 4 5 6 7 8 9 10
>> >> #+END_latex
>> >> #+latex: \normalsize
>> >>
>> >> I don't actually use the above that much, but tend to size plots
>> >> appropriately with something like the following, which is essentially
>> >> the same principle (how to pass latex options to the results of code
>> >> block results while having Org still recognize where to put updated
>> >> results):
>> >>
>> >> #+begin_center
>> >> #+attr_latex: :width 8cm
>> >> #+RESULTS: test
>> >> [[file.pdf]]
>> >> #+end_center
>> >>
>> >> Just thought I'd add another option...
>> >>
>> >> John
>> >>
>> >>
>> >> > Shripad
>> >> > Tucson, AZ
>> >> >
>> >> > Shripad
>> >> > Tucson, AZ
>> >> >
>> >
>> >
>
>

^ permalink raw reply	[flat|nested] 16+ messages in thread

* Re: scaling the text in the results block of some code chunk when exported using LaTeX
  2013-04-18  4:18                     ` John Hendy
@ 2013-04-18  4:20                       ` shripad sinari
  2013-04-18  4:25                         ` John Hendy
  0 siblings, 1 reply; 16+ messages in thread
From: shripad sinari @ 2013-04-18  4:20 UTC (permalink / raw)
  To: John Hendy; +Cc: Orgmode Mailing List

[-- Attachment #1: Type: text/plain, Size: 3618 bytes --]

Thanks John,
But I have corrected the width attribute to the correct \tiny in my latest
file. It was a bit too fast copy and paste error.
Regards,

Shripad
Tucson, AZ


On Wed, Apr 17, 2013 at 9:18 PM, John Hendy <jw.hendy@gmail.com> wrote:

> On Wed, Apr 17, 2013 at 10:57 PM, shripad sinari
> <shripad.sinari@gmail.com> wrote:
> > Hello John,
> > I am able to get your test.org to do size change but not my test file.
> > Please find it attached herewith. I am sure it is setup issue now.
> > Thanks,
> > Shripad.
> >
>
> I may have confused you. Your file contains text results, but you have:
>
> #+BEGIN_CENTER
> #+ATTR_LATEX: :width 20cm
> #+RESULTS: test1
> #+BEGIN_LaTeX
>
> You need:
>
> #+BEGIN_CENTER
> #+LATEX: \LARGE
> #+RESULTS: test1
> #+BEGIN_LaTeX
>
> Best regards,
> John
>
> > Shripad
> > Tucson, AZ
> >
> >
> > On Wed, Apr 17, 2013 at 8:53 PM, John Hendy <jw.hendy@gmail.com> wrote:
> >>
> >> On Wed, Apr 17, 2013 at 10:43 PM, shripad sinari
> >> <shripad.sinari@gmail.com> wrote:
> >> > Hello John,
> >> > I have tried this with text but it does not seem to resize the text.
> >> > Infact
> >> > what gets resized is the "#+RESULTS: test" and the rest of the stuff
> >> > after
> >> > that to the #+end_center. It might work for images but does not for
> >> > text.
> >>
> >> You must have a setup or installation issue. See the attached .org and
> >> resultant .pdf for me.
> >>
> >> What's in your #+options line (or setupfile)? I'm wondering if you
> >> don't have something like =tex:t= or =LaTeX:t= which might be required
> >> to pass the commands through?
> >>
> >>
> >> Best regards,
> >> John
> >>
> >>
> >> > Regards,
> >> > Shripad.
> >> >
> >> > Shripad
> >> > Tucson, AZ
> >> >
> >> >
> >> > On Wed, Apr 17, 2013 at 8:13 PM, John Hendy <jw.hendy@gmail.com>
> wrote:
> >> >>
> >> >> On Wed, Apr 17, 2013 at 9:46 PM, shripad sinari
> >> >> <shripad.sinari@gmail.com> wrote:
> >> >> > Hello all,
> >> >> > A quick update. Only the named block solution from Jay Kerns
> >> >> > currently
> >> >> > works. I have tried out variants of other proposed solutions here
> but
> >> >> > none
> >> >> > worked.
> >> >> > Thanks for your help and sorry for the delay in getting back on
> this
> >> >> > one.
> >> >> > Shripad.
> >> >> >
> >> >>
> >> >> I didn't really follow this thread, but I resize things a decent
> >> >> amount, but not with \resizebox. It's true that you need named source
> >> >> blocks so that after the first C-c C-c on the babel block, you can
> add
> >> >> options and still have it recognized as the results container for
> that
> >> >> particular block. Something like this:
> >> >>
> >> >> #+name: test
> >> >> #+begin_src R :exports results :results output :wrap latex
> >> >>
> >> >> a <- 1:10
> >> >> a
> >> >>
> >> >> #+end_src
> >> >>
> >> >> #+latex: \LARGE
> >> >> #+RESULTS: test
> >> >> #+BEGIN_latex
> >> >>  [1] 1 2 3 4 5 6 7 8 9 10
> >> >> #+END_latex
> >> >> #+latex: \normalsize
> >> >>
> >> >> I don't actually use the above that much, but tend to size plots
> >> >> appropriately with something like the following, which is essentially
> >> >> the same principle (how to pass latex options to the results of code
> >> >> block results while having Org still recognize where to put updated
> >> >> results):
> >> >>
> >> >> #+begin_center
> >> >> #+attr_latex: :width 8cm
> >> >> #+RESULTS: test
> >> >> [[file.pdf]]
> >> >> #+end_center
> >> >>
> >> >> Just thought I'd add another option...
> >> >>
> >> >> John
> >> >>
> >> >>
> >> >> > Shripad
> >> >> > Tucson, AZ
> >> >> >
> >> >> > Shripad
> >> >> > Tucson, AZ
> >> >> >
> >> >
> >> >
> >
> >
>

[-- Attachment #2: Type: text/html, Size: 5903 bytes --]

^ permalink raw reply	[flat|nested] 16+ messages in thread

* Re: scaling the text in the results block of some code chunk when exported using LaTeX
  2013-04-18  4:20                       ` shripad sinari
@ 2013-04-18  4:25                         ` John Hendy
  2013-04-18  4:59                           ` shripad sinari
  0 siblings, 1 reply; 16+ messages in thread
From: John Hendy @ 2013-04-18  4:25 UTC (permalink / raw)
  To: shripad sinari; +Cc: Orgmode Mailing List

[-- Attachment #1: Type: text/plain, Size: 4766 bytes --]

It works correctly for me (see attached). Make sure your buffer is
exactly as shown below (:width 20cm -> \tiny is not the only change.
You also need to change #+attr_latex -> #+latex).

#+NAME: test1
#+BEGIN_SRC R :results output latex :exports results
  list.files(recursive=F)
#+END_SRC

#+BEGIN_CENTER
#+latex: \tiny
#+RESULTS: test1
#+BEGIN_LaTeX
 [1] "Desktop"             "Documents"           "Downloads"
 [4] "Dropbox"             "Library"             "Mail"
 [7] "Movies"              "Music"               "MyDropBox"
[10] "News"                "Pictures"            "Public"
[13] "local"               "m.org"               "org"
[16] "org.ics"             "orgmode-accessories" "projects"
[19] "t2.html"             "t2.org"              "t2.pdf"
[22] "t2.tex"              "tools"               "worg"
#+END_LaTeX
#+END_CENTER


Best regards,
John

On Wed, Apr 17, 2013 at 11:20 PM, shripad sinari
<shripad.sinari@gmail.com> wrote:
> Thanks John,
> But I have corrected the width attribute to the correct \tiny in my latest
> file. It was a bit too fast copy and paste error.
> Regards,
>
> Shripad
> Tucson, AZ
>
>
> On Wed, Apr 17, 2013 at 9:18 PM, John Hendy <jw.hendy@gmail.com> wrote:
>>
>> On Wed, Apr 17, 2013 at 10:57 PM, shripad sinari
>> <shripad.sinari@gmail.com> wrote:
>> > Hello John,
>> > I am able to get your test.org to do size change but not my test file.
>> > Please find it attached herewith. I am sure it is setup issue now.
>> > Thanks,
>> > Shripad.
>> >
>>
>> I may have confused you. Your file contains text results, but you have:
>>
>> #+BEGIN_CENTER
>> #+ATTR_LATEX: :width 20cm
>> #+RESULTS: test1
>> #+BEGIN_LaTeX
>>
>> You need:
>>
>> #+BEGIN_CENTER
>> #+LATEX: \LARGE
>> #+RESULTS: test1
>> #+BEGIN_LaTeX
>>
>> Best regards,
>> John
>>
>> > Shripad
>> > Tucson, AZ
>> >
>> >
>> > On Wed, Apr 17, 2013 at 8:53 PM, John Hendy <jw.hendy@gmail.com> wrote:
>> >>
>> >> On Wed, Apr 17, 2013 at 10:43 PM, shripad sinari
>> >> <shripad.sinari@gmail.com> wrote:
>> >> > Hello John,
>> >> > I have tried this with text but it does not seem to resize the text.
>> >> > Infact
>> >> > what gets resized is the "#+RESULTS: test" and the rest of the stuff
>> >> > after
>> >> > that to the #+end_center. It might work for images but does not for
>> >> > text.
>> >>
>> >> You must have a setup or installation issue. See the attached .org and
>> >> resultant .pdf for me.
>> >>
>> >> What's in your #+options line (or setupfile)? I'm wondering if you
>> >> don't have something like =tex:t= or =LaTeX:t= which might be required
>> >> to pass the commands through?
>> >>
>> >>
>> >> Best regards,
>> >> John
>> >>
>> >>
>> >> > Regards,
>> >> > Shripad.
>> >> >
>> >> > Shripad
>> >> > Tucson, AZ
>> >> >
>> >> >
>> >> > On Wed, Apr 17, 2013 at 8:13 PM, John Hendy <jw.hendy@gmail.com>
>> >> > wrote:
>> >> >>
>> >> >> On Wed, Apr 17, 2013 at 9:46 PM, shripad sinari
>> >> >> <shripad.sinari@gmail.com> wrote:
>> >> >> > Hello all,
>> >> >> > A quick update. Only the named block solution from Jay Kerns
>> >> >> > currently
>> >> >> > works. I have tried out variants of other proposed solutions here
>> >> >> > but
>> >> >> > none
>> >> >> > worked.
>> >> >> > Thanks for your help and sorry for the delay in getting back on
>> >> >> > this
>> >> >> > one.
>> >> >> > Shripad.
>> >> >> >
>> >> >>
>> >> >> I didn't really follow this thread, but I resize things a decent
>> >> >> amount, but not with \resizebox. It's true that you need named
>> >> >> source
>> >> >> blocks so that after the first C-c C-c on the babel block, you can
>> >> >> add
>> >> >> options and still have it recognized as the results container for
>> >> >> that
>> >> >> particular block. Something like this:
>> >> >>
>> >> >> #+name: test
>> >> >> #+begin_src R :exports results :results output :wrap latex
>> >> >>
>> >> >> a <- 1:10
>> >> >> a
>> >> >>
>> >> >> #+end_src
>> >> >>
>> >> >> #+latex: \LARGE
>> >> >> #+RESULTS: test
>> >> >> #+BEGIN_latex
>> >> >>  [1] 1 2 3 4 5 6 7 8 9 10
>> >> >> #+END_latex
>> >> >> #+latex: \normalsize
>> >> >>
>> >> >> I don't actually use the above that much, but tend to size plots
>> >> >> appropriately with something like the following, which is
>> >> >> essentially
>> >> >> the same principle (how to pass latex options to the results of code
>> >> >> block results while having Org still recognize where to put updated
>> >> >> results):
>> >> >>
>> >> >> #+begin_center
>> >> >> #+attr_latex: :width 8cm
>> >> >> #+RESULTS: test
>> >> >> [[file.pdf]]
>> >> >> #+end_center
>> >> >>
>> >> >> Just thought I'd add another option...
>> >> >>
>> >> >> John
>> >> >>
>> >> >>
>> >> >> > Shripad
>> >> >> > Tucson, AZ
>> >> >> >
>> >> >> > Shripad
>> >> >> > Tucson, AZ
>> >> >> >
>> >> >
>> >> >
>> >
>> >
>
>

[-- Attachment #2: t2.pdf --]
[-- Type: application/pdf, Size: 73898 bytes --]

^ permalink raw reply	[flat|nested] 16+ messages in thread

* Re: scaling the text in the results block of some code chunk when exported using LaTeX
  2013-04-18  4:25                         ` John Hendy
@ 2013-04-18  4:59                           ` shripad sinari
  0 siblings, 0 replies; 16+ messages in thread
From: shripad sinari @ 2013-04-18  4:59 UTC (permalink / raw)
  To: John Hendy; +Cc: Orgmode Mailing List

[-- Attachment #1: Type: text/plain, Size: 5234 bytes --]

Thanks!

Shripad
Tucson, AZ


On Wed, Apr 17, 2013 at 9:25 PM, John Hendy <jw.hendy@gmail.com> wrote:

> It works correctly for me (see attached). Make sure your buffer is
> exactly as shown below (:width 20cm -> \tiny is not the only change.
> You also need to change #+attr_latex -> #+latex).
>
> #+NAME: test1
> #+BEGIN_SRC R :results output latex :exports results
>   list.files(recursive=F)
> #+END_SRC
>
> #+BEGIN_CENTER
> #+latex: \tiny
> #+RESULTS: test1
> #+BEGIN_LaTeX
>  [1] "Desktop"             "Documents"           "Downloads"
>  [4] "Dropbox"             "Library"             "Mail"
>  [7] "Movies"              "Music"               "MyDropBox"
> [10] "News"                "Pictures"            "Public"
> [13] "local"               "m.org"               "org"
> [16] "org.ics"             "orgmode-accessories" "projects"
> [19] "t2.html"             "t2.org"              "t2.pdf"
> [22] "t2.tex"              "tools"               "worg"
> #+END_LaTeX
> #+END_CENTER
>
>
> Best regards,
> John
>
> On Wed, Apr 17, 2013 at 11:20 PM, shripad sinari
> <shripad.sinari@gmail.com> wrote:
> > Thanks John,
> > But I have corrected the width attribute to the correct \tiny in my
> latest
> > file. It was a bit too fast copy and paste error.
> > Regards,
> >
> > Shripad
> > Tucson, AZ
> >
> >
> > On Wed, Apr 17, 2013 at 9:18 PM, John Hendy <jw.hendy@gmail.com> wrote:
> >>
> >> On Wed, Apr 17, 2013 at 10:57 PM, shripad sinari
> >> <shripad.sinari@gmail.com> wrote:
> >> > Hello John,
> >> > I am able to get your test.org to do size change but not my test
> file.
> >> > Please find it attached herewith. I am sure it is setup issue now.
> >> > Thanks,
> >> > Shripad.
> >> >
> >>
> >> I may have confused you. Your file contains text results, but you have:
> >>
> >> #+BEGIN_CENTER
> >> #+ATTR_LATEX: :width 20cm
> >> #+RESULTS: test1
> >> #+BEGIN_LaTeX
> >>
> >> You need:
> >>
> >> #+BEGIN_CENTER
> >> #+LATEX: \LARGE
> >> #+RESULTS: test1
> >> #+BEGIN_LaTeX
> >>
> >> Best regards,
> >> John
> >>
> >> > Shripad
> >> > Tucson, AZ
> >> >
> >> >
> >> > On Wed, Apr 17, 2013 at 8:53 PM, John Hendy <jw.hendy@gmail.com>
> wrote:
> >> >>
> >> >> On Wed, Apr 17, 2013 at 10:43 PM, shripad sinari
> >> >> <shripad.sinari@gmail.com> wrote:
> >> >> > Hello John,
> >> >> > I have tried this with text but it does not seem to resize the
> text.
> >> >> > Infact
> >> >> > what gets resized is the "#+RESULTS: test" and the rest of the
> stuff
> >> >> > after
> >> >> > that to the #+end_center. It might work for images but does not for
> >> >> > text.
> >> >>
> >> >> You must have a setup or installation issue. See the attached .org
> and
> >> >> resultant .pdf for me.
> >> >>
> >> >> What's in your #+options line (or setupfile)? I'm wondering if you
> >> >> don't have something like =tex:t= or =LaTeX:t= which might be
> required
> >> >> to pass the commands through?
> >> >>
> >> >>
> >> >> Best regards,
> >> >> John
> >> >>
> >> >>
> >> >> > Regards,
> >> >> > Shripad.
> >> >> >
> >> >> > Shripad
> >> >> > Tucson, AZ
> >> >> >
> >> >> >
> >> >> > On Wed, Apr 17, 2013 at 8:13 PM, John Hendy <jw.hendy@gmail.com>
> >> >> > wrote:
> >> >> >>
> >> >> >> On Wed, Apr 17, 2013 at 9:46 PM, shripad sinari
> >> >> >> <shripad.sinari@gmail.com> wrote:
> >> >> >> > Hello all,
> >> >> >> > A quick update. Only the named block solution from Jay Kerns
> >> >> >> > currently
> >> >> >> > works. I have tried out variants of other proposed solutions
> here
> >> >> >> > but
> >> >> >> > none
> >> >> >> > worked.
> >> >> >> > Thanks for your help and sorry for the delay in getting back on
> >> >> >> > this
> >> >> >> > one.
> >> >> >> > Shripad.
> >> >> >> >
> >> >> >>
> >> >> >> I didn't really follow this thread, but I resize things a decent
> >> >> >> amount, but not with \resizebox. It's true that you need named
> >> >> >> source
> >> >> >> blocks so that after the first C-c C-c on the babel block, you can
> >> >> >> add
> >> >> >> options and still have it recognized as the results container for
> >> >> >> that
> >> >> >> particular block. Something like this:
> >> >> >>
> >> >> >> #+name: test
> >> >> >> #+begin_src R :exports results :results output :wrap latex
> >> >> >>
> >> >> >> a <- 1:10
> >> >> >> a
> >> >> >>
> >> >> >> #+end_src
> >> >> >>
> >> >> >> #+latex: \LARGE
> >> >> >> #+RESULTS: test
> >> >> >> #+BEGIN_latex
> >> >> >>  [1] 1 2 3 4 5 6 7 8 9 10
> >> >> >> #+END_latex
> >> >> >> #+latex: \normalsize
> >> >> >>
> >> >> >> I don't actually use the above that much, but tend to size plots
> >> >> >> appropriately with something like the following, which is
> >> >> >> essentially
> >> >> >> the same principle (how to pass latex options to the results of
> code
> >> >> >> block results while having Org still recognize where to put
> updated
> >> >> >> results):
> >> >> >>
> >> >> >> #+begin_center
> >> >> >> #+attr_latex: :width 8cm
> >> >> >> #+RESULTS: test
> >> >> >> [[file.pdf]]
> >> >> >> #+end_center
> >> >> >>
> >> >> >> Just thought I'd add another option...
> >> >> >>
> >> >> >> John
> >> >> >>
> >> >> >>
> >> >> >> > Shripad
> >> >> >> > Tucson, AZ
> >> >> >> >
> >> >> >> > Shripad
> >> >> >> > Tucson, AZ
> >> >> >> >
> >> >> >
> >> >> >
> >> >
> >> >
> >
> >
>

[-- Attachment #2: Type: text/html, Size: 8970 bytes --]

^ permalink raw reply	[flat|nested] 16+ messages in thread

end of thread, other threads:[~2013-04-18  5:07 UTC | newest]

Thread overview: 16+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2013-03-18 23:44 scaling the text in the results block of some code chunk when exported using LaTeX shripad sinari
2013-03-19  0:26 ` Jay Kerns
2013-03-19  1:07   ` Thomas S. Dye
2013-03-19  2:08     ` shripad sinari
2013-03-19  0:57 ` Eric Abrahamsen
     [not found]   ` <CAA_SOTZwUcdvt4tbQTV5PLWxSE=C6vZ0k+bBEshHXG8FkFaK0g@mail.gmail.com>
     [not found]     ` <871ub9frnp.fsf@ericabrahamsen.net>
     [not found]       ` <CAA_SOTZoqTufBQkckeBXJoiJe6j+TqWqa=PiSWJQ3Xn35h2bhA@mail.gmail.com>
     [not found]         ` <87obdcverf.fsf@ericabrahamsen.net>
2013-04-18  2:46           ` shripad sinari
2013-04-18  3:13             ` John Hendy
2013-04-18  3:43               ` shripad sinari
2013-04-18  3:53                 ` John Hendy
2013-04-18  3:57                   ` shripad sinari
2013-04-18  4:12                     ` shripad sinari
2013-04-18  4:18                     ` John Hendy
2013-04-18  4:20                       ` shripad sinari
2013-04-18  4:25                         ` John Hendy
2013-04-18  4:59                           ` shripad sinari
2013-04-18  3:50               ` Eric Schulte

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).