when creating pdf with delphi how to give line break? - delphi

I am creating my own pdf with delphi. I am using Tj,BT and ET commands but I can't give line break. Which command I have to use for this line break problem or how to give line break? any link,reference or help?

I'm not sure how this relates to Delphi (which PDF component are you using?), but from what I know about postscript as used by PDF, the font data describes the width of each character, which is used for horizontal progression, but vertical progression is done with the TL and the ' command. See the PDF reference section 5.3.2

Related

What is the cause of "Latex Error: The font size command /normalsize is not defined"

I follow the instructions online to set up environment for LaTeX using Sublime text 3 and skim. However, I encountered a problem. When I try to compile the latex document shown in the picture, there are a lot of errors shown and the PDF generated is blank, i.e. without the "Introduction: ..." line.
And I downloaded all relevant program including latexmk.
Is there anything I can do to solve this problem?
You should use
\documentclass[a4paper]{article}
not
\document[a4paper]{article}
Also, regarding the use of $$...$$ for display math, see Why is \[ ... \] preferable to $$ ... $$?

Howto disable hyphenation for typewriter text in doxygen?

I found out, that doxygen add hyphenation hints for latex when outputting text of "\c" command, like:
{\ttfamily on\-Ready\-State\-Change\-Listener}
I want to disable this behavior (so onReadyStateChangeListener won't be hyphenated). Is that possible and how?
No this is not possible. Without hyphenation hints LaTeX will often run long identifiers off the page and into the margin, which is the reason why they were introduced.
If you really want to get rid of it have a look at the function filterLatexString() in src/utils.cpp and remove the if in the default case at the end of the function.
I found this is possible in Doxygen 1.8.9.1, using a small workaround job.
Create a custom header.tex file for use with Doxygen. (Instructions)
Find the line in the header.tex file that starts \newcommand{\+}. If you don't find that text, insert an empty line towards the top of the document.
Replace that line with the following text:
\newcommand{\+}{}
Use the header.tex file with your Doxygen output (Instructions)
This effectively disables all of the hyphenation marks that Doxygen adds to the
words.
NOTES: This is for words with \+ added (e.g. D\+O\+X\+Y\+G\+E\+N). It may work for \- if you just substitute the minus sign into the steps above, but I have not verified that.
I found some itentifiers to still be hyphenated after applying this, but in more reasonable places.
Also, do watch out for text running into the margins, as noted by #doxygen.

ImageMagick Right-to-Left text rendering

ImageMagick does not render Right-to-Left text correctly (it does not join it and its reversed). I need a solution for this...
ImageMagick uses freetype as it's text-rendering engine, which does not support complex text layout languages. If you need text to image generation for those language, you would need alternative solution.
On Linux/UNIX, Pango has a command line tool called "pango-view", which would output text as PNG. You can then manipulate the PNG with ImageMagick.
On Windows, you can get "pango-view" in cygwin (I believe the dev package for pango in cygwin). If cygwin is unacceptable, you would need to write a program using WCF or GDI+.
Recent versions of ImageMagick supports command line argument -direction which determines rendering direction of the text from Right to Left (-direction right-to-left) or Left to Right (-direction left-to-right) manner.
See also this SO answer for an example.

Problem in Latex: "There's no line here to end"

I'm using Lyx to produce a Latex document, and when i try to convert to pdf, it complains of the error: "there's no line to end", and description is "//".
My Latex document is like 200 lines without many line breaks. How am I supposed to debug this and get this darned pdf converted. I literally am stuck on this for hours, can't submit this pdf. And for 90% of the time while writing this document, the convert to pdf works fine, I don't know know since what point did it start to fail.
Someone give me a quick way to get rid of this error? Otherwise this Latex document is useless.
Thanks.
That may sound stupid, but sometimes Latex needs a sign before the \, therefore:
~\\
That very much depends on the distribution you chose. LyX btw. is kind of crazy, when it comes to LaTeX export. Try auctex if you've got a month or two to spare ;)
IMO this is the problem with LyX; when things go wrong it's hard to know where to look to fix the problem. This is a minimal document that shows an example of the error:
\documentclass{article}
\begin{document}
\\ there
\end{document}
I suggest exporting your LyX document to LaTeX, then compiling it "by hand" (with pdflatex mydoc or whatever) and see where in the document the error is appearing. You should then be able to correlate it with some misbehaving piece of the LyX document.
Do a binary search. Delete half the document, if it compiles then the problem was in the part you deleted. If not, then it's in the half you kept. Repeat the procedure on the offending portion and you should soon find which line is causing it.
Dear Saobi, please post the offending line. Probably you have a "\" in a single-line math environment. If you post the code for the complete environment, I can try to indicate how to prevent this error.
You can go to View -> View Source and click around until you find the offending line. In latex, line break is \\.
After doing that I realized the problem is you can't put a line break (Ctrl+Enter) at the start of a line (or cell). You can cheat by forcing a space (Ctrl+Space) before the line break. :)
My approach for locating compilation errors in LaTeX documents is based on a binary search approach. I suppose that a similar approach can be used in LyX.
The key idea is to divide your document in two parts of approximately the same size. At the boundary between these two parts a line containing \end{document} is inserted. If the document now can compile with no problems, the problem were located in the second half part of the document (otherwise it were in the first half part).
\documentclass{article}
\begin{document}
% First half part of the document
\section{Hello}
% Location for inserting \end{document}
% Second half part of the document
% in which the error is located
\section{World
\end{document}
In addition, check out that your LaTex lines already have content. I wrote an empty line, and It also causes error, from my experience.
\vspace{1cm}{ }\\

Why does LaTeX start a new line when making a reference

I just created a LaTeX document and compile it to a PDF using pdftex. Every time I make a reference using the \ref command, the reference is put on a new line. Why does this happen and how do I prevent this?
Are you by any chance using \\ in URLs instead of //? \\ is used as a linebreak in TeX.
Try to localize the problem: create a new file which initializes hyperref the same way, uses no other packages, and has some text and a reference. Check if references still start on new lines. If they do, you can show it here (and on LaTeX forums); if not, add more of your report's preamble until you get a file which exhibits the problem.
Can you prepare a minimum example demonstrating your problem?
I've tried with:
\documentclass{report}
\usepackage[pdftex,breaklinks=true,bookmarks=true,bookmarksopen= true,pdfpagemode=UseNone,plainpages=false,pdfpagelabels,pdfstartview=FitH,olorlinks=true,citecolor=blue]{hyperref}
\begin{document}
Test \url{http://test.com} \ref{http://someother.com}.
\end{document}
And the whole output is a single line in PDF.
BTW \ref is used to produce internal document links (like in "As described in chapter \ref{chapter:second}...").
It was my own fault, I used \par for the paragraph sign instead of \P. This is one of my first LaTeX documents, so I overlooked it. Thanks for the quick responses/answers though.

Resources