* Break a line in org-mode
@ 2013-07-03 6:49 Søren Mikkelsen
2013-07-03 8:21 ` Nick Dokos
2013-07-03 9:01 ` Rasmus
0 siblings, 2 replies; 6+ messages in thread
From: Søren Mikkelsen @ 2013-07-03 6:49 UTC (permalink / raw)
To: emacs-orgmode
I usually have some #+LaTeX_HEADER: entries in my org-mode files where
some of them are macros. These lines can be rather long so I have to
type in #+LaTeX_HEADER: multiple times for breaking the line to a decent
level.
Is there a way of breaking a line when it is export options (or a
regular comment in org-mode)?
--
Søren Mikkelsen
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: Break a line in org-mode
2013-07-03 6:49 Break a line in org-mode Søren Mikkelsen
@ 2013-07-03 8:21 ` Nick Dokos
2013-07-03 11:08 ` Søren Mikkelsen
2013-07-03 9:01 ` Rasmus
1 sibling, 1 reply; 6+ messages in thread
From: Nick Dokos @ 2013-07-03 8:21 UTC (permalink / raw)
To: emacs-orgmode
Søren Mikkelsen <smik@iha.dk> writes:
> I usually have some #+LaTeX_HEADER: entries in my org-mode files where
> some of them are macros. These lines can be rather long so I have to
> type in #+LaTeX_HEADER: multiple times for breaking the line to a decent
> level.
>
> Is there a way of breaking a line when it is export options (or a
> regular comment in org-mode)?
>
Wouldn't it be better to put the macros in a separate file (say
mymacros.sty) and use
#+LATEX_HEADER: \usepackage{mymacros}
? Less clutter in the org file and if the macros are more generally useful,
you can make it available, say by moving it to your personal texmf
directory (mine is at ~/.texmf-var/tex/latex but ymmv) and running texhash.
--
Nick
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: Break a line in org-mode
2013-07-03 6:49 Break a line in org-mode Søren Mikkelsen
2013-07-03 8:21 ` Nick Dokos
@ 2013-07-03 9:01 ` Rasmus
2013-07-03 11:12 ` Søren Mikkelsen
1 sibling, 1 reply; 6+ messages in thread
From: Rasmus @ 2013-07-03 9:01 UTC (permalink / raw)
To: emacs-orgmode
Søren Mikkelsen <smik@iha.dk> writes:
> I usually have some #+LaTeX_HEADER: entries in my org-mode files where
> some of them are macros. These lines can be rather long so I have to
> type in #+LaTeX_HEADER: multiple times for breaking the line to a decent
> level.
>
> Is there a way of breaking a line when it is export options (or a
> regular comment in org-mode)?
No. But maybe you could do
#+LATEX_HEADER: \input{pre}
#+BEGIN_SRC LATEX :tangle pre.tex
\usepackage{mypackage}
#+END_SRC
Or you could make a new Org-Latex, see the variable org-latex-classes
if you have the same problem often.
Some people entertained the idea of writing sty and/or cls files
recently on this list. If you use the same macros all over perhaps
you should pack them as a sty or the very least as an external tex
file, I guess.
Alternatively, use the function string-rectangle. In the following
example, place your mark at the first `|', click C-Space, move to the
second `|' click C-x r t LATEX_HEADER RET.
|\usepackage{pac1}
\usepackage{pac1}
|\usepackage{pac1}.
Hope it helps.
–Rasmus
--
This is the kind of tedious nonsense up with which I will not put
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: Break a line in org-mode
2013-07-03 8:21 ` Nick Dokos
@ 2013-07-03 11:08 ` Søren Mikkelsen
2013-07-03 17:00 ` Nick Dokos
0 siblings, 1 reply; 6+ messages in thread
From: Søren Mikkelsen @ 2013-07-03 11:08 UTC (permalink / raw)
To: emacs-orgmode
On 2013-07-03 10:21, Nick Dokos wrote:
> Søren Mikkelsen <smik@iha.dk> writes:
>
>> I usually have some #+LaTeX_HEADER: entries in my org-mode files where
>> some of them are macros. These lines can be rather long so I have to
>> type in #+LaTeX_HEADER: multiple times for breaking the line to a decent
>> level.
>>
>> Is there a way of breaking a line when it is export options (or a
>> regular comment in org-mode)?
>>
> Wouldn't it be better to put the macros in a separate file (say
> mymacros.sty) and use
>
> #+LATEX_HEADER: \usepackage{mymacros}
>
> ? Less clutter in the org file and if the macros are more generally useful,
> you can make it available, say by moving it to your personal texmf
> directory (mine is at ~/.texmf-var/tex/latex but ymmv) and running texhash.
>
Well, I would like it to be in one file. If I, for instance, want to
have long author list, it is not possible to do without having all the
names on one line.
I through maybe that there was a newline symbol, like in python or matlab.
--
Søren
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: Break a line in org-mode
2013-07-03 9:01 ` Rasmus
@ 2013-07-03 11:12 ` Søren Mikkelsen
0 siblings, 0 replies; 6+ messages in thread
From: Søren Mikkelsen @ 2013-07-03 11:12 UTC (permalink / raw)
To: emacs-orgmode
On 2013-07-03 11:01, Rasmus wrote:
> Søren Mikkelsen <smik@iha.dk> writes:
>
>> I usually have some #+LaTeX_HEADER: entries in my org-mode files where
>> some of them are macros. These lines can be rather long so I have to
>> type in #+LaTeX_HEADER: multiple times for breaking the line to a decent
>> level.
>>
>> Is there a way of breaking a line when it is export options (or a
>> regular comment in org-mode)?
>
> No. But maybe you could do
>
> #+LATEX_HEADER: \input{pre}
> #+BEGIN_SRC LATEX :tangle pre.tex
> \usepackage{mypackage}
> #+END_SRC
>
> Or you could make a new Org-Latex, see the variable org-latex-classes
> if you have the same problem often.
>
> Some people entertained the idea of writing sty and/or cls files
> recently on this list. If you use the same macros all over perhaps
> you should pack them as a sty or the very least as an external tex
> file, I guess.
>
> Alternatively, use the function string-rectangle. In the following
> example, place your mark at the first `|', click C-Space, move to the
> second `|' click C-x r t LATEX_HEADER RET.
>
> |\usepackage{pac1}
> \usepackage{pac1}
> |\usepackage{pac1}.
>
> Hope it helps.
>
> –Rasmus
>
Okay, just thought that there might be a symbol for that. That could
have been nice.
But thanks for the suggestions.
--
Søren
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: Break a line in org-mode
2013-07-03 11:08 ` Søren Mikkelsen
@ 2013-07-03 17:00 ` Nick Dokos
0 siblings, 0 replies; 6+ messages in thread
From: Nick Dokos @ 2013-07-03 17:00 UTC (permalink / raw)
To: emacs-orgmode
Søren Mikkelsen <smik <at> iha.dk> writes:
>
> On 2013-07-03 10:21, Nick Dokos wrote:
> > Søren Mikkelsen <smik <at> iha.dk> writes:
> >
> >> I usually have some #+LaTeX_HEADER: entries in my org-mode files where
> >> some of them are macros. These lines can be rather long so I have to
> >> type in #+LaTeX_HEADER: multiple times for breaking the line to a
decent
> >> level.
> >>
> >> Is there a way of breaking a line when it is export options (or a
> >> regular comment in org-mode)?
> >>
> > Wouldn't it be better to put the macros in a separate file (say
> > mymacros.sty) and use
> >
> > #+LATEX_HEADER: \usepackage{mymacros}
> >
> > ? Less clutter in the org file and if the macros are more generally
useful,
> > you can make it available, say by moving it to your personal texmf
> > directory (mine is at ~/.texmf-var/tex/latex but ymmv) and running
texhash.
> >
>
> Well, I would like it to be in one file. If I, for instance, want to
> have long author list, it is not possible to do without having all the
> names on one line.
>
> I through maybe that there was a newline symbol, like in python or matlab.
>
> --
> Søren
>
>
In that case, you might want to use a template mechanism to enter the
#+LATEX_HEADER with a minimum of pain. Org comes with an "easy template"
system of its own:
(info "(org) Easy templates")
but I had some trouble with the customization as detailed in another
posting. Note by the way that you can use a string as a key: you are not
limited to a single character. There are other abbrev/template systems also
if you find you don't like the org one.
--
Nick
^ permalink raw reply [flat|nested] 6+ messages in thread
end of thread, other threads:[~2013-07-03 17:00 UTC | newest]
Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2013-07-03 6:49 Break a line in org-mode Søren Mikkelsen
2013-07-03 8:21 ` Nick Dokos
2013-07-03 11:08 ` Søren Mikkelsen
2013-07-03 17:00 ` Nick Dokos
2013-07-03 9:01 ` Rasmus
2013-07-03 11:12 ` Søren Mikkelsen
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).