Each district court has rules on how to file lawsuits, and how to interact with the court. What follows are some excerpts from the rules for the District Court for the Northern District of California, plus a few rules from the Federal Rules of Civil Procedure.

LOCAL RULES ON HOW TO PREPARE YOUR COMPLAINT

Civil Local Rule 3-4(a):
    First Page Requirements.  The first page of each paper presented
for filing must set forth:

    (1) The name, address, telephone number, facsimile ("fax")
    telephone number and state bar number of counsel (or, if pro-se,
    the name, address, telephone number and fax telephone number of
    the party) presenting the paper for filing.  This information
    must appear in the upper left hand corner and must indicate the
    party represented by name as well as that party's status in the
    litigation (i.e., plaintiff, defendant, etc.)  In multiparty
    actions or proceeedings, reference may be made to the signature
    page for the complete list of parties represented.

    (3) Commencing on the eight line of the page (except where
    additional space is required for counsel identification) there
    must appear:

        (A) The title of this Court, including the appropriate division
        of location;

        (B) The title of the action;

        (C) The case number of the action followed by the initials of
        the assigned District Judge or Magistrate Judge, and, if
        applicable, the initials of the Magistrate Judge to whom the
        action is referred for discovery or other pretrial activity;

        (D) A title describing the paper; and

        (E) Any other matter required by Civil Local Rule 3.

    (5) Presentation of Class Action.  If any complaint, counterclaim
    or cross-claim sought to be maintained as a class action, it
    must bear the legend "Class Action" on its first page below the
    title describing the paper as a complaint, counterclaim or
    cross-claim.

Civil Local Rule 3-4(c):
    General Requirements.

    (1) Paper.  Except for reporter transcripts, all papers presented
    for filing must be on top-centered, two-hole punched, 8-11/2 inch
    by 11 inch white opaque paper of original or recycled bond quality
    with numbered lines, and must be flat, unfolded (except where
    necessary for the presentation of exhibits), without back or cover,
    and firmly bound at the top.

    (2) Written Text.  Text must appear on one side only and must be
    double-spaced with no more than 28 lines per page, except for the
    identification of counsel, title of the case, footnotes and
    quotations.  Typewritten text may be no less than standard pica
    or 12-point type in the Courier font or equivalent, spaced 10
    characters per horizontal inch.  Printed text, produced on word
    processor or other computer, may be proportionally spaced,
    provided the type may not be smaller than 12-point standard font
    (e.g., Times New Roman).  The text of footnotes and quotations
    must also conform to these font requirements.

    (3) Identification of Paper.  Except for exhibits, each paper filed
    with the Court must bear a footer on the lower margin of each page
    stating the title of the paper (e.g., "Complaint", "Defendant's
    Motion for Summary Judgment", etc.) or some clear and concise
    abbreviation.  Once the Court assigns a case number to the action
    that case number must be included in the footer.

Civil Local Rule 3-4(d):
    Citation to Authorities.  Unless otherwise directed by the
assigned Judge, citation to authorities in any paper must include:

    (1) In any citation to Acts of Congress, a parallel citation to
    the United States Code by title, section and date;

    (2) In any citation to U.S. regulations, a citation to the Code
    of Federal Regulations by title and section, and the date of
    promulgation of the regulation;

    (3) In any citation to a U.S. Supreme Court Case, a citation to
    the United States Reports, Lawyers' Edition or Supreme Court
    Reporter must be used.  If the case is not yet available in
    any of these formats but is available on electronic databases,
    citation must indicate the database, year and any screen or
    page numbers, if assigned;

    (4) In any citation to other federal courts, unless an alternate
    reporting service is widely available, a citation to the Federal
    Reporter, Federal Supplement or Federal Rules Decision must be
    used.  If the case is not yet available in any of these formats
    but is available on electronic databases, citation must indicate
    the database, year and any screen or page numbers, if assigned;

    (5) In any citation to a state court, citations must include
    either the official reports or any official reporting service
    (e.g., West Publishing).   If the case is not yet available in
    those formats but is available on electronic databases, citation
    must indicate the database, year and any screen or page numbers,
    if assigned.

Civil Local Rule 3-5:
    Jurisdictional Statement.

    (a) Jurisdiction.  Each complaint, petition, counterclaim and
    cross-claim must include a separate paragraph entitled
    "Jurisdiction".  THe paragraph will identify the statutory or
    other basis for federal jurisdiction and the facts supporting
    each jurisdiction.

    (b) Intradistrict Assignment.  Each complaint or petition must
    include a paragraph entitled "Intradistrict Assignement".  The
    paragraph must identify any basis for assignment to a
    particular location or division of the Court pursuant to Civil
    Local Rule 3-2(c).

Civil Local Rule 3-6:
    Jury Demand.

    (a) Included in Pleading.  A party may demand a jury trial as
    provided ini FRCivP 38(b).  When a demand for jury trial is
    included in a pleading, the demand must be set forth at the
    end of the pleading.  WHen the demand is made by a party who
    is represented by counsel, the pleading must be signed by the
    attorney for the party making the demand.  In the caption of such
    pleading, immediately following the title of the pleading, the
    following must appear: "DEMAND FOR JURY TRIAL".

    (b) Marking of Civil Cover Sheet Insufficient.  Marking the civil
    cover sheet to indicate a demand for jury trial is not a
    sufficient demand to comply with this Local Rule.

LOCAL RULES ON HOW TO FILE YOUR COMPLAINT

Civil Local Rule 3-2:
    Commencement and Assignment of Action.

    (a) Civil Cover Sheet.  Every complaint, petition or other paper
    initiating a civil action must be filed with a completed civil
    cover sheet on a form approved by the Court.

    (b) Commencement of Action.  An action may be commenced within the
    meaning of FRCivP 3 at any office of the Clerk for this district.
    After the matter has been assigned to a Judge, unless ordered or
    permitted otherwise, all subsequent filings must be made in the
    Office of the Clerk at the division or location where the assigned
    Judge maintains chambers.

    (c) Assignment to a Division.  Pursuant to the Court's Assignment
    Plan, except for Intellectual Property Actions, Securities Class
    Actions and Capital and Noncapital Prisoner Petitions or Prisoner
    Civil Rights Actions, upon initial filing, all civil actions and
    proceedings for which this district is the proper venue shall be
    assigned by the Clerk to a Courthouse serving the county in which
    the action arises.  A civil action arises in the county in which
    a substantial part of the events or omissions which give rise to
    the claim occurred or in which a substantial part of the property
    that is the subject of the action is situated.  Actions in the
    excepted categories shall be assigned on a district-wide basis.

Civil Local Rule 3-3(a):
    Assignment of Action to a Judge.

    Assignment.  Immediately upon the filing of any civil action and
    its assignment to a division of the Court pursuant to Civil
    Local Rule 3-2, the Clerk shall assign it to a Judge pursuant to
    the Assignment Plan of the Court.  The Clerk may not make or
    change any assignment, except as provided in these local rules or
    in the Assignment Plan (General Order No. 44).

Civil Local Rule 3-8:
    Claim of Unconstitutionality.

    (a) Federal Statute.  In any action in which the constitutionality
    of an Act of Congress is questioned and neither the United States
    nor any officer, agency or employee thereof is a party, counsel
    raising the question must file a notice of such claim with the
    assigned Judge (or, if no assignment has been made, the Chief Judge)
    and serve a copy of such notice on the United States Attorney for
    this district.  The notice must identify the statute and describe
    the basis for the claim that is unconstitutional.  The party must
    file the notice with a certificate of service pursuant to Civil
    Local Rule 5-6.

[Note: this rule is for cases where your constitutionality argument is
part of some other complaint, such as a Securities Class Action lawsuit.]

Civil Local Rule 3-9.
    Parties.

    (a) Natural Person Appearing Pro Se.  Any party representing him or
    herself without an attorney must appear personally and may not
    delegate that duty to any other person who is not a member of the
    bar of this Court.  A person representing him or herself without an
    attorney is bound by the Federal Rules, as well as by all applicable
    local rules.  Sanctions (including default or dismissal) may be
    imposed for failure to comply with local rules.



FEDERAL RULES ON HOW TO PREPARE YOUR COMPLAINT

FRCP Rule 10.
    Form of Pleadings

    (a) Caption; Names of Parties.
    Every pleading shall contain a caption setting forth the name
    of the court, the title of the action, the file number, and a
    designation as in Rule 7(a).  In the complaint the title of the
    action shall include the names of all the parties, but in other
    pleadings it is sufficient to state the name of the first party
    on each side with an appropriate indication of other parties.

    (b) Paragraphs; Separate Statements.
    All averments of claim or defense shall be made in numbered
    paragraphs, the contents of each of which shall be limited
    as far as practicable to a statement of a single set of
    circumstances; and a paragraph may be referred to by number
    in all succeeding pleadings.  Each claim founded upon a
    separate transaction or occurrence and each defense other
    than denials shall be stated in a separate count or defense
    whenever a separation facilitates the clear presentation of
    the matters set forth.

    (c) Adoption by Reference; Exhibits.
    Statements in a pleading may be adopted by reference in a
    different part of the same pleading or in another pleading
    or in any motion.  A copy of any written instrument which
    is an exhibit to a pleading is a part thereof for all
    purposes.