[Orgmode] Re: How to get \\ in title or author?

2009-09-10 Thread Sébastien Vauban
Hi Nick and Bastien,

Bastien wrote:
 Nick Dokos nicholas.do...@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.

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}
\def...@key{mymktitle}{caption}[]{\def\mymktitle@caption{#1}}
\def...@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{\mymkti...@logo}{}}
{}%
{\includegraphics[height=2cm]{\mymkti...@logo}} \\%
\ifthenelse{\equal{\mymkti...@caption}{}}
{}%
{\textbf{\sc{\mymkti...@caption}}}
\par\vspace{\stretch{2}}
\normalfont
{\Huge \color{my-color-document-title}\textb...@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@gnu.org
http://lists.gnu.org/mailman/listinfo/emacs-orgmode


[Orgmode] Re: How to get \\ in title or author?

2009-09-10 Thread Sébastien Vauban
Hi Bastien,

Bastien wrote:
 Sébastien Vauban wxhgmqzgw...@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...

Seb

-- 
Sébastien Vauban



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


Re: [Orgmode] Re: How to get \\ in title or author?

2009-09-10 Thread Carsten Dominik


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


Hi Bastien,

Bastien wrote:

Sébastien Vauban wxhgmqzgw...@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



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


Re: [Orgmode] Re: How to get \\ in title or author?

2009-09-10 Thread Nick Dokos
Carsten Dominik carsten.domi...@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 :-)


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


[Orgmode] Re: How to get \\ in title or author?

2009-09-09 Thread Sébastien Vauban
Hi Nick,

Nick Dokos wrote:
 Bastien bastiengue...@googlemail.com wrote:
 Sébastien Vauban wxhgmqzgw...@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#

 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@gnu.org
http://lists.gnu.org/mailman/listinfo/emacs-orgmode


Re: [Orgmode] Re: How to get \\ in title or author?

2009-09-09 Thread Bastien
Sébastien Vauban wxhgmqzgw...@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


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


Re: [Orgmode] Re: How to get \\ in title or author?

2009-09-09 Thread Nick Dokos
=?utf-8?Q?S=C3=A9bastien_Vauban?= wxhgmqzgw...@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---


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


Re: [Orgmode] Re: How to get \\ in title or author?

2009-09-09 Thread Bastien
Nick Dokos nicholas.do...@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


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


Re: [Orgmode] Re: How to get \\ in title or author?

2009-09-09 Thread Tim Burt



Nick Dokos writes:
  Bastien bastiengue...@googlemail.com wrote:
  
   Sébastien Vauban wxhgmqzgw...@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 ;-). 


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


[Orgmode] Re: How to get \\ in title or author?

2009-09-08 Thread Sébastien Vauban
Hi Bastien,

Bastien wrote:
 Sébastien Vauban wxhgmqzgw...@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?

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@gnu.org
http://lists.gnu.org/mailman/listinfo/emacs-orgmode


Re: [Orgmode] Re: How to get \\ in title or author?

2009-09-08 Thread Bastien
Sébastien Vauban wxhgmqzgw...@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


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


[Orgmode] Re: How to get \\ in title or author?

2009-09-08 Thread Sébastien Vauban
Hi Bastien,

Bastien wrote:
 Sébastien Vauban wxhgmqzgw...@spammotel.com 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@gnu.org
http://lists.gnu.org/mailman/listinfo/emacs-orgmode


Re: [Orgmode] Re: How to get \\ in title or author?

2009-09-08 Thread Brian van den Broek

Bastien said unto the world at 09-09-07 11:33 PM:

Sébastien Vauban wxhgmqzgw...@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


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


Re: [Orgmode] Re: How to get \\ in title or author?

2009-09-08 Thread Bastien
Sébastien Vauban wxhgmqzgw...@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


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


Re: [Orgmode] Re: How to get \\ in title or author?

2009-09-08 Thread Nick Dokos
Bastien bastiengue...@googlemail.com wrote:

 Sébastien Vauban wxhgmqzgw...@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




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