From mboxrd@z Thu Jan 1 00:00:00 1970 From: John Kitchin Subject: exporting code blocks with continued line numbers? Date: Tue, 8 Jan 2019 11:40:19 -0500 Message-ID: Mime-Version: 1.0 Content-Type: multipart/alternative; boundary="00000000000001e58c057ef50147" Return-path: Received: from eggs.gnu.org ([209.51.188.92]:56006) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1gguQh-0001si-Nf for emacs-orgmode@gnu.org; Tue, 08 Jan 2019 11:40:40 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1gguQg-0003ZP-A8 for emacs-orgmode@gnu.org; Tue, 08 Jan 2019 11:40:39 -0500 Received: from mail-wr1-x42a.google.com ([2a00:1450:4864:20::42a]:43906) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1gguQf-0003MX-On for emacs-orgmode@gnu.org; Tue, 08 Jan 2019 11:40:38 -0500 Received: by mail-wr1-x42a.google.com with SMTP id r10so4695204wrs.10 for ; Tue, 08 Jan 2019 08:40:34 -0800 (PST) List-Id: "General discussions about Org-mode." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org Sender: "Emacs-orgmode" To: org-mode-email --00000000000001e58c057ef50147 Content-Type: text/plain; charset="UTF-8" Hi all, In the following example document: #+BEGIN_SRC python -r +n #!/bin/env python (ref:bang) print() (ref:print) #+END_SRC Next, you need to modify line [[(filename)]] to point to the Excel sheet you have saved the data in, line [[(sheet)]] with an integer for the sheet number for the data (index starts at 1), and line [[(range)]] with the range for the data. #+BEGIN_SRC python -r +n filename = 'Copper_Samples' (ref:filename) sheet = 6 (ref:sheet) Tstar1 = xlsread(filename, sheet, 'A2:E29') (ref:range) #+END_SRC When I export this to LaTeX, the line numbers to the coderefs in the text are correct, but the line numbers in each code block start at 1. I am using minted for the export. Is there an option that will tell minted to continue the line numbers from the previous block? Thanks, John ----------------------------------- Professor John Kitchin Doherty Hall A207F Department of Chemical Engineering Carnegie Mellon University Pittsburgh, PA 15213 412-268-7803 @johnkitchin http://kitchingroup.cheme.cmu.edu --00000000000001e58c057ef50147 Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable
Hi all,

In the followi= ng example document:

#+BEGIN_SRC python -r +n=
#!/bin/env python (ref:bang)
print()=C2=A0 (ref:print)=
#+END_SRC

Next, you need to modify line= [[(filename)]] to point to the Excel sheet you have saved the data in, lin= e [[(sheet)]] with an integer for the sheet number for the data (index star= ts at 1), and line [[(range)]] with the range for the data.

<= /div>
#+BEGIN_SRC python -r +n
filename =3D 'Copper_Sampl= es' (ref:filename)
sheet =3D 6 (ref:sheet)
Tstar1 = =3D xlsread(filename, sheet, 'A2:E29')=C2=A0 (ref:range)
= #+END_SRC

When I export this to LaTeX, the line nu= mbers to the coderefs in the text are correct, but the line numbers in each= code block start at 1.=C2=A0 I am using minted for the export. Is there an= option that will tell minted to continue the line numbers from the previou= s block?

Thanks,

J= ohn

-----------------------------------
Professor John Kitchin=C2= =A0
Doherty Hall A207F
Department of Chemical Engineering
Carnegie= Mellon University
Pittsburgh, PA 15213
412-268-7803
=
--00000000000001e58c057ef50147--