Text Formattingneed to force a new line

Information and discussion about LaTeX's general text formatting features (e.g. bold, italic, enumerations, ...)
Post Reply
owlover
Posts: 1
Joined: Thu Apr 22, 2010 4:47 pm

need to force a new line

Post by owlover »

I'm using Doxygen with LaTeX to produce a .pdf file.

Here's the code:

Code: Select all

     * @test
     * \n test for the sines and cosines
     * \f[|\sin \phi_{G1150}-\sin \phi|<10^{-11}\f]
     * \f[|\cos \phi_{G1150}-\cos \phi|<10^{-11}\f]
     * @test
     * test for Not-a-Number at the center
     * \f[\sin \phi(0,0,0) != NaN\f]
     * \f[\cos \phi(0,0,0) != NaN\f]
     */
    static void sinLatitude(const double& r,
                            const double& z,
                            double& sLat,
                            double& cLat,
                            const double& re,
                            const double& s );
Here's the resulting .pdf output (ignore the exponents in this example - they're OK in the .pdf):

Member EARTH::PlanetographicLocation::sinLatitude(const double &r, const double &z, double &sLat, double &cLa
test for the sines and cosines

| sin φG1150 - sin φ| < 10-11
| cos φG1150 - cos φ| < 10-11

Member EARTH::PlanetographicLocation::sinLatitude(const double &r, const double &z, double &sLat, double &cLa
test for Not-a-Number at the center

sin φ (0, 0, 0)! = NaN
cos φ (0, 0, 0)! = NaN

The lines beginning with "Member" are running through the margin and off the page. I'm losing the last two arguments of the function and part of the third argument. I've tried using \newline, \allowbreak and \vspace with no success.

I'd appreciate any ideas that you may have on how to solve this. Thanks.

Recommended reading 2024:

LaTeXguide.org • LaTeX-Cookbook.net • TikZ.org

NEW: TikZ book now 40% off at Amazon.com for a short time.

And: Currently, Packt sells ebooks for $4.99 each if you buy 5 of their over 1000 ebooks. If you choose only a single one, $9.99. How about combining 3 LaTeX books with Python, gnuplot, mathplotlib, Matlab, ChatGPT or other AI books? Epub and PDF. Bundle (3 books, add more for higher discount): https://packt.link/MDH5p

tadkem
Posts: 2
Joined: Sun Apr 25, 2010 1:46 pm

need to force a new line

Post by tadkem »

Try '\\' at the end of each line you want to break:

For example:

Code: Select all

static void sinLatitude(const double& r, \\
                            const double& z, \\
                            double& sLat, \\
                            double& cLat, \\
                            const double& re, \\
                            const double& s );
Post Reply