Presidents and would-be presidents have come to write two types of books: the “Here I am, ready and waiting” campaign manifesto and the requisite after-office memoir. But presidential literature also includes substantive and enduring books that shaped a president’s thinking, provide insights into his decision-making and offer continuing lessons for leaders. Here are five of the best written by commanders in chief.

The Naval War of 1812 , By Theodore Roosevelt (1882)

Published when its author was only 23, this remains one of the most deeply researched and authoritative accounts of the War of 1812. For years, the book was required reading on every ship of the United States Navy. Roosevelt learned the importance of projecting sea power and embraced that theme in his later endeavors, preparing the U.S. Navy for the Spanish-American War and dispatching the Great White Fleet to make American naval power an essential ingredient of foreign policy.

The Diary of James K. Polk During His Presidency , By James K. Polk (1910)

America’s 11th president began keeping a detailed diary six months after his inauguration in 1845. He did so largely to have a personal record of contentious discussions within his Cabinet. Polk’s record is more candid and insightful than most presidential writings because Polk died within weeks of leaving office — before he or anyone else could edit his words for posterity. This is an unvarnished look at the prerogatives and limitations of presidential power.

Personal Memoirs of Ulysses S. Grant (1885)

Frequently depicted as stodgy and dull, Grant completed his lively memoir a few days before dying of cancer. He was on the verge of bankruptcy and, though gravely ill, embarked on a painful last campaign to restore his family’s finances. He produced a highly readable account of his military service, including his evolution as a young officer. The posthumous success of the two-volume set provided handsomely for his family, and Grant’s recollections of his command decisions remain one of the best accounts of the Union’s military actions during the Civil War.

Crusade in Europe ,

By Dwight D. Eisenhower (1948)

Eisenhower’s account of his involvement in World War II spans the period from his prewar days with Gen. Douglas MacArthur in the Philippines to the German surrender. It includes a chapter on the lessons of the war, as well as musings on future relations with Russia. Published so soon after the war, “Crusade in Europe” doesn’t provide candid appraisals of Eisenhower’s contemporaries or critiques of decisions that held ramifications for postwar Europe, but it is a fluid, first-person account by the top Allied commander.

Six Crises , By Richard M. Nixon (1962)

Nixon needed a diversion between his presidential defeat by John F. Kennedy and his humiliating loss in the California governor’s race in 1962. This was his first major literary effort, and he sought to emphasize his leadership experiences and the tempering of his character for future reference. Perhaps most illuminating is Nixon’s characterization of the different types of crises and crisis-management responses, and his observation that sometimes the most vulnerable point occurs not during but in the aftermath of the crisis. Nixon might have paid more attention to this book himself a decade later.

Walter R. Borneman is the author, most recently, of “American Spring: Lexington, Concord, and the Road to Revolution.”