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

Learn LaTeX easily with newest books:

The LaTeX Beginner's Guide: 2nd edition and perfect for students writing a thesis

The LaTeX Cookbook: 2nd edition full of practical examples for mathematics, physics, chemistry, and more

LaTeX Graphics with TikZ: the first book about TikZ for perfect drawings in your LaTeX thesis

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