emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
* How to get \\ in title or author?
@ 2009-09-07 12:59 Sébastien Vauban
  2009-09-07 22:33 ` Bastien
  0 siblings, 1 reply; 17+ messages in thread
From: Sébastien Vauban @ 2009-09-07 12:59 UTC (permalink / raw)
  To: emacs-orgmode-mXXj517/zsQ

Hi,

I have a small problem when I want to put a double backslash in the list of
authors, for example.

--8<---------------cut here---------------start------------->8---
#+AUTHOR:    Main author \\ Second one
--8<---------------cut here---------------end--------------->8---

gets exported in LaTeX as

--8<---------------cut here---------------start------------->8---
\author{Main author \\textbackslash{} Second one}
--8<---------------cut here---------------end--------------->8---

What's not the expected result...

Is this a bug?  Is there a workaround?

Best regards,
  Seb

PS- Same problem for title, if I want to put explicit breaks in the title
    page.

-- 
Sébastien Vauban



_______________________________________________
Emacs-orgmode mailing list
Remember: use `Reply All' to send replies to the list.
Emacs-orgmode-mXXj517/zsQ@public.gmane.org
http://lists.gnu.org/mailman/listinfo/emacs-orgmode

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

* Re: How to get \\ in title or author?
  2009-09-07 12:59 How to get \\ in title or author? Sébastien Vauban
@ 2009-09-07 22:33 ` Bastien
  2009-09-08  7:50   ` Sébastien Vauban
  0 siblings, 1 reply; 17+ messages in thread
From: Bastien @ 2009-09-07 22:33 UTC (permalink / raw)
  To: Sébastien Vauban; +Cc: emacs-orgmode

Sébastien Vauban <wxhgmqzgwmuf@spammotel.com> writes:

> I have a small problem when I want to put a double backslash in the list of
> authors, for example.
>
> #+AUTHOR:    Main author \\ Second one
>
> gets exported in LaTeX as
>
> \author{Main author \\textbackslash{} Second one}
>
> What's not the expected result...
>
> Is this a bug?  Is there a workaround?

The workaround I can think of is to use \linebreak instead of \\.  
"\\" really means "new paragraph" and it doesn't really make sense
in the author or title environment, does it?

HTH,

-- 
 Bastien

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

* Re: Re: How to get \\ in title or author?
  2009-09-08  7:50   ` Sébastien Vauban
@ 2009-09-08  3:33     ` Bastien
  2009-09-08 21:01       ` Sébastien Vauban
  2009-09-09  2:15       ` Brian van den Broek
  0 siblings, 2 replies; 17+ messages in thread
From: Bastien @ 2009-09-08  3:33 UTC (permalink / raw)
  To: Sébastien Vauban; +Cc: emacs-orgmode

Sébastien Vauban <wxhgmqzgwmuf@spammotel.com> writes:

> #+TITLE:     Main title \linebreak Subtitle
> #+AUTHOR:    Main author \linebreak Second one
>
> DOES WORK. Thanks for your precious help!
>
> I'm not sure to understand the subtle differences between `\\', `\newline' and
> `\linebreak', though...

Me neither :)

I've found this, which might help:

  http://www.personal.ceu.hu/tex/breaking.htm

Maybe \linebreak is less context-sensitive than \newline, which would
mean that there are more contexts (like \title and \author) in which 
it behaves as expected.  Just a guess.

-- 
 Bastien

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

* Re: How to get \\ in title or author?
  2009-09-07 22:33 ` Bastien
@ 2009-09-08  7:50   ` Sébastien Vauban
  2009-09-08  3:33     ` Bastien
  0 siblings, 1 reply; 17+ messages in thread
From: Sébastien Vauban @ 2009-09-08  7:50 UTC (permalink / raw)
  To: emacs-orgmode-mXXj517/zsQ

Hi Bastien,

Bastien wrote:
> Sébastien Vauban <wxhgmqzgwmuf-geNee64TY+gS+FvcfC7Uqw@public.gmane.org> writes:
>
>> I have a small problem when I want to put a double backslash in the list of
>> authors, for example.
>>
>> #+AUTHOR:    Main author \\ Second one
>>
>> gets exported in LaTeX as
>>
>> \author{Main author \\textbackslash{} Second one}
>>
>> What's not the expected result...
>>
>> Is this a bug?  Is there a workaround?
>
> The workaround I can think of is to use \linebreak instead of \\.
> "\\" really means "new paragraph" and it doesn't really make sense in the
> author or title environment, does it?

Of course, starting a new paragraph has no sense. But (AFAIK) -- unlike `\par'
-- `\\' does mean "start a new line", doesn't it?

Before sending this question, I had already tried a workaround with
`\newline', but though the authors and the title were on 2 lines, their
centering on the title page was completely broken.

But your solution using `\linebreak':

--8<---------------cut here---------------start------------->8---
#+TITLE:     Main title \linebreak Subtitle
#+AUTHOR:    Main author \linebreak Second one
--8<---------------cut here---------------end--------------->8---

DOES WORK. Thanks for your precious help!

I'm not sure to understand the subtle differences between `\\', `\newline' and
`\linebreak', though...

Best regards,
  Seb

-- 
Sébastien Vauban



_______________________________________________
Emacs-orgmode mailing list
Remember: use `Reply All' to send replies to the list.
Emacs-orgmode-mXXj517/zsQ@public.gmane.org
http://lists.gnu.org/mailman/listinfo/emacs-orgmode

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

* Re: How to get \\ in title or author?
  2009-09-08  3:33     ` Bastien
@ 2009-09-08 21:01       ` Sébastien Vauban
  2009-09-09  3:33         ` Bastien
  2009-09-09  2:15       ` Brian van den Broek
  1 sibling, 1 reply; 17+ messages in thread
From: Sébastien Vauban @ 2009-09-08 21:01 UTC (permalink / raw)
  To: emacs-orgmode-mXXj517/zsQ

Hi Bastien,

Bastien wrote:
> Sébastien Vauban <wxhgmqzgwmuf-geNee64TY+gS+FvcfC7Uqw@public.gmane.org> writes:
>> I'm not sure to understand the subtle differences between `\\', `\newline'
>> and `\linebreak', though...
>
> Me neither :)
>
> I've found this, which might help:
>
>   http://www.personal.ceu.hu/tex/breaking.htm

I don't really understand the differences, and it's not that correct: just
look at \\ which is supposed to start a new paragraph (in index) but a new
line (in rest of text)!??


> Maybe \linebreak is less context-sensitive than \newline, which would mean
> that there are more contexts (like \title and \author) in which it behaves
> as expected. Just a guess.

I've asked the question on FCTT (fr.comp.text.tex) and already got an answer
of Maneul Pegourie-Gonnard (who is expert on that matter):

http://groups.google.fr/group/fr.comp.text.tex/browse_thread/thread/1b1af2e5291270e2#

Sorry (for the others), it's in French.

Seb

-- 
Sébastien Vauban



_______________________________________________
Emacs-orgmode mailing list
Remember: use `Reply All' to send replies to the list.
Emacs-orgmode-mXXj517/zsQ@public.gmane.org
http://lists.gnu.org/mailman/listinfo/emacs-orgmode

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

* Re: Re: How to get \\ in title or author?
  2009-09-08  3:33     ` Bastien
  2009-09-08 21:01       ` Sébastien Vauban
@ 2009-09-09  2:15       ` Brian van den Broek
  1 sibling, 0 replies; 17+ messages in thread
From: Brian van den Broek @ 2009-09-09  2:15 UTC (permalink / raw)
  To: emacs-orgmode; +Cc: Bastien, Vauban

Bastien said unto the world at 09-09-07 11:33 PM:
> Sébastien Vauban <wxhgmqzgwmuf@spammotel.com> writes:
> 
>> #+TITLE:     Main title \linebreak Subtitle
>> #+AUTHOR:    Main author \linebreak Second one
>>
>> DOES WORK. Thanks for your precious help!
>>
>> I'm not sure to understand the subtle differences between `\\', `\newline' and
>> `\linebreak', though...
> 
> Me neither :)
> 
> I've found this, which might help:
> 
>   http://www.personal.ceu.hu/tex/breaking.htm
> 
> Maybe \linebreak is less context-sensitive than \newline, which would
> mean that there are more contexts (like \title and \author) in which 
> it behaves as expected.  Just a guess.
> 

Hi all,

The pages are old, but the resource is still very helpful:
<http://www.giss.nasa.gov/tools/latex/ltx-99.html>
<http://www.giss.nasa.gov/tools/latex/ltx-293.html>

Best,

Brian vdB

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

* Re: Re: How to get \\ in title or author?
  2009-09-08 21:01       ` Sébastien Vauban
@ 2009-09-09  3:33         ` Bastien
  2009-09-09  5:00           ` Nick Dokos
  0 siblings, 1 reply; 17+ messages in thread
From: Bastien @ 2009-09-09  3:33 UTC (permalink / raw)
  To: Sébastien Vauban; +Cc: emacs-orgmode

Sébastien Vauban <wxhgmqzgwmuf@spammotel.com> writes:

>> Maybe \linebreak is less context-sensitive than \newline, which would mean
>> that there are more contexts (like \title and \author) in which it behaves
>> as expected. Just a guess.
>
> I've asked the question on FCTT (fr.comp.text.tex) and already got an answer
> of Maneul Pegourie-Gonnard (who is expert on that matter):
>
> http://groups.google.fr/group/fr.comp.text.tex/browse_thread/thread/1b1af2e5291270e2#
>
> Sorry (for the others), it's in French.

Merci!   Here is a summary:

- none of \\ \linebreak or \newline change a paragraph, they just start
  a new line

- with \linebreak, LaTeX tries to justify the resulting text, not with
  \newline

- \linebreak can take an argument to let LaTeX decides whether the line
  should be broken or not.  The default \linebreak always triggers a
  break, but \linebreak[2] will let LaTeX decides depending on whether
  the result is acceptable or not, and \linebreak[0] prevents any line
  break...

- \\ can take two arguments: one star and one digit.  The star prevents
  the line break to trigger a page break, and the digit lets you add a
  vertical space between the two lines.

  In environments like \flushleft \flushright \centering \raggedleft
  \raggedright, \\ doesn't have its normal definition (whereas \newline
  behaves normally).

- \newline is the version of \\ with no argument

HTH,

-- 
 Bastien

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

* Re: Re: How to get \\ in title or author?
  2009-09-09  3:33         ` Bastien
@ 2009-09-09  5:00           ` Nick Dokos
  2009-09-09  9:47             ` Sébastien Vauban
  2009-09-09 21:08             ` Tim Burt
  0 siblings, 2 replies; 17+ messages in thread
From: Nick Dokos @ 2009-09-09  5:00 UTC (permalink / raw)
  To: Bastien; +Cc: =?iso-8859-1?Q?S=E9bastien?= Vauban, emacs-orgmode

Bastien <bastienguerry@googlemail.com> wrote:

> Sébastien Vauban <wxhgmqzgwmuf@spammotel.com> writes:
> 
> >> Maybe \linebreak is less context-sensitive than \newline, which would mean
> >> that there are more contexts (like \title and \author) in which it behaves
> >> as expected. Just a guess.
> >
> > I've asked the question on FCTT (fr.comp.text.tex) and already got an answer
> > of Maneul Pegourie-Gonnard (who is expert on that matter):
> >
> > http://groups.google.fr/group/fr.comp.text.tex/browse_thread/thread/1b1af2e5291270e2#
> >
> > Sorry (for the others), it's in French.
> 
> Merci!   Here is a summary:
> 
> - none of \\ \linebreak or \newline change a paragraph, they just start
>   a new line
> 
> - with \linebreak, LaTeX tries to justify the resulting text, not with
>   \newline
> 
> - \linebreak can take an argument to let LaTeX decides whether the line
>   should be broken or not.  The default \linebreak always triggers a
>   break, but \linebreak[2] will let LaTeX decides depending on whether
>   the result is acceptable or not, and \linebreak[0] prevents any line
>   break...
> 
> - \\ can take two arguments: one star and one digit.  The star prevents
>   the line break to trigger a page break, and the digit lets you add a
>   vertical space between the two lines.
> 
>   In environments like \flushleft \flushright \centering \raggedleft
>   \raggedright, \\ doesn't have its normal definition (whereas \newline
>   behaves normally).
> 
> - \newline is the version of \\ with no argument
> 

Bastien,

Thanks for the summary. There is still one problem, I think, with #+AUTHOR:

  \author{one \\ two}

and

  \author{one \linebreak two}

behave differently (the \linebreak has no effect), so if one wants the
first behavior, the exporter's penchant to change \\ to
\\textbackslash{} will not allow it. I'm not sure why \title and \author
behave differently: I guess it's because \author is expanded inside a
\tabular, whereas \title is not.

Thanks,
Nick

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

* Re: How to get \\ in title or author?
  2009-09-09  5:00           ` Nick Dokos
@ 2009-09-09  9:47             ` Sébastien Vauban
  2009-09-09 10:34               ` Bastien
  2009-09-09 14:26               ` Nick Dokos
  2009-09-09 21:08             ` Tim Burt
  1 sibling, 2 replies; 17+ messages in thread
From: Sébastien Vauban @ 2009-09-09  9:47 UTC (permalink / raw)
  To: emacs-orgmode-mXXj517/zsQ

Hi Nick,

Nick Dokos wrote:
> Bastien <bastienguerry-gM/Ye1E23mwN+BqQ9rBEUg@public.gmane.org> wrote:
>> Sébastien Vauban <wxhgmqzgwmuf-geNee64TY+gS+FvcfC7Uqw@public.gmane.org> writes:
>>
>>>> Maybe \linebreak is less context-sensitive than \newline, which would
>>>> mean that there are more contexts (like \title and \author) in which it
>>>> behaves as expected. Just a guess.
>>>
>>> I've asked the question on FCTT (fr.comp.text.tex) and already got an
>>> answer of Maneul Pegourie-Gonnard (who is expert on that matter):
>>>
>>> http://groups.google.fr/group/fr.comp.text.tex/browse_thread/thread/1b1af2e5291270e2#
>
> Bastien, there is still one problem, I think, with
> #+AUTHOR:
>
>   \author{one \\ two}
>
> and
>
>   \author{one \linebreak two}
>
> behave differently (the \linebreak has no effect), so if one wants the
> first behavior, the exporter's penchant to change \\ to
> \\textbackslash{} will not allow it. I'm not sure why \title and \author
> behave differently: I guess it's because \author is expanded inside a
> \tabular, whereas \title is not.

For sure, it'd be better if `\\' wasn't converted at all when exporting to
LaTeX (for the ones in the TITLE and AUTHOR meta-tags, at least).

But, in my case,

--8<---------------cut here---------------start------------->8---
#+TITLE:     YYY \linebreak XXX
#+AUTHOR:    YYY \linebreak XXX
#+DATE:      2009-09-09
#+DESCRIPTION: 
#+KEYWORDS: 
#+LANGUAGE:  en

[...]
--8<---------------cut here---------------end--------------->8---

is correctly converted into:

--8<---------------cut here---------------start------------->8---
% Created 2009-09-09 Wed 11:37
\documentclass[final,book]{myreport}  % <-- our company class
\usepackage[utf8x]{inputenc}
\usepackage[T1]{fontenc}
\usepackage{longtable}
\usepackage{soul}

\usepackage{xcolor}
\usepackage{listings}

\title{YYY \linebreak XXX}
\author{YYY \linebreak XXX}
\date{2009-09-09}

\begin{document}

[...]
--8<---------------cut here---------------end--------------->8---

and the PDF output of both the Title line and the Author line is on two lines
(perfectly centered, horizontally).

Is your `\maketitle' redefined?

Best regards,
  Seb

-- 
Sébastien Vauban



_______________________________________________
Emacs-orgmode mailing list
Remember: use `Reply All' to send replies to the list.
Emacs-orgmode-mXXj517/zsQ@public.gmane.org
http://lists.gnu.org/mailman/listinfo/emacs-orgmode

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

* Re: Re: How to get \\ in title or author?
  2009-09-09  9:47             ` Sébastien Vauban
@ 2009-09-09 10:34               ` Bastien
  2009-09-10 14:30                 ` Sébastien Vauban
  2009-09-09 14:26               ` Nick Dokos
  1 sibling, 1 reply; 17+ messages in thread
From: Bastien @ 2009-09-09 10:34 UTC (permalink / raw)
  To: Sébastien Vauban; +Cc: emacs-orgmode

Sébastien Vauban <wxhgmqzgwmuf@spammotel.com> writes:

> For sure, it'd be better if `\\' wasn't converted at all when exporting to
> LaTeX (for the ones in the TITLE and AUTHOR meta-tags, at least).

But how do you insert a backlash in the resulting div/ps/pdf then?  
My expectation was that converting \\ into \textbackslash was more
common than inserting linebreaks in title (of which I didn't think 
in fact...)

-- 
 Bastien

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

* Re: Re: How to get \\ in title or author?
  2009-09-09  9:47             ` Sébastien Vauban
  2009-09-09 10:34               ` Bastien
@ 2009-09-09 14:26               ` Nick Dokos
  2009-09-09 14:43                 ` Bastien
  1 sibling, 1 reply; 17+ messages in thread
From: Nick Dokos @ 2009-09-09 14:26 UTC (permalink / raw)
  To: Sébastien Vauban; +Cc: emacs-orgmode

=?utf-8?Q?S=C3=A9bastien_Vauban?= <wxhgmqzgwmuf@spammotel.com> wrote:

> ...
> is correctly converted into:
> 
> --8<---------------cut here---------------start------------->8---
> % Created 2009-09-09 Wed 11:37
> \documentclass[final,book]{myreport}  % <-- our company class
> \usepackage[utf8x]{inputenc}
> \usepackage[T1]{fontenc}
> \usepackage{longtable}
> \usepackage{soul}
> 
> \usepackage{xcolor}
> \usepackage{listings}
> 
> \title{YYY \linebreak XXX}
> \author{YYY \linebreak XXX}
> \date{2009-09-09}
> 
> \begin{document}
> 
> [...]
> --8<---------------cut here---------------end--------------->8---
> 
> and the PDF output of both the Title line and the Author line is on two lin=
> es
> (perfectly centered, horizontally).
> 
> Is your `\maketitle' redefined?
> 

Hi Seb & Bastien,

The org->latex translation is no problem, but the resulting latex file
does not give me a two-line authorship, either through pdflatex (tested
with xpdf) or through latex->dvi (tested with xdvi) and then through
dvi->ps (tested with gv).

And \maketitle is not redefined. I append the complete LaTeX file in case
you'd like to test. If you do, I'd be interested in the results. I'm
wondering whether the ``myreport'' class does things differently for
you, but I don't really know. It might be time to get my (very
rudimentary) LaTeX debugging skills out of the attic, dust them off, oil
them and put them to work again.

Thanks much,
Nick

--8<---------------cut here---------------start------------->8---
% Created 2009-09-09 Wed 00:43
\documentclass[11pt]{article}
\usepackage[utf8]{inputenc}
\usepackage[T1]{fontenc}
\usepackage{graphicx}
\usepackage{longtable}
\usepackage{soul}
\usepackage{hyperref}


\title{newlines}
\author{one \linebreak two}
\date{09 September 2009}

\begin{document}

\maketitle

\setcounter{tocdepth}{3}
\tableofcontents
\vspace*{1cm}


\section{foo}
\label{sec-1}


\section{bar}
\label{sec-2}


\end{document}
--8<---------------cut here---------------end--------------->8---

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

* Re: Re: How to get \\ in title or author?
  2009-09-09 14:26               ` Nick Dokos
@ 2009-09-09 14:43                 ` Bastien
  2009-09-10 14:27                   ` Sébastien Vauban
  0 siblings, 1 reply; 17+ messages in thread
From: Bastien @ 2009-09-09 14:43 UTC (permalink / raw)
  To: nicholas.dokos; +Cc: Sébastien Vauban, emacs-orgmode

Nick Dokos <nicholas.dokos@hp.com> writes:

> The org->latex translation is no problem, but the resulting latex file
> does not give me a two-line authorship, either through pdflatex (tested
> with xpdf) or through latex->dvi (tested with xdvi) and then through
> dvi->ps (tested with gv).

Yes, \newline and \linebreak work in \title (with different outputs) but
not in \author.   \\ works in \author.

-- 
 Bastien

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

* Re: Re: How to get \\ in title or author?
  2009-09-09  5:00           ` Nick Dokos
  2009-09-09  9:47             ` Sébastien Vauban
@ 2009-09-09 21:08             ` Tim Burt
  1 sibling, 0 replies; 17+ messages in thread
From: Tim Burt @ 2009-09-09 21:08 UTC (permalink / raw)
  To: nicholas.dokos; +Cc: Bastien, emacs-orgmode, Sébastien Vauban




Nick Dokos writes:
 > Bastien <bastienguerry@googlemail.com> wrote:
 > 
 > > Sébastien Vauban <wxhgmqzgwmuf@spammotel.com> writes:
 > > 
 > > >> Maybe \linebreak is less context-sensitive than \newline, which would mean
 > > >> that there are more contexts (like \title and \author) in which it behaves
 > > >> as expected. Just a guess.
 > > >
 > > > I've asked the question on FCTT (fr.comp.text.tex) and already got an answer
 > > > of Maneul Pegourie-Gonnard (who is expert on that matter):
 > > >
 > > > http://groups.google.fr/group/fr.comp.text.tex/browse_thread/thread/1b1af2e5291270e2#
 > > >
 > > > Sorry (for the others), it's in French.
 > > 
 > > Merci!   Here is a summary:
 > > 
 > > - none of \\ \linebreak or \newline change a paragraph, they just start
 > >   a new line
 > > 
 > > - with \linebreak, LaTeX tries to justify the resulting text, not with
 > >   \newline
 > > 
 > > - \linebreak can take an argument to let LaTeX decides whether the line
 > >   should be broken or not.  The default \linebreak always triggers a
 > >   break, but \linebreak[2] will let LaTeX decides depending on whether
 > >   the result is acceptable or not, and \linebreak[0] prevents any line
 > >   break...
 > > 
 > > - \\ can take two arguments: one star and one digit.  The star prevents
 > >   the line break to trigger a page break, and the digit lets you add a
 > >   vertical space between the two lines.
 > > 
 > >   In environments like \flushleft \flushright \centering \raggedleft
 > >   \raggedright, \\ doesn't have its normal definition (whereas \newline
 > >   behaves normally).
 > > 
 > > - \newline is the version of \\ with no argument
 > > 
 > 
 > Bastien,
 > 
 > Thanks for the summary. There is still one problem, I think, with #+AUTHOR:
 > 
 >   \author{one \\ two}
 > 
 > and
 > 
 >   \author{one \linebreak two}
 > 
 > behave differently (the \linebreak has no effect), so if one wants the
 > first behavior, the exporter's penchant to change \\ to
 > \\textbackslash{} will not allow it. I'm not sure why \title and \author
 > behave differently: I guess it's because \author is expanded inside a
 > \tabular, whereas \title is not.

Indeed, multiple authors should be separated by two backslashes (\\)
in the \author{} command[*] in the standard LaTeX classes
(e.g. article, report, book).  Nick has correctly noted that the
argument of \author{} is used inside a tabular environment, and \\ has
a special meaning that should be added to Bastien's summary above.  
 - In a tabular environment the \\ is necessary to signal the
   end of one row and the beginning of the next.

So, from the perspective of standard LaTeX classes, any instance of \\
in the \author{} command should not be converted during export.

Good afternoon,
Tim



[*] Bastien has also reported that \\ works in a recent message to the
mailing list.  If that was an experimental result, then this reply
only adds theoretical support so that others don't have to get out
their LaTeX debugging skills and "dust them off" (as Nick said ;-). 

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

* Re: How to get \\ in title or author?
  2009-09-09 14:43                 ` Bastien
@ 2009-09-10 14:27                   ` Sébastien Vauban
  0 siblings, 0 replies; 17+ messages in thread
From: Sébastien Vauban @ 2009-09-10 14:27 UTC (permalink / raw)
  To: emacs-orgmode-mXXj517/zsQ

Hi Nick and Bastien,

Bastien wrote:
> Nick Dokos <nicholas.dokos-VXdhtT5mjnY@public.gmane.org> writes:
>
>> The org->latex translation is no problem, but the resulting latex file
>> does not give me a two-line authorship, either through pdflatex (tested
>> with xpdf) or through latex->dvi (tested with xdvi) and then through
>> dvi->ps (tested with gv).
>
> Yes, \newline and \linebreak work in \title (with different outputs) but
> not in \author.   \\ works in \author.

I confirm this as well...

Though, it works (authors on two lines) with my company-class:

--8<---------------cut here---------------start------------->8---
\documentclass[11pt]{myreport}
--8<---------------cut here---------------end--------------->8---

and it's OK for me...

For your info (even if that does not change anything to the subject here),
here is the new definition of my title page:

--8<---------------cut here---------------start------------->8---
\RequirePackage{keyval}
\define@key{myMkTitle}{caption}[]{\def\myMkTitle@caption{#1}}
\define@key{myMkTitle}{logo}[]{\def\myMkTitle@logo{#1}}
\setkeys{myMkTitle}{caption={}, logo={}} % preset keys with a default value,
                                         % so that above variables are created
\renewcommand{\maketitle}[1][]{%
    \setkeys{myMkTitle}{#1}
    \null
    \thispagestyle{empty}%
    \begin{changemargin}{-3.5cm}{0cm}
        \begin{center}
            \leavevmode
            \ifthenelse{\equal{\myMkTitle@logo}{}}
            {}%
            {\includegraphics[height=2cm]{\myMkTitle@logo}} \\%
            \ifthenelse{\equal{\myMkTitle@caption}{}}
            {}%
            {\textbf{\sc{\myMkTitle@caption}}}
            \par\vspace{\stretch{2}}
            \normalfont
            {\Huge \color{my-color-document-title}\textbf{\@title}\par}%
            \vskip 5mm
            {\large \@author\par}%
            \vskip 2mm
            {\large \@date\par}%
            \par\vspace{\stretch{3}}
            \includegraphics[height=2cm]{MissionCriticalIT}
        \end{center}%
    \end{changemargin}
    \null
    \clearpage
}
--8<---------------cut here---------------end--------------->8---

My "maketitle" accepts key-val pairs, such as:

--8<---------------cut here---------------start------------->8---
\maketitle[logo=LaTeX2e, caption=LaTeX]
--8<---------------cut here---------------end--------------->8---

to have both the "LaTeX2e" figure and the "LaTeX" string outputted on the top
of the title page (for client reports).

Seb

-- 
Sébastien Vauban



_______________________________________________
Emacs-orgmode mailing list
Remember: use `Reply All' to send replies to the list.
Emacs-orgmode-mXXj517/zsQ@public.gmane.org
http://lists.gnu.org/mailman/listinfo/emacs-orgmode

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

* Re: How to get \\ in title or author?
  2009-09-09 10:34               ` Bastien
@ 2009-09-10 14:30                 ` Sébastien Vauban
  2009-09-10 18:02                   ` Carsten Dominik
  0 siblings, 1 reply; 17+ messages in thread
From: Sébastien Vauban @ 2009-09-10 14:30 UTC (permalink / raw)
  To: emacs-orgmode-mXXj517/zsQ

Hi Bastien,

Bastien wrote:
> Sébastien Vauban <wxhgmqzgwmuf-geNee64TY+gS+FvcfC7Uqw@public.gmane.org> writes:
>
>> For sure, it'd be better if `\\' wasn't converted at all when exporting to
>> LaTeX (for the ones in the TITLE and AUTHOR meta-tags, at least).
>
> But how do you insert a backlash in the resulting div/ps/pdf then? My
> expectation was that converting \\ into \textbackslash was more common than
> inserting linebreaks in title (of which I didn't think in fact...)

As Tim told:

   "So, from the perspective of standard LaTeX classes, any instance of \\ in
    the \author{} command should not be converted during export."

I wanted to express that there are certainly more cases where you want the
backslashes in the AUTHOR and TITLE meta-tags to be passed as is, than
converted to their LaTeX equivalent.

But, your question makes sense: what if one really wants a backslash in the
author list or in the title...

Problem stays for the authors as it seems that \newline is not good for the
standard article class...

Seb

-- 
Sébastien Vauban



_______________________________________________
Emacs-orgmode mailing list
Remember: use `Reply All' to send replies to the list.
Emacs-orgmode-mXXj517/zsQ@public.gmane.org
http://lists.gnu.org/mailman/listinfo/emacs-orgmode

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

* Re: Re: How to get \\ in title or author?
  2009-09-10 14:30                 ` Sébastien Vauban
@ 2009-09-10 18:02                   ` Carsten Dominik
  2009-09-10 18:30                     ` Nick Dokos
  0 siblings, 1 reply; 17+ messages in thread
From: Carsten Dominik @ 2009-09-10 18:02 UTC (permalink / raw)
  To: Sébastien Vauban; +Cc: emacs-orgmode


On Sep 10, 2009, at 4:30 PM, Sébastien Vauban wrote:

> Hi Bastien,
>
> Bastien wrote:
>> Sébastien Vauban <wxhgmqzgwmuf@spammotel.com> writes:
>>
>>> For sure, it'd be better if `\\' wasn't converted at all when  
>>> exporting to
>>> LaTeX (for the ones in the TITLE and AUTHOR meta-tags, at least).
>>
>> But how do you insert a backlash in the resulting div/ps/pdf then? My
>> expectation was that converting \\ into \textbackslash was more  
>> common than
>> inserting linebreaks in title (of which I didn't think in fact...)
>
> As Tim told:
>
>   "So, from the perspective of standard LaTeX classes, any instance  
> of \\ in
>    the \author{} command should not be converted during export."
>
> I wanted to express that there are certainly more cases where you  
> want the
> backslashes in the AUTHOR and TITLE meta-tags to be passed as is, than
> converted to their LaTeX equivalent.
>
> But, your question makes sense: what if one really wants a backslash  
> in the
> author list or in the title...
>
> Problem stays for the authors as it seems that \newline is not good  
> for the
> standard article class...

Hi,

A workaround is this:

     #+LaTeX_HEADER: \def\dblbackslash{\\}

     \author{Einstein \dblbackslash{} Bose}





- Carsten

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

* Re: Re: How to get \\ in title or author?
  2009-09-10 18:02                   ` Carsten Dominik
@ 2009-09-10 18:30                     ` Nick Dokos
  0 siblings, 0 replies; 17+ messages in thread
From: Nick Dokos @ 2009-09-10 18:30 UTC (permalink / raw)
  To: Carsten Dominik; +Cc: Sébastien Vauban, emacs-orgmode

Carsten Dominik <carsten.dominik@gmail.com> wrote:

> Hi,
> 
> A workaround is this:
> 
>     #+LaTeX_HEADER: \def\dblbackslash{\\}
> 
>     \author{Einstein \dblbackslash{} Bose}
> 

Does that work for Fermi-Dirac as well?

Just kidding :-)

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

end of thread, other threads:[~2009-09-10 18:31 UTC | newest]

Thread overview: 17+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2009-09-07 12:59 How to get \\ in title or author? Sébastien Vauban
2009-09-07 22:33 ` Bastien
2009-09-08  7:50   ` Sébastien Vauban
2009-09-08  3:33     ` Bastien
2009-09-08 21:01       ` Sébastien Vauban
2009-09-09  3:33         ` Bastien
2009-09-09  5:00           ` Nick Dokos
2009-09-09  9:47             ` Sébastien Vauban
2009-09-09 10:34               ` Bastien
2009-09-10 14:30                 ` Sébastien Vauban
2009-09-10 18:02                   ` Carsten Dominik
2009-09-10 18:30                     ` Nick Dokos
2009-09-09 14:26               ` Nick Dokos
2009-09-09 14:43                 ` Bastien
2009-09-10 14:27                   ` Sébastien Vauban
2009-09-09 21:08             ` Tim Burt
2009-09-09  2:15       ` Brian van den Broek

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