“Plaintiff feels like a freak and a weirdo — not because having short hair makes a person less of a woman — but because for her, it undermines specifically recommended treatment and sends the message to everyone that she is not a ‘real’ woman,” he wrote in a court filing.

“She is getting hormones, but it sounds like the inability to socially transition, or to have surgery, could be contributing to suicidality — especially when she is looking at decades in prison and thus a certain hopelessness about whether that might ever be available for her,” said Dan Karasic, a University of California, San Francisco psychiatrist and the chairman of the American Psychiatric Association’s work group on gender dysphoria; he cautioned that he had not examined her.

The military turned down a request by The New York Times to visit the facility. But an Army spokesman, Wayne Hall, provided written answers from the Army Corrections Command to questions posed by The Times, from which a sketch of her environment emerged.

Ms. Manning’s cell, like others at Fort Leavenworth, contains a bed, toilet, sink, locker, storage bin, chair and desk, according to the Army. She showers in a nearby communal bathroom with individual stalls. She has no access to the internet, but says she receives “at least a couple hundred pieces of mail every week.”

The Army does not permit her to see people who did not know her before her incarceration, so she is not allowed to meet with a handful of volunteers who have formed an informal network of supporters, but she calls one of them daily. A volunteer who relayed questions from The Times to her asked not to be named, citing security concerns.

Ms. Manning said she recently finished reading “Superintelligence: Paths, Dangers, Strategies,” a book about artificial intelligence by the Swedish philosopher Nick Bostrom, and “1Q84,” a dystopian novel by Haruki Murakami. She is interested in efforts to develop stronger encryption and has been “going through” the “Princeton Companion to Mathematics.” She also said she reads women’s athletic, fashion and lifestyle magazines like Shape, Vogue, Vanity Fair and Cosmopolitan.