unwanted returns in <codeblock>
Having trouble installing Oxygen PDF Chemistry? Got a bug to report? Post it all here.
unwanted returns in <codeblock>
I discovered a couple of unwanted carriage returns <codeblock> elements in my Chemistry output.
First is a return after "for" and "lastline" in this screenshot

Second is a return between "-" and ">" (which is supposed to be a prompt) in this screenshot

Is this a known issue? Is there a workaround I can try?
Thanks
First is a return after "for" and "lastline" in this screenshot

Second is a return between "-" and ">" (which is supposed to be a prompt) in this screenshot

Is this a known issue? Is there a workaround I can try?
Thanks
Re: unwanted returns in <codeblock>
Hi bloodnok,
Unfortunately, we can not see the images to observe what happens.
You could send the images on our support email support@oxygenxml.com
However, please note that the <codeblock> elements are intentionally displayed as they appear in the source file.
Therefore, if you have carriage returns in your source file, they will be kept also in the output code block, as codeblocks keep all the white space characters unaltered.
If you double check and make sure the whitespaces or carriage returns are not present in your source file but appear in the codeblock, please send us a sample source file that you use and reproduce the issue with to the support email mentioned above, or as attachment using the tech-support form on our website.
Best Regards,
Costin
Unfortunately, we can not see the images to observe what happens.
You could send the images on our support email support@oxygenxml.com
However, please note that the <codeblock> elements are intentionally displayed as they appear in the source file.
Therefore, if you have carriage returns in your source file, they will be kept also in the output code block, as codeblocks keep all the white space characters unaltered.
If you double check and make sure the whitespaces or carriage returns are not present in your source file but appear in the codeblock, please send us a sample source file that you use and reproduce the issue with to the support email mentioned above, or as attachment using the tech-support form on our website.
Best Regards,
Costin
Costin Sandoi
oXygen XML Editor and Author Support
oXygen XML Editor and Author Support
Re: unwanted returns in <codeblock>
the urls to the images are https://www.dropbox.com/s/bfdunb1ymddoc ... e.png?dl=0 and https://www.dropbox.com/s/oijwvpzsm2hvv ... t.png?dl=0
i double-checked my codeblocks. the unwanted returns are not in the source. i even added extra elements to see if that would eliminate the unwanted returns but no dice. i previously sent you files wherein you solved an issue with pagination. this bug is in the same files.
i double-checked my codeblocks. the unwanted returns are not in the source. i even added extra elements to see if that would eliminate the unwanted returns but no dice. i previously sent you files wherein you solved an issue with pagination. this bug is in the same files.
Re: unwanted returns in <codeblock>
I'm afraid that, as we are not aware of such issues, without looking into your source file, we can not investigate this.
Therefore, please send on our support email (support@oxygenxml.com) address a sample file that you could reproduce the issue with and we will see what goes wrong.
Regards,
Costin
Therefore, please send on our support email (support@oxygenxml.com) address a sample file that you could reproduce the issue with and we will see what goes wrong.
Regards,
Costin
Costin Sandoi
oXygen XML Editor and Author Support
oXygen XML Editor and Author Support
Re: unwanted returns in <codeblock>
for anyone else experiencing this issue, the synchrosoft folks found a workaround was to disable the <code> tag that gets inserted into <pre> blocks. they provided some css that neutralises the <code>. another solution is to mangle the output html to delete the <code> tags (they serve no purpose that i can discern). here's the ant method i use:
hope this helps.
Code: Select all
<!--remove the <code> tags from the <pre> blocks-->
<!--codeblock"><code>-->
<replaceregexp file="${pub.dir}/index.html" flags="gs" match="codeblock"><code>"
replace="codeblock">" byline="true"/>
<!--</code></pre>-->
<replaceregexp file="${pub.dir}/index.html" flags="gs" match="</code></pre>"
replace="</pre>" byline="true"/>
-
- Posts: 4
- Joined: Thu Oct 02, 2014 7:35 pm
Re: unwanted returns in <codeblock>
Post by bridget.rooney »
Hi,
This is an old thread but I am experiencing a similar issue.
I am creating PDF from DITA using CSS. My source file contains long lines of code that need to spill onto the next line in the rendered PDF, but they are being split into two lines with hard break. This means that the command fails when users copy it from the PDF to the command line (because it comes in as two commands).
Is there a way to keep this as a single line that wraps in the PDF?
(note that you cannot see this in the PDF so you copy the line and it's unclear why it fails when pasted to the CLI)
Thanks for any help!
<codeblock>
# This is the actual shell cmd
$gist = invoke-blahblah -Method blahblah-Uri $URL -Body $JSON -blahblah application/json
</codeblock>
Here is the text copied from the PDF.
# This is the actual shell cmd
$gist = invoke-blahblah -Method blahblah -Uri $URL -Body $JSON
blahblah application/json
This is an old thread but I am experiencing a similar issue.
I am creating PDF from DITA using CSS. My source file contains long lines of code that need to spill onto the next line in the rendered PDF, but they are being split into two lines with hard break. This means that the command fails when users copy it from the PDF to the command line (because it comes in as two commands).
Is there a way to keep this as a single line that wraps in the PDF?
(note that you cannot see this in the PDF so you copy the line and it's unclear why it fails when pasted to the CLI)
Thanks for any help!
<codeblock>
# This is the actual shell cmd
$gist = invoke-blahblah -Method blahblah-Uri $URL -Body $JSON -blahblah application/json
</codeblock>
Here is the text copied from the PDF.
# This is the actual shell cmd
$gist = invoke-blahblah -Method blahblah -Uri $URL -Body $JSON
blahblah application/json
Thank you kindly for your time
Re: unwanted returns in <codeblock>
Hello Bridget,
Please try different PDF Readers.
I see that the one from Chrome works completely different from the Acrobat Reader.
The first one sets newlines after each visual line, while Acrobat is putting the entire codeblock on a single line, that is bad also.
Many regards,
Dan
Please try different PDF Readers.
I see that the one from Chrome works completely different from the Acrobat Reader.
The first one sets newlines after each visual line, while Acrobat is putting the entire codeblock on a single line, that is bad also.
Many regards,
Dan
-
- Posts: 4
- Joined: Thu Oct 02, 2014 7:35 pm
Re: unwanted returns in <codeblock>
Post by bridget.rooney »
Thanks Dan.
But Chrome and Edge both render this as hard line breaks. This is on Windows 36bit
Looks like Acrobat Reader and Acrobat Pro both wrap without creating a hard break on a line feed (LF). Which is what we want.
I will try some others to see how they behave.
Thanks for the insight!
But Chrome and Edge both render this as hard line breaks. This is on Windows 36bit
Looks like Acrobat Reader and Acrobat Pro both wrap without creating a hard break on a line feed (LF). Which is what we want.
I will try some others to see how they behave.
Thanks for the insight!
Thank you kindly for your time
Re: unwanted returns in <codeblock>
Hard returns in PDF aren't unique to Chemistry. We've had this issue since as long as we've provided PDF documentation. The workaround we used in my previous lives was to manually break the line and use the backslash character. So your source would be:
Hope this helps
Code: Select all
# This is the actual shell cmd
$gist = invoke-blahblah -Method blahblah -Uri $URL -Body $JSON \
blahblah application/json
Jump to
- Oxygen XML Editor/Author/Developer
- ↳ Feature Request
- ↳ Common Problems
- ↳ DITA (Editing and Publishing DITA Content)
- ↳ SDK-API, Frameworks - Document Types
- ↳ DocBook
- ↳ TEI
- ↳ XHTML
- ↳ Other Issues
- Oxygen XML Web Author
- ↳ Feature Request
- ↳ Common Problems
- Oxygen Content Fusion
- ↳ Feature Request
- ↳ Common Problems
- Oxygen PDF Chemistry
- ↳ Feature Request
- ↳ Common Problems
- Oxygen Feedback
- ↳ Feature Request
- ↳ Common Problems
- Oxygen XML WebHelp
- ↳ Feature Request
- ↳ Common Problems
- XML
- ↳ General XML Questions
- ↳ XSLT and FOP
- ↳ XML Schemas
- ↳ XQuery
- NVDL
- ↳ General NVDL Issues
- ↳ oNVDL Related Issues
- XML Services Market
- ↳ Offer a Service