emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
From: David Belohrad <david@belohrad.ch>
To: mailing-list-org-mode <emacs-orgmode@gnu.org>
Subject: Re: a4paper to execute latex src block
Date: Thu, 19 Dec 2013 10:41:05 +0100	[thread overview]
Message-ID: <uaxbo0dmb4e.fsf@beesknees.cern.ch> (raw)
In-Reply-To: <uaxhaa5md0k.fsf@beesknees.cern.ch>


Fiddling a bit more I have achieved it, but it is solution for all src
blocks. By redefining variable org-format-latex-header:

(setq org-format-latex-header "\\documentclass[a4paper,12pt]{article}
\\usepackage[usenames]{color}
\\usepackage{amsmath}
\\usepackage[mathscr]{eucal}
\\usepackage{tikz}
\\pagestyle{empty}
\[PACKAGES]
\[DEFAULT-PACKAGES]
")

So I have removed settings which I don't need, and I ordered it to
obligatory use a4paper and 12pt, which I use anyways. 

Still, how could I change this locally is not clear to me...

.d.


David Belohrad <david@belohrad.ch> writes:

> Dear All,
>
> I have following latex src block (see bellow), which I'd like to use to
> generate box. When I press C-c C-c and execute the block, it does
> exactly what is wanted, i.e. generates cps_fbct_box_btp10.pdf file with
> some fancy graphics. The problem is, that I've found, that resulting PDF
> graphics does not have expected dimensions. Tracing that back I've
> found, that I have to use
>
> \documentclass[a4paper]{article}
>
> and not 
>
> \documentclass{article}
>
> as is generated by execution of the src block. Now, I have tried
> everything I know to generate tex file out of this thing, which would
> modify the default (no) options to include a4 paper. Nothing works.
>
> This:
> #+LaTeX_CLASS_OPTIONS: [a4paper,twoside,twocolumn]
> in front of src block does not include these options into resulting Tex
> file
>
> Adding 'second' document class in :headers does not work either as latex
> is complaining that I have specified two classes.
>
> How can I setup the src block such, that it will generate for me in the
> latex preamble article class with a4paper option?
>
> many thanks
>
> .d.
>
>
>
>
> *** Prepare front panel to be sticked on each FBCT
> Each FBCT is equipped with a sticker, which is sticked on the FR4 box
> with connectors. This identifies which of the connectors is FBCT
> output and which of them is calibration input. It adds information
> about what FBCT is it and who is responsible (me).
>
> Script to generate it:
> #+begin_src latex :file cps_fbct_box_btp10.pdf :headers '("\\usepackage{tikz}" "\\usepackage[top=5mm,bottom=5mm,left=5mm,right=5mm]{geometry}")
> \newcommand{\fbct}{BTP-BCT10 (\#3044)}
> \begin{tikzpicture}[thick]
> \draw (0,0) -- (136mm,0) -- (136mm,80mm) -- (0,80mm) -- (0,0);
> % two main holes
> \draw (40mm,40mm) circle (8.5mm);
> \draw (96mm,40mm) circle (8.5mm);
> % screws around holes for first connector 
> \draw (30.85mm,30.85mm) circle (1.65mm);
> \draw (49.15mm,30.85mm) circle (1.65mm);
> \draw (30.85mm,49.15mm) circle (1.65mm);
> \draw (49.15mm,49.15mm) circle (1.65mm);
> % screws around holes for second connector
> \draw (86.85mm,30.85mm) circle (1.65mm);
> \draw (105.15mm,30.85mm) circle (1.65mm);
> \draw (86.85mm,49.15mm) circle (1.65mm);
> \draw (105.15mm,49.15mm) circle (1.65mm);
> % holes around the box
> \draw (4mm,4mm) circle (1.75mm);
> \draw (132mm,4mm) circle (1.75mm);
> \draw (132mm,76mm) circle (1.75mm);
> \draw (4mm,76mm) circle (1.75mm);
> % text messages
> \node[color=red,text width=4cm,align=center] at (4cm,1.5cm)
> {\LARGE\texttt{Calibration input}};
> \node[color=blue,text width=3cm,align=center] at (96mm,1.5cm)
> {\LARGE\texttt{FBCT output}};
> \node[color=black,text width=120mm,align=center] at (68mm,7cm)
> {\Huge \texttt{\textbf{\fbct}}};
> \node[color=black,text width=120mm,align=center] at (68mm,6.3cm)
> {Resp: \textbf{David Belohrad} (\Email\hspace{1mm}david.belohrad@cern.ch\hspace{2mm}\Mobilefone\hspace{1mm}163455)};
> \end{tikzpicture}
>
> #+end_src
>
> #+RESULTS:
> #+BEGIN_LaTeX
> [[file:cps_fbct_box_btp10.pdf]]
> #+END_LaTeX

      reply	other threads:[~2013-12-19  9:41 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-12-19  9:00 a4paper to execute latex src block David Belohrad
2013-12-19  9:41 ` David Belohrad [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://www.orgmode.org/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=uaxbo0dmb4e.fsf@beesknees.cern.ch \
    --to=david@belohrad.ch \
    --cc=emacs-orgmode@gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).