* vertical space
@ 2014-01-31 4:17 Rustom Mody
2014-01-31 5:48 ` Nick Dokos
2014-01-31 6:44 ` Rustom Mody
0 siblings, 2 replies; 9+ messages in thread
From: Rustom Mody @ 2014-01-31 4:17 UTC (permalink / raw)
To: emacs-orgmode
[-- Attachment #1: Type: text/plain, Size: 841 bytes --]
Im having an issue with inconsistent vertical space
If I do latex export \\es at eol produce blank lines
However with html export they appear in output but not consistently
org version 8.2.5e
emacs version 24.3.1
Below a cut-down version from a file I see it happening
------------
#+TITLE: Equational Reasoning in Logic
#+AUTHOR: Rusi
#+OPTIONS: toc:nil
* Object and Meta language
Look at the following proof
#+ATTR_LATEX: :mode math :environment flalign
P \wedge (Q \vee P)\\
" \wedge distributes over \vee " \\
= (P \wedge Q) \vee (P \wedge Q) \\
" Idempotence of \vee " \\
= P \wedge Q \\
\\
\\
Observe that:
- Each proof step has an expression
- Each step also carries an implicit statement, that the given expression
is $True$ . So, in the first step, we have an implicit statement: P \wedge
(Q \vee P) = True
-----------------
[-- Attachment #2: Type: text/html, Size: 1049 bytes --]
^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: vertical space
2014-01-31 4:17 vertical space Rustom Mody
@ 2014-01-31 5:48 ` Nick Dokos
2014-01-31 8:35 ` Nicolas Goaziou
2014-01-31 6:44 ` Rustom Mody
1 sibling, 1 reply; 9+ messages in thread
From: Nick Dokos @ 2014-01-31 5:48 UTC (permalink / raw)
To: emacs-orgmode
Rustom Mody <rustompmody@gmail.com> writes:
> Im having an issue with inconsistent vertical space
>
> If I do latex export \\es at eol produce blank lines
> However with html export they appear in output but not consistently
> org version 8.2.5e
> emacs version 24.3.1
>
> Below a cut-down version from a file I see it happening
> ------------
> #+TITLE: Equational Reasoning in Logic
> #+AUTHOR: Rusi
> #+OPTIONS: toc:nil
> * Object and Meta language
> Look at the following proof
>
> #+ATTR_LATEX: :mode math :environment flalign
> P \wedge (Q \vee P)\\
> " \wedge distributes over \vee " \\
> = (P \wedge Q) \vee (P \wedge Q) \\
> " Idempotence of \vee " \\
> = P \wedge Q \\
> \\
> \\
>
This case is easy: just delete the last two \\ and you are done. I take
it that your real case is more complicated.
Running org-element-parse-buffer on your buffer might be illuminating:
the "internal" \\ get parsed as
(line-break (:begin 267 :end 270 :post-blank 0 :parent #3))
but the last one (I used a buffer with just one trailing \\, not two)
gets parsed as
#("\\\\
" 0 3 (:parent #3))
i.e. a string, so it gets copied to the output. When the output is
latex:
,----
| " Idempotence of \(\vee\) " \\
| = P \(\wedge\) Q \\
| \\
| % Emacs 24.3.50.2 (Org mode 8.2.5g)
| \end{document}
`----
the \\ are processed by pdflatex and become empty lines. When the output
is html:
,----
| " Idempotence of ∨ " <br />
| = P ∧ Q <br />
| \\
| </p>
`----
they are processed by the browser which does nothing special with them,
so they are shown in the output.
Why exactly the last one is parsed as a literal string and not as a line
break, I don't know. Nicolas will probably explain all. The only thing I
can say is that if there is something other than whitespace on the line
before the \\, it gets parsed as a line break; if there is only
whitespace (or nothing), it gets parsed as a string. That's probably a
rough description and not quite right in all particulars, but I hope
it's close enough.
--
Nick
^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: vertical space
2014-01-31 5:48 ` Nick Dokos
@ 2014-01-31 8:35 ` Nicolas Goaziou
0 siblings, 0 replies; 9+ messages in thread
From: Nicolas Goaziou @ 2014-01-31 8:35 UTC (permalink / raw)
To: Nick Dokos; +Cc: emacs-orgmode
Hello,
Nick Dokos <ndokos@gmail.com> writes:
> Why exactly the last one is parsed as a literal string and not as a line
> break, I don't know. Nicolas will probably explain all. The only thing I
> can say is that if there is something other than whitespace on the line
> before the \\, it gets parsed as a line break; if there is only
> whitespace (or nothing), it gets parsed as a string. That's probably a
> rough description and not quite right in all particulars, but I hope
> it's close enough.
That's exactly that. I even added the following comment in
`org-element-line-break-successor':
;; A line break can only happen on a non-empty line.
I'm not sure why, though. It may have to do with the fact that there is
no easy way to escape backslashes in Org (AFAIK).
I think we can remove this rule if we first add a "bslash" (or some
other name) entity in `org-entities'.
Regards,
--
Nicolas Goaziou
^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: vertical space
2014-01-31 4:17 vertical space Rustom Mody
2014-01-31 5:48 ` Nick Dokos
@ 2014-01-31 6:44 ` Rustom Mody
2014-01-31 8:16 ` Nicolas Goaziou
1 sibling, 1 reply; 9+ messages in thread
From: Rustom Mody @ 2014-01-31 6:44 UTC (permalink / raw)
To: emacs-orgmode
[-- Attachment #1: Type: text/plain, Size: 542 bytes --]
Nick wrote:
> Why exactly the last one is parsed as a literal string and not as a line
> break, I don't know. Nicolas will probably explain all. The only thing I
> can say is that if there is something other than whitespace on the line
> before the \\, it gets parsed as a line break; if there is only
> whitespace (or nothing), it gets parsed as a string. That's probably a
> rough description and not quite right in all particulars, but I hope
> it's close enough.
So the question remains: How to get generic, consistent vertical space?
[-- Attachment #2: Type: text/html, Size: 871 bytes --]
^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: vertical space
2014-01-31 6:44 ` Rustom Mody
@ 2014-01-31 8:16 ` Nicolas Goaziou
0 siblings, 0 replies; 9+ messages in thread
From: Nicolas Goaziou @ 2014-01-31 8:16 UTC (permalink / raw)
To: Rustom Mody; +Cc: emacs-orgmode
Hello,
Rustom Mody <rustompmody@gmail.com> writes:
>> Why exactly the last one is parsed as a literal string and not as a line
>> break, I don't know. Nicolas will probably explain all. The only thing I
>> can say is that if there is something other than whitespace on the line
>> before the \\, it gets parsed as a line break; if there is only
>> whitespace (or nothing), it gets parsed as a string. That's probably a
>> rough description and not quite right in all particulars, but I hope
>> it's close enough.
>
>
> So the question remains: How to get generic, consistent vertical
> space?
You can try a verse environment. There is an implicit line break at the
end of each line, indentation and vertical space are preserved.
Regards,
--
Nicolas Goaziou
^ permalink raw reply [flat|nested] 9+ messages in thread
* Vertical space
@ 2016-03-04 14:19 Johann Spies
2016-03-04 14:25 ` Marcin Borkowski
0 siblings, 1 reply; 9+ messages in thread
From: Johann Spies @ 2016-03-04 14:19 UTC (permalink / raw)
To: emacs-orgmode
[-- Attachment #1: Type: text/plain, Size: 869 bytes --]
I am normally working in LaTeX but want to try out org-mode for a book.
During the process I have to export Word Processing documents
(LibreOffice/MS Word) for other less privileged people who do not know
Linux/Emacs/LaTeX :)
My first problem is how to do this (\vspace{}) in orgmode (Know I how to
get the 'enumerate' environment working in orgmode):
\begin{enumerate}
\item Die eerste paragraaf van die formulier word die woorde
``verbondskinders'' gebruik en gepraat van ``God se beloftes in die
doop''.
\begin{enumerate}
\item Wat beteken die term ``verbond''?
\vspace*{1.5cm}
\item Wat het God jou belowe toe jy gedoop is?
\vspace*{1.5cm}
\end{enumerate}
It will be nice if I can embed such LaTeX snippets directly.
Regards
Johann
--
Because experiencing your loyal love is better than life itself,
my lips will praise you. (Psalm 63:3)
[-- Attachment #2: Type: text/html, Size: 1135 bytes --]
^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: Vertical space
2016-03-04 14:19 Vertical space Johann Spies
@ 2016-03-04 14:25 ` Marcin Borkowski
2016-03-04 15:06 ` Johann Spies
0 siblings, 1 reply; 9+ messages in thread
From: Marcin Borkowski @ 2016-03-04 14:25 UTC (permalink / raw)
To: Johann Spies; +Cc: emacs-orgmode
On 2016-03-04, at 15:19, Johann Spies <johann.spies@gmail.com> wrote:
> I am normally working in LaTeX but want to try out org-mode for a book.
> During the process I have to export Word Processing documents
> (LibreOffice/MS Word) for other less privileged people who do not know
> Linux/Emacs/LaTeX :)
>
> My first problem is how to do this (\vspace{}) in orgmode (Know I how to
> get the 'enumerate' environment working in orgmode):
Why not use the enumitem package to add that space automatically?
Best,
--
Marcin Borkowski
http://octd.wmi.amu.edu.pl/en/Marcin_Borkowski
Faculty of Mathematics and Computer Science
Adam Mickiewicz University
^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: Vertical space
2016-03-04 14:25 ` Marcin Borkowski
@ 2016-03-04 15:06 ` Johann Spies
2016-03-04 15:41 ` Marcin Borkowski
0 siblings, 1 reply; 9+ messages in thread
From: Johann Spies @ 2016-03-04 15:06 UTC (permalink / raw)
To: Marcin Borkowski; +Cc: emacs-orgmode
[-- Attachment #1: Type: text/plain, Size: 578 bytes --]
On 4 March 2016 at 16:25, Marcin Borkowski <mbork@mbork.pl> wrote:
>
>
>
> Why not use the enumitem package to add that space automatically?
>
>
>
Thanks Marcin. I did not know about enumitem. That might be useful in
LaTeX.
But my problem here is not LaTeX, but how to do it using orgmode and then
export
it to LaTeX and ODT
Also - enumitem might not be the final answer to my problem here because I
do
not always need the same space between items.
Regards
Johann
--
Because experiencing your loyal love is better than life itself,
my lips will praise you. (Psalm 63:3)
[-- Attachment #2: Type: text/html, Size: 1266 bytes --]
^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: Vertical space
2016-03-04 15:06 ` Johann Spies
@ 2016-03-04 15:41 ` Marcin Borkowski
0 siblings, 0 replies; 9+ messages in thread
From: Marcin Borkowski @ 2016-03-04 15:41 UTC (permalink / raw)
To: Johann Spies; +Cc: emacs-orgmode
On 2016-03-04, at 16:06, Johann Spies <johann.spies@gmail.com> wrote:
> On 4 March 2016 at 16:25, Marcin Borkowski <mbork@mbork.pl> wrote:
>
>> Why not use the enumitem package to add that space automatically?
>
> Thanks Marcin. I did not know about enumitem. That might be useful in
> LaTeX.
> But my problem here is not LaTeX, but how to do it using orgmode and then
> export
> it to LaTeX and ODT
>
> Also - enumitem might not be the final answer to my problem here because I
> do
> not always need the same space between items.
AFAIK, you can give Org arguments to environments. Also, you can use
enumitem to change the spacing between items per environment, not only
globally. And you can always use literal LaTeX, see (info "(org)
Quoting LaTeX code").
> Regards
> Johann
Best,
--
Marcin Borkowski
http://octd.wmi.amu.edu.pl/en/Marcin_Borkowski
Faculty of Mathematics and Computer Science
Adam Mickiewicz University
^ permalink raw reply [flat|nested] 9+ messages in thread
end of thread, other threads:[~2016-03-04 15:42 UTC | newest]
Thread overview: 9+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2014-01-31 4:17 vertical space Rustom Mody
2014-01-31 5:48 ` Nick Dokos
2014-01-31 8:35 ` Nicolas Goaziou
2014-01-31 6:44 ` Rustom Mody
2014-01-31 8:16 ` Nicolas Goaziou
-- strict thread matches above, loose matches on Subject: below --
2016-03-04 14:19 Vertical space Johann Spies
2016-03-04 14:25 ` Marcin Borkowski
2016-03-04 15:06 ` Johann Spies
2016-03-04 15:41 ` Marcin Borkowski
Code repositories for project(s) associated with this external index
https://git.savannah.gnu.org/cgit/emacs.git
https://git.savannah.gnu.org/cgit/emacs/org-mode.git
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.