On the eve of the major party conventions, voters are grudgingly rallying around the nominees while expressing broad misgivings about the candidates, the campaign and the direction of the country, according to the latest New York Times/CBS News Poll.

More than a third of Republicans say they are disappointed or upset that Donald J. Trump, who crashed the party’s nominating process, will represent them in the fall campaign; an equal number say he does not represent the values the party should stand for.

Democrats are only marginally happier with Hillary Clinton as their party’s candidate. A quarter of Democratic voters say they are disappointed in her as the nominee; an additional seven percent say they are upset. More promisingly for her, three-quarters say Mrs. Clinton stands for the core values and principles of the Democratic Party.

The broad discontent is reflected in the head-to-head contest, which has Mr. Trump and Mrs. Clinton tied at 40 percent. Mr. Trump’s standing has held steady for weeks at around 40 percentage points, while Mrs. Clinton has polled in the mid-40s in most public surveys.