Hi Andreas

Nice to hear people working on the LaTeX backend, I admire LaTeX hugely but have never had the patience to learn it.

I'm not sure that this is what you after regards blank lines, but The {empty} attribute is useful for outputting trailing blank lines in markup templates, just put it on a line by itself in your templates and you'll get a blank line on the output (there's a paragraph in the Tips and Trick section about it, http://www.methods.co.nz/asciidoc/userguide.html#_pretty_printing_asciidoc_output


Cheers, Stuart

PS: please submit you latex.conf patches once they're done.


On 10/06/10 23:54, Andreas Hermann Braml wrote:
Hi!

Right now, I'm trying to improve the LaTeX backend latex.conf, namely the
support for listing blocks. Contrary to HTML where all markup is neatly tucked
away in tags, LaTeX needs newlines/empty lines to make some environment
commands to work.

The problem right now is that I need output like

\begin{verbatim} %<- this \n is important to LaTeX!
<some listingcontent as it comes from |>
\end{verbatim}
  % This empty line matters to LaTeX
<Next paragraph>

I can hack around the empty line at the end by simply inserting a comment as
above; unfortunately, this is not an option after \begin{listing}, since this
is a verbatim environment. :(

As those working on latex.conf before me already noticed, a solution like the
following doesn't work:

[listingblock]
\begin\{lstlisting\}

|

\end\{lstlisting\}

% FIXXME: this LaTeX comment is a dirty hack to circumvent missing \n


The reason is that seemingly you only can

- force empty line into the backend output by writing

some text

some text

- force newlines by writing

Some-Text
Some-Text

But the following strips all newlines outside the content of | :

some text
|
some text

And the following does the same:

some text

|

some text


This seems to be a feature built in with XML-like backend output in mind (to
not get accidetal spaces before/after tags). Unfortunately - in some special
but important cases - with LaTeX this is a bug that can't be hacked around (as
in my case with verbatim).

Or is there some well hidden (or undocumented ?) switch to suppress that
newlines get eaten? (Well, at least it doesn't eat my childern. Nor my cat.)

Right now it seems I have to use a filter to get the desired behaviour. But I
might be blind.


Bye
Andreas

--
You received this message because you are subscribed to the Google Groups 
"asciidoc" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to 
[email protected].
For more options, visit this group at 
http://groups.google.com/group/asciidoc?hl=en.

Reply via email to